Hey again guys, i have encountered a problem which i am finding very difficult, but maybe its one of those problems where there is a really easy solution :) (sorry if its similar to my last question, but this is kind of a diff problem)
I am using SDL and OPengl... I have this 2d character and I have a text document. I want the text doc to have a distance and distance, maybe like:
left 10 right 20 up 1 down 6
Then my character could obey those commands, and the distances would be like pixels or an increase in players pos.
I have a main loop, and a player class with move() in it, i have been trying for days and cant get this to work!!
It would be great if you guys could help me:
- structure my classes and what class for each.
-mostly figure out how to read the direction and distance, and make the player move only that far (like each frame the distance decerases by 1, and when it gets to zero the player stop or moves to next script) thanks so much and i erally would appreciate an answer, i erally want to achieve this and am eager for a soloution. Pleaseeee!