#105586 - QuantumDoja - Mon Oct 09, 2006 9:51 pm
Hi, here is my basic loop:
while(;;) {
getInput
}
getInput - checks for key presses, if we are moving left/right, we call MovePlayer , MovePlayer then decides if we need to update the map.
My Main player sprite has a limited subsection of the screen in which he can move before we decide to scroll the map: - is this a bad idea?
(Imagine the ascie art is a box in a box)
_____________________
|.....______________.....|
|.....|.........................|.....|
|.....|.........................|.....|
|.....|.........................|.....|
|.....|.........................|.....|
|.....|.........................|.....|
|.....|____________|.....|
|___________________|
I want to create movement effects like mario, or at least a nice arch when im jumping.
I can create velocity in the x and y co-ordinates, should I then update x and y each frame? or whats this fixed point math im hearing about!
please help
_________________
Chris Davis
while(;;) {
getInput
}
getInput - checks for key presses, if we are moving left/right, we call MovePlayer , MovePlayer then decides if we need to update the map.
My Main player sprite has a limited subsection of the screen in which he can move before we decide to scroll the map: - is this a bad idea?
(Imagine the ascie art is a box in a box)
_____________________
|.....______________.....|
|.....|.........................|.....|
|.....|.........................|.....|
|.....|.........................|.....|
|.....|.........................|.....|
|.....|.........................|.....|
|.....|____________|.....|
|___________________|
I want to create movement effects like mario, or at least a nice arch when im jumping.
I can create velocity in the x and y co-ordinates, should I then update x and y each frame? or whats this fixed point math im hearing about!
please help
_________________
Chris Davis