- Upvotes Received
- 0
- Posts with Upvotes
- 0
- Upvoting Members
- 0
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
- PC Specs
- Ubuntu 9.10
hello , I need to know how to get the direction from point A to point B eg. point_direction(0 , 0 , 100,100); would equal 315 x1 y1 x2 y2 how do I compute this ? Thanks ! |
|
Hello I'm creating a game engine. In order to draw everything correctly I need to sort a vector (vector<game_object*>) by each contents z value I miserably failed to do it with std's sort() so Id like to know what's the most efficient way I could sort this vector [If its … |
|
hello , I am making a small game engine and I have 2 header files engine.h and objects.h they both include each other. However it seems that its not getting included into objects.h , what is the "right" way to fix this ? sorry , I'm too lazy to gut … |
|
hello , Im creating a top down game. Id like to know what is the formula for moving X and Y values N pixels in a specified direction (0-360) ? [CODE] int x=0; int y=0; int speed=3; // "n" int direction=45; //some formula ... //output x=3; y=3; [/CODE] |
|
hello my question is, How do you sort a vector containing a bunch of game_object* 's ? You can use STD's algorithm.sort() somehow ... right ? |
|
hello , I am creating a map format for a game I'm making and I'm hoping to use xml. Can anyone tell me how to access elements using tinyxml ? or at least how create some sort of pain text parser ? Thanks in advance ! A Novice C++ Programmer |
|
Hello , I a creating program in witch objects are stored in the namespace var in var.h. How do I make the var namespace available to more than one file without having redefinition errors ? [CODE] ### var.h ### namespace var { ... } ### main.cpp ### #include "var.h" //multiple … |
|
I'm making a framework for what will eventually be a game. All objects in game are derived from game_object. I store everything in vectors; The _objects_ vector contains pointers to objects. The problem is when I call update the default update() function from game object is ran instead of the … |
|
hello can I keep track of objects in a list and being able to sort them by there z var ? do I use pointers ? how would I do this ? [code] #include <vector> vector<sometype> _objects_; create_object(object_type) { new object_type myobject; _objects_.push_back(myobject); return _objects_.at(list_end); } remove_object(int pos) { delete … |