Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

143 Neutral

About Odion

  • Rank

Personal Information

  • Interests
  1. That's a good idea. Btw how would you do the replicate player movement part? Collect the last few player input in an array, and feed these inputs to the follower with a delay?
  2. I am trying to figure out the simplest solution to do a Donkey Kong Country 2 -like player follow. Here is a video of what I mean. The way Diddie follows Dixie.       Does anyone have any idea how to achieve this the most simple, clever way? Replicating player movement input is not good enough, because of moving platforms, and interaction with the world that can change the main player position and velocity.   Thank you in advance! 
  3. Wow! Nice program! Nice test. According to this test shared pointers are definitely not 8-9 times slower.
  4. Clearer. Thanks. It says build is completed, but there is no exe file anywhere....its too late now, will look into it tomorrow
  5. Odion

    Please Help Me Find The Bugs

    Ok I see now. Se if we just include Soldier header, we are back where we started. With the difference that instead of Soldier, the MapManager Class has to be forward declared. This also, means, that if Soldier does not have any reference to MapManager, then I could leave out the forward declaration of the Soldier class in MapManager, and I could just include Soldier.h Am I getting this right now?
  6. Sorry I have no idea what this is. Can you elaborate please? 
  7. I see. Good to know. I will take it with a pinch of salt. Thank you
  8. Odion

    Please Help Me Find The Bugs

    Ahh I see now! I thought it actually brings in the included content in the place of the include statement, but that's not the case. Thanks a lot for the clarification. Phew I learned a lot in this thread :) Thanks!
  9. Odion

    Please Help Me Find The Bugs

    I get it. Mostly.   I don't really get why including "Soldier.h" does not provide this information tho'. Isn't including Soldier.h means that that the whole Soldier.h code gets copied into the current block of code?  
  10. Odion

    Please Help Me Find The Bugs

    Thank you. That was the problem....It would have took me days to find it. I also had to put  class MapManager; in Soldier.h I took out "using namespace std;" from the headers as well. Thank you for the advice.  I don't understand "Since you're only using pointers.." though. It would be different if I didn't use pointers?  
  11. Odion

    Please Help Me Find The Bugs

    #pragma once #include <string> #include <vector> #include "Soldier.h" using namespace std; class MapManager { public: MapManager(); ~MapManager(); int loadMap(string mapName); int placeArmies(); int printMap(); int battle(); Soldier* getClosestEnemy(Soldier* soldier, char self_owner); void setTile(int x, int y, char c); char getTile(int x, int y); void resetTile(int x, int y); private: vector <Soldier *> soldiers; vector <vector<char>> _mapData; vector <vector<char>> _origMapData; int cursorX = -1; int cursorY = -1; string _path = "Data\\Maps\\"; };
  12. Odion

    Please Help Me Find The Bugs

    I am sorry.  It fails to compile. Spent hours trying to figure out the problem. The errors I am getting are not there, they seem like phantoms errors caused by something else. I am guessing I am using pointers wrong and that somehow affects everything, but its just a hunch.
  13. Hi all, I am writing a little 2D battle simulator for practice.  movement (w,a,s,d) put soldiers for the two different armies (1,2) start battle (enter) But I cant run it, and I just cant seem to find the problem with my code. I am beginner, so probably I am doing something really stupid, which shouldn't be done, but even after researching the error codes, couldn't come up with anything. Some help would be much appreciated. My zipped project folder is added to attachments. (Visual Studio) Thank you.
  14. Obviously the latter, as you described. I totally agree. Btw here is my source for that smart pointer overhead info, tho, he did his own tests: 
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!