|
-
May 12th, 2000, 09:23 PM
#1
Thread Starter
New Member
Hi!
I'm making a SuperMario kind of game.
Right now, I need help with jumping forward.
With my code the mouse (who is my SuperMario) stops running forward when I press the jump button (space)
Please help!
/Anders
Being sexy is a hard job, but someone has to do it!
-
May 13th, 2000, 12:30 AM
#2
PowerPoster
you handle the input wrong I think. Did you put the move code in KeyDown or KeyPress???
-
May 13th, 2000, 01:53 AM
#3
transcendental analytic
Pasting some code here will help us find your problem
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
May 14th, 2000, 08:57 PM
#4
transcendental analytic
First, don't use timers, they're inexact and slow. If you need to use timed functions then use a loop with doevents instead.
Secondly, i don't like your idea of dismissing gravity like that. To make a Supermario game you need to learn the valuation of using variables. You need to set up a speed vector to your dude consisting of a x and y variable or an UDT of them, to make proper acceleration of him. Then you could easily make him jump like this:
'For gravity
If not hitfloor and dude.vy<20 dude.vy=dude.vy+1
'For Jump
dude.vy=dude.vy-20
And when you hit your guy against something you can make him bounce in the opposite direction, negating the values or just reset to make him stop. For moving your guy you can trap them in keydown (keycode) as vbkeyleft and vbkeyright.
'For moving to right with smooth acceleration:
If dude.vx<10 then dude.vx+1
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
May 14th, 2000, 10:34 PM
#5
Thread Starter
New Member
Oh, I think I'll just start over and try to learn something about game programming before I try anything stupid 
Do you probably have any links to a Game Programming-school?
Or a good tutorial?
/Anders
Being sexy is a hard job, but someone has to do it!
-
May 15th, 2000, 02:31 AM
#6
Addicted Member
I got a link!!!
ALL of that stuff he said to
do is done in a game called
'Lander'.
I learned alot from it,
Just go to
http://www.Vb-world.net
And look on the page for
the tutorial "Lander".
Hope that helps!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|