Register    Login    Forum    Search    FAQ

Board index » Everything




Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: Something new
 Post Posted: December 9th, 2017, 11:47 pm 
 

Joined: November 30th, 2013, 7:40 pm
Posts: 656
Location: Merville, British Columbia Canada
Here is my work with components so far. It is in the baby stages, still learning how to use them properly but i think i'm getting the idea.
This is a dungeon crawler type game in it's infancy.
I want to have a party of entities you can control so right now i am using springs to keep the units together.
If framework runs with only Direct2D as it's underlying framework
https://github.com/MrGodin67/Traveller
I've said this before but i think i may have my 2d engine foundations sorta figured out lol.
Cheers

_________________
Curiosity killed the cat, satisfaction brought him back


Top 
 Profile  
Reply with quote  
 Post subject: Re: Something new
 Post Posted: December 19th, 2017, 5:06 am 
 

Joined: November 30th, 2013, 7:40 pm
Posts: 656
Location: Merville, British Columbia Canada
I've added pathfinding with spline points to travel along

_________________
Curiosity killed the cat, satisfaction brought him back


Top 
 Profile  
Reply with quote  
 Post subject: Re: Something new
 Post Posted: December 20th, 2017, 3:30 am 
Site Admin
User avatar

Joined: December 31st, 2011, 4:53 pm
Posts: 3538
Location: Japan
You got some weird .obj file in there that prevented me from building. Some vector thing I think.

_________________
Chili


Top 
 Profile  
Reply with quote  
 Post subject: Re: Something new
 Post Posted: December 20th, 2017, 5:30 am 
 

Joined: November 30th, 2013, 7:40 pm
Posts: 656
Location: Merville, British Columbia Canada
hmm. did a clean and rebuild

_________________
Curiosity killed the cat, satisfaction brought him back


Top 
 Profile  
Reply with quote  
 Post subject: Re: Something new
 Post Posted: December 20th, 2017, 7:05 am 
 

Joined: February 28th, 2013, 3:23 am
Posts: 2970
Location: Oklahoma, United States
Is the associated header files for the libs included in the repo?

_________________
If you think paging some data from disk into RAM is slow, try paging it into a simian cerebrum over a pair of optical nerves. - gameprogrammingpatterns.com


Top 
 Profile  
Reply with quote  
 Post subject: Re: Something new
 Post Posted: December 20th, 2017, 7:29 am 
 

Joined: November 30th, 2013, 7:40 pm
Posts: 656
Location: Merville, British Columbia Canada
Yes, this is the header Utils2D_v2.h for Vec2Lib_d.lib, they are all there

_________________
Curiosity killed the cat, satisfaction brought him back


Top 
 Profile  
Reply with quote  
 Post subject: Re: Something new
 Post Posted: December 20th, 2017, 2:27 pm 
User avatar

Joined: December 11th, 2017, 3:29 pm
Posts: 22
Location: recurring
Build succeeded for me with VS 2017, no problem. Few errors but they sound probably like VS hystrionics else minor stuff.

However, the behavior of the tank in response to user input (only seemed to respond to mouse left-click) seems to be some combination of "following a predetermined sequence" and "unintended/erratic."

Initially it seemed the tank would turn and go in the direction where I point-clicked on the game screen, but then it just seemed to start doing its own thing (which it may actually have been doing from the beginning). eventually it made its way toward the extreme x,y (bottom right) corner of the game pane and disappeared off the edge. Then the turret (or part of it) came floating back in and twirling for a while.

Also the turret was more or less constantly spinning during this entire ~1 min testing sequence. It would seem you have some semantic errors in your otherwise valid code.

All that said: Impressive!

_________________
The greatest joy a man can know is to conquer his enemies & drive them before him.
To ride their horses & take away their possessions. To see faces of those who were dear
bedewed with tears & clasp their wives & daughters to his arms.


Top 
 Profile  
Reply with quote  
 Post subject: Re: Something new
 Post Posted: December 21st, 2017, 12:37 am 
 

Joined: November 30th, 2013, 7:40 pm
Posts: 656
Location: Merville, British Columbia Canada
yes, it follows a AStar pathfinding algorithm then i added spline (curves) to the points, actually creating a whole lot more points to follow along. I don't know why it would have gone off screen because the AStar pathfinding should have never gone out of bounds. Maybe you got the version where I am using Chili's mouse Events which acted on the LButton release event. I did, however, notice that as soon as the mouse left the window it triggered the Left and Right button release events which i tracked down to the D2DWindow Message Proc. In there the event was being triggered when the WM_MOUSEMOVE shown here
Code:
case WM_MOUSEMOVE:
   {
      POINTS pt = MAKEPOINTS(lparam);
      if (pt.x > 0 && pt.x < m_screenWidth && pt.y > 0 && pt.y < m_screenHeight)
      {
         mouse.OnMouseMove(pt.x, pt.y);
         if (!mouse.IsInWindow())
         {
            SetCapture(m_hwnd);
            mouse.OnMouseEnter();
         }
      }
      else
      {
         if (wparam & (MK_LBUTTON | MK_RBUTTON))
         {
            pt.x = std::max<short>(short(0), pt.x);
            pt.x = std::min<short>(short(m_screenWidth - 1), pt.x);
            pt.y = std::max<short>(short(0), pt.y);
            pt.y = std::min<short>(short(m_screenHeight - 1), pt.y);
            mouse.OnMouseMove(pt.x, pt.y);
         }
         else
         {
            ReleaseCapture();
            mouse.OnMouseLeave();
            //mouse.OnLeftReleased(pt.x, pt.y);
            //mouse.OnRightReleased(pt.x, pt.y);
         }
      }
      break;
   }

as you can see i commented out that event and it fixed the issue.
The turret was in a make-shift "slew" state in which it constantly rotated. I set that up and never did anything else with it yet

_________________
Curiosity killed the cat, satisfaction brought him back


Top 
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
 
Post new topic Reply to topic  [ 8 posts ] 

Board index » Everything


 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
cron