Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Super Mario Bro.'s Tutorial

Author
Message
zenassem
21
Years of Service
User Offline
Joined: 10th Mar 2003
Location: Long Island, NY
Posted: 25th Apr 2006 17:38 Edited at: 25th Apr 2006 17:42
Someone asked a few days ago, for help in coding a Super Mario Bro.'s like game. I decided to code 1 level of the game to include in my tutorial on the "2D All the Way" Board. I'll have the source and full tutorial up soon. I have attached an in-game screen capture to give you an idea of how things are going.

The code is flexible enough to create various types of platformers, and with slight modification it could also work for topdown games like frogger, which someone else recently asked about.

small size image


Note that my tile size is not the exact tile size or screen resolution that the NES used. My tiles and sprite animations are currently 32*32 pixels. I've fully mapped out level 1-1 and have collisions working. I'm currently fine tuning the pseudo-physics jumping code, and adding enemies.

Anyway, I hope this project helps out some people in the community who are interested in these types of games.

Thanks
~Zenassem

Attachments

Login to view attachments
Sk8ing Link08
18
Years of Service
User Offline
Joined: 26th Mar 2006
Location:
Posted: 25th Apr 2006 20:41
Can't wait for it! I wanna learn about 2D but I have problems with..
Sprites, level making, movement, physics, everything so I hope you cover the basics in how to animate Mario and how to make him stop when he hits a pipe etc.

Um...
zenassem
21
Years of Service
User Offline
Joined: 10th Mar 2003
Location: Long Island, NY
Posted: 25th Apr 2006 20:54
Quote: "Sprites, level making, movement, physics, everything so I hope you cover the basics in how to animate Mario and how to make him stop when he hits a pipe etc."


Thanks for letting me know your interest.

Yes it will all be covered. I will go through every single line of the code. I will also explain the theory and how media is handled loaded, arranged. I hold nothing back (except when I don't finish and dissapear for a while ) But this section is small enough for me to finish in a few days, so don't worry.

If I leave out something or is something is vague, please feel free to e-mail me or post a comment in the thread.

Check out my Tutorial in the "2D All The Way" board. It's stickied at the top. That'll give you a good Idea of how I explain things. That tutorial still needs to be finished, but this will fit in nicely as a example of all that was discussed prior to the a map making utility.
Saikoro
21
Years of Service
User Offline
Joined: 6th Oct 2003
Location: California
Posted: 26th Apr 2006 04:10
Very interesting stuff you've got going on, I've always been interested in 2D but never got off (or rather sat down on) my rump long enough to make one, and I'm very interested in this tutorial now Great work it seems so far!

"One World, One Web, One Program" -Microsoft ad.
"Ein Volk, Ein Reich, Ein Führer"(One People, One Kingdom, One Leader)-Adolf Hitler.
First Person Shooters
18
Years of Service
User Offline
Joined: 23rd Apr 2006
Location: UK
Posted: 27th Apr 2006 13:32
hi i noticed somebody wants to create a simple 2D game, i have thought about this and i used to use a 2D package called "gamemaker" it is unbeatable in 2D capabilities although its 3D platform isnt very good. Thats why i moved up to darkbasic pro because i now want to create an FPS worthy of 3D. if you want to check it out the website is www.gamemaker.nl, i would recomend using that and using DB pro when you have finished. I recomend using DBpro because it offers more than DB and with DBSTK you need experiance with C/C++.

theres a supermario tutorial with gamemaker, maybe you can convert it once you have done it in gamemamker.

if interested check it out, if not am sure you will find a way in gamemaker just bogged down in programming if u do it using DB.
Dextro
19
Years of Service
User Offline
Joined: 26th Feb 2005
Location:
Posted: 29th Apr 2006 21:58
So... when is the tut coming out?
zenassem
21
Years of Service
User Offline
Joined: 10th Mar 2003
Location: Long Island, NY
Posted: 29th Apr 2006 22:51
Very soon. I am trying to clean up some of the code, as I had a harder time with the movement then most other games I have done. On the surface Mario looks easy, but then as I got further in I had a coding dilema and had to start changing things. Some issues I'm still trying to work out and I may ask for help if I can't figure out a cleaner solution this weekend.

The issue: My movement code originally was for and old school RPG. Mario's movement is more advanced; given the fact that he can jump different heights depending on how long the button is pressed, and you also have some movement capabilty while in the air (right, left drift), while jumping and falling. So I had to take in account marios state and when detecting button presses. For example he can walk right, run right, drift right while jumping, and drift right while falling. All of this has to be calculated each loop, so my code can't get hung up in a loop or else the screen won't refresh smoothly. For this reason I have a lot more conditions and flags that have to set and reset. Hence , More logic than I originally anticipated. I also had some trouble with my timers.

But don't fear, I just had to change my approach and that has taken some time.


I have most of it figured out.
Dextro
19
Years of Service
User Offline
Joined: 26th Feb 2005
Location:
Posted: 29th Apr 2006 23:09
Uhm...
I coded something like this once, and as I remember, what i did is that in each sync, I would check if the guy is jumping
(jumpstate = 1), if it is jumping, then I would check if the jumping key is being pressed, if not, then gravity would do it's job. Esle, keep substracting from the Y value of the sprite until max height is reached.


But then, I'm a terrible coder.
zenassem
21
Years of Service
User Offline
Joined: 10th Mar 2003
Location: Long Island, NY
Posted: 30th Apr 2006 02:30
Quote: " Uhm...
I coded something like this once, and as I remember, what i did is that in each sync, I would check if the guy is jumping
(jumpstate = 1), if it is jumping, then I would check if the jumping key is being pressed, if not, then gravity would do it's job. Esle, keep substracting from the Y value of the sprite until max height is reached."


That's basically what I am doing now. mixed in with obvious other checks such as crossing a 32 pixel boundary which would move him into the next x tile. And other collision detection code. It gets convaluted pretty fast.

The part that is irking me still is a way to calculate how long the jump button is pressed. We all know mario jumps higher if it is pressed longer than if just tapping fast.

Now at first this seems easy; USE TIMERS and then check. But here's the problem...

1st: The time frame I am using is to small of a fraction to call timer() twice and subtract. It just wouldn't work for me.
2nd: I can't wait until the next passs through the main loop because that's a little too much time.
3rd: The temp solution I am using at the moment is to check for the button press; wait a fraction of time and check if the jump button is still being pressed AND that it hasn't been released in between.

This is working but it's so ugly I just think that there must be a better way.

There must be something more accurate then calling timer() because when I make two calls to it; nearly back to back, I've been getting the same time.

If someone can help me with this I would appreciate it. it's the only thing holding this tut up?

Thanks ~zen
Dextro
19
Years of Service
User Offline
Joined: 26th Feb 2005
Location:
Posted: 30th Apr 2006 03:26
Perhaps using a counter, incrementing it each sync, then check every 5 or 8 syncs if it's still pressed.
zenassem
21
Years of Service
User Offline
Joined: 10th Mar 2003
Location: Long Island, NY
Posted: 30th Apr 2006 04:22
Dextro, I'll try it. I didn't think of doing that although I have used counters in the past. Sometimes the easy solution is the best. Perhaps if I do this and speed up some of my internal loop code, it will work.

Thanks. I've been racking my brain with complex solutions. I'll let you know the results. if I don't like the results I'll post the code, and perhaps you will see other things that I have overlooked.
Dextro
19
Years of Service
User Offline
Joined: 26th Feb 2005
Location:
Posted: 30th Apr 2006 20:37
By the way, is the tut going to be aimed to DBC or DBP?
zenassem
21
Years of Service
User Offline
Joined: 10th Mar 2003
Location: Long Island, NY
Posted: 30th Apr 2006 22:26
I kept it fairly simple so it should work with both. I didn't user defined types or any high level command yet, so it should work with DBC. I own both, I just have to reinstall DBC to check it.

One thing that I might have to change for DBC is the transparent color of the sprites. if i remember correclty DBC has to use black as transparent and doesn't have the colorkey command. if so I will have to chenge the black to rgb(11,11,11) and in the media. right now I am using rgb (0,255,0) as the transparent color for pro.

the only other issue i anticipate is syncing quirks.
RUCCUS
19
Years of Service
User Offline
Joined: 11th Dec 2004
Location: Canada
Posted: 1st May 2006 03:32
It sounds like you're going at this with a complex method when there seems to be a simple solution. Though Im no pro at 2D, the thoery should still work.

- Store the starting y position
- Using a while loop, as long as the jump key is being pressed and the user is below the stored y position + some maximum height value, move the user up.
- For drifting, keep the movement code that you use for land movement, but just add something like *Drift# at the end of the left and right movement. This way, when the user is on land make Drift# = 1, so there's no difference, but for example when the user is jumping (using a basic "state" variable to determine this), set Drift# to something like 0.5 or 0.1, giving the effect that the user moves slower in air than on ground.

Ofcourse if you're looking for physics implementation it's fairly easy. Just modify the value that the user moves up at every loop, starting out high and then decreasing. The same goes for drifting, if you want the user to be able to drift faster when beginning the jump than at the end, set the Drift# value to 1 to begin with, and then slowly decrease it until it reaches 0 (as giving it a negative value would move the user in the wrong direction)

- Finally, when the user lands reset the Drift#, State and JumpSpeed# variables for the next jump.


- Oh, and when the jump key is released you need to do two things. Increase the rate that the jump speed decreases at, and disallow the user to make any further alterations to the jumping until the user lands.

There's one other concideration. You might want to change this routine so that as long as the user holds down the jump button, mario moves up at a constant rate. And once the button is released, then the physics kick in. Not much difference but this increases the effect of the user having full control over how fast mario jumps; as the longer they hold it, the quicker mario will get to the peak of the jump.

- RUC'

zenassem
21
Years of Service
User Offline
Joined: 10th Mar 2003
Location: Long Island, NY
Posted: 1st May 2006 22:48
Ruccus, I haven't read all of your suggestions but I will. Just the reason why it's complex and I can't just use a while loop is. I can't get hung up in a loop oustide of the main game loop. The screen in 2d tile maps, has to be refreshed every loop. If I now go into a standard while loop sauy for the jumping code, mario will jump, but the screen map willl no longer be updating. Which means mario would be jumping with a black background. That's what makes it little complex.
RUCCUS
19
Years of Service
User Offline
Joined: 11th Dec 2004
Location: Canada
Posted: 1st May 2006 22:56 Edited at: 1st May 2006 22:57
You can incorperate the while loop into your main loop without actually using a while loop and freezing the game up. An example;



While the upkey is pressed, the text "PresseD" is displayed. Otherwise, "Unpressed" is deplayed. You'd just modify this extremely simple system to be IF the user is holding the jump key and less than height, make them go higher, otherwise, make them fall. Ill throw together a 3D version in a few minutes if something doesnt come up.

zenassem
21
Years of Service
User Offline
Joined: 10th Mar 2003
Location: Long Island, NY
Posted: 1st May 2006 23:08 Edited at: 1st May 2006 23:21
Ruccus, That's basically what I am doing. I'll post some of the code, so it will help everyone whjo is trying to help me! =)

Just keep in mind that alot of the code is things I was trying. Some things don't actually have a purpose yet... blah, blah, blah.



I also zeroed out the 2nd collision map to work on the jump code.

In the above snippet I basically gave up on making successive calls to timer() as I was gettting the same result. And right now it hanging in a small wait loop. I have to get rid of that. That's my main problem.
RUCCUS
19
Years of Service
User Offline
Joined: 11th Dec 2004
Location: Canada
Posted: 1st May 2006 23:41


Its pretty well commented, though you're right it was a bit harder than I interpreted . It's not the most efficient code (less variable checks could've been used), but its not too bad either. Only 4 or 5 variables to take into account for.

If you've got any questions just post. Try altering the Speed# and Rate# variable settings (you need to alter this twice in the program
[ once in the default setting and once in the reset part of the code ], and the Dither setting as well.)

Hope it helps,
- RUC'

zenassem
21
Years of Service
User Offline
Joined: 10th Mar 2003
Location: Long Island, NY
Posted: 2nd May 2006 00:03
Thanks Ruccus!!! I am looking over everything now.

I have to go through my code and delete variables and conditions that I no longer need to check for. I'm not the greatest at tidying up code as I work. It will get more comments once I'm sure that everything works. I can also combine check conditions, with some more AND's and Or's but writing it the longway (inefficient) helps me debug unexpected results.

originally the jump code was in it's own subroutine like the other movement code. But I stuck it in the main loop, to do away with a whole bunch of other condition flags.

Thanks for taking a look and giving me help. I'm truly grateful. I'll let you know in a few hours (maybe less) how it worked out.

Saikoro
21
Years of Service
User Offline
Joined: 6th Oct 2003
Location: California
Posted: 2nd May 2006 00:18
Quote: "- For drifting, keep the movement code that you use for land movement, but just add something like *Drift# at the end of the left and right movement. This way, when the user is on land make Drift# = 1, so there's no difference, but for example when the user is jumping (using a basic "state" variable to determine this), set Drift# to something like 0.5 or 0.1, giving the effect that the user moves slower in air than on ground."

Wouldn't that cause the user to slow down in mid air? So then you couldn't run jump and maintain your velocity? I'm pretty sure thats how the original Mario games were designed... it made it feel more fluid that way.

"One World, One Web, One Program" -Microsoft ad.
"Ein Volk, Ein Reich, Ein Führer"(One People, One Kingdom, One Leader)-Adolf Hitler.
RUCCUS
19
Years of Service
User Offline
Joined: 11th Dec 2004
Location: Canada
Posted: 2nd May 2006 00:26 Edited at: 2nd May 2006 00:28
Glad I could help

<EDIT>

Yeah, I was mentioning to use that method if he was looking for realism. I forgot how the old mario games played but now that you mention it I do remember there being no slow-down on the X axis. Nevermind that bit then, it was just a suggestion.

Saikoro
21
Years of Service
User Offline
Joined: 6th Oct 2003
Location: California
Posted: 2nd May 2006 01:34
Oh, nonetheless it could be helpful for anyone happening by this tutorial thread who would like realism in their 2D side scroller. Great work on that end

"One World, One Web, One Program" -Microsoft ad.
"Ein Volk, Ein Reich, Ein Führer"(One People, One Kingdom, One Leader)-Adolf Hitler.
zenassem
21
Years of Service
User Offline
Joined: 10th Mar 2003
Location: Long Island, NY
Posted: 4th May 2006 17:41
I'm still having a little difficulty getting all the input code to wrok properly. LOL. I honestly didn't anticipate this. It seems with my current input handler design no matter what I do, the code gets real ugly and bug prone.

This is a problem in my original input handler design as it makes it way to complex to handle what simply needs to take place. By adding tons of checks I'm just making bad code design worse.

I will have to redesign the input handler and simplify it's roll. Basically it should just pass a state after all input has been processed. So while I am redesigning the input handler, I will move foward with laying out the other elements of the game design for the tutorial. By the that time I should have everything worked out with the input handler.

thanks
~zen
RUCCUS
19
Years of Service
User Offline
Joined: 11th Dec 2004
Location: Canada
Posted: 4th May 2006 19:21
If by "states" you mean determing if the user is moving, jumping, etc, you can always use basic distance routines. If the user's x is greater or less than the user's old x by a given value, the they're moving. If the user's y is greater than the users old y, they're jumping. If it's less, they're falling.

Unless I have the wrong idea of what you mean by "input handler", it shouldn't be too hard.

Dextro
19
Years of Service
User Offline
Joined: 26th Feb 2005
Location:
Posted: 4th May 2006 19:43
Kind of a lame solution for the jumping problem:

Hope this helps a bit. Can't wait for the tut.
zenassem
21
Years of Service
User Offline
Joined: 10th Mar 2003
Location: Long Island, NY
Posted: 4th May 2006 20:53 Edited at: 4th May 2006 21:12


OMG! Dextro, I just traced thorugh your code, and I believe you nailed it. At first I thought that you didn't take into account that the program flow must constantly go through the main loop every time. But then I saw you did.

I honestly didn't think about using a goto, as I have avoided them ever since I first learned basic back in 1984 (mainly because of line numbering) and the dreaded speghetti code. But in this circumstance it works, and it's streamlined.

I couldn't figure out how to get around the if spacekey()=0 condition. And no matter what I did, or how many conditions I used, I would block part of the code somewhere from being able to run; under some condition.

You see, the part of the code after if spacekey()=0, needs to sometimes run even though spacekey()=1. But, it definately needs to execute when spacekey()=0. I just kept going in circles trying to resolve the logic. And I just didn't know how to explain that. My brain just wouldn't allow me to resolve the fact of running code under a condtion that isn't exactly true.

It is so simple that I still can't believe that it may work. I'll have to check it tonight. You're Genius!!!

----
Thanks Ruccus,

Yeah you nailed exactly what I meant. Just creating a finite state machine, so to speak. As you said, it shouldn't be too hard. I would just need to get rid of my current lame input routines. But you got the idea. I may still try to implement this. Just to see which method works better. Dextro, figured out my logic problem with a simple goto. My brain was just too locked-inside-the-box.
Dextro
19
Years of Service
User Offline
Joined: 26th Feb 2005
Location:
Posted: 4th May 2006 23:53
In the "starty = sprite y(mario)" you might put it in a condition, i.e:
if collision(mario, x) = 1 then starty = sprite y(mario)

If not, starty will be whatever y position mario is, even if he's jumping.
zenassem
21
Years of Service
User Offline
Joined: 10th Mar 2003
Location: Long Island, NY
Posted: 5th May 2006 04:26 Edited at: 5th May 2006 04:32
Thanks everyone for your help. I finally got things worked out. Basically my main problem came down to multiple and's and or's on the same line. I guess I need to learn how to group them properly. I will be making some adjustments that dextro suggested. So thanks agin dextro. I will also be naming things more properly such as velocity, and acceleration. But here are the snipets that worked for me. (I still have to asjust some of the numbers but at least the logic works.

here is the input subroutine that gets called from the main loop every loop cycle:



this is chupmov: subroutine that determines small jump or high jump



and finally the remaining jumping and falling code that is in the main loop.



All of this to..
1. Jump only if the player is not already jumping; and that the player isn't falling.
2. Check to see if the jump is pressed for a longer duration which results in a higher jump.
3. Process the jump, follow with the fall.
4. Prevent the player from multiple jumps from just holding the control key. make sure key is released before next jump
5. Update player pixel location of sprite.
6. Update World Location if sprite is moved across a 32 pixel boundary. Update the player to the corresponding grid location.

(The grid location is a little different than the world location. I had to set up this inner grid because mario actually moves inside this location. But when he reaches the limit or boundary of this imaginary grid, the background moves behind him while mario animated in place.)

Phew. That was a mouth full

So things are looking up now. And I can finally move on. After I'm done a may revisit this section of code, just to take on the challenge of making it smoother.

=======
BTW

If someone has some tips on how to properly group AND's and OR's in an If Statement (meaning 2 or more AND's mixed with an OR), please share. I wasn't getting what I expected. The condition would happen if only the OR was met. But what I wanted was....

if (this1=something and this2=something) and (this<>something or this=something)

Notice my gouping. If I need to make it clearer please ask.

Thanx
~zen
RUCCUS
19
Years of Service
User Offline
Joined: 11th Dec 2004
Location: Canada
Posted: 5th May 2006 04:40
It'd be written like this;



For some reason I've not tried grouping booleans in brackets for checks in DBP, yet I do it all the time in Javascript... Im not sure if DBP accepts multiple booleans like that using brackets, but like I said I've never tried... Interesting...

zenassem
21
Years of Service
User Offline
Joined: 10th Mar 2003
Location: Long Island, NY
Posted: 5th May 2006 04:47 Edited at: 5th May 2006 04:51
Thanks ruccus. You have been more than helpful as well. I like the your method, and I feel foolish for not thinking of it. It will cause me less headaches in the future.

I also just got what you meant by using distances. Pretty clever. The only reason I didn't comment on it earlier, is because I didn't fully grasp it.

I still wonder if DBPro is suppose to recognize gouped AND's and OR's. When I get some time (after I'm done with this project) I'll write a progam that checks to see if the brackets work. For some reason It didn't seem to have any effect. But I could be getting a bit dillusional changing so many conditions. Even in the above snipets I'm not making use of pressed any longer.
Dextro
19
Years of Service
User Offline
Joined: 26th Feb 2005
Location:
Posted: 8th May 2006 20:13 Edited at: 8th May 2006 20:15
I adapted this bit of code from various other posts, which increments the jump distance by 32 pixels the longer you press the spacebar.
But, I'm still having problems with it; it is supposed the longer you press the spacebar, the higher it jumps, thus the distance travelled on the x axis should be greater, but it's not.
In my code, the higher you jump, the more gravity is applied to the sprite, less distance travelled; the shorter the jump, less gravity so more distance travelled.
Perhaps you coudl use it, since it's more simple than having 3 functions to validate a single jump; if you manage to fix it.
zenassem
21
Years of Service
User Offline
Joined: 10th Mar 2003
Location: Long Island, NY
Posted: 8th May 2006 20:44
Thanks Dextro. I'll have a look at it tonight. I finally loaded up Super Mario Brother's yesterday, And I saw some mistakes that I made regarding movement. For instance in my code, if mario colides with a pipe, I prevent him from running and set the animation to still. In the actual game you stay running in place. I also forgot that b makes you run faster.

As I posted in the 2d board, I had goofed up making a sin jump, but later I found some code in the codebase. I'll try to see if I can implement yours into my code. Because I do believe that there aren't just two jump heights but rather an analog type jump, dependent on how long the button is pressed.

Thanks again for your help.
zenassem
21
Years of Service
User Offline
Joined: 10th Mar 2003
Location: Long Island, NY
Posted: 10th May 2006 06:37
Update:
ok, I have finally worked out all the moving code and collision code (while I was working on other sections). I just seemed to fix one small error, only to find another.... then another.

So now the question is...

Should I officially start tutorial and discussing the codeat this point, or should I wait till everything is complete? (my main goal is to have one level of Super Mario Bro's complete)

(Eventually I will move away from the handcoded levels, triggers, and hard coded AI. To a tool based creation system. And update the graphics and finish the entire game with added content)



Here are the pros and cons of starting now:
Pros:

1) If I start now, it may be easier for people to follow before things start getting really complex.

2) People will have a chance to mull over the code, and I can get feedback before moving on. Especially if what I am doing doesn't make sense, or perhaps an error will be caught by someone other than just myself.

3) The wait time will be significantly less, and will allow people to experiment now on their own, Rather than waiting for everything to be done.

Cons:
1) People may not want to start and then wait for updates to the code, or the may lose interest.

2) I am sure that I can refine what I have a bit further, and some things may need to change as I get further in.
Cryptoman
21
Years of Service
User Offline
Joined: 24th Nov 2003
Location: Utah Mountains
Posted: 10th May 2006 21:24
That is quite an undertaking, as it was the greatest game of its time.

It took 8 guys 1 year to make it, although you can cut the design out,

Super Mario Bros is much more complicated than expected, and may be a long while before its in tutorial state.

I'd wait to see if you can finish the entire game first.

No offense intended.


zenassem
21
Years of Service
User Offline
Joined: 10th Mar 2003
Location: Long Island, NY
Posted: 10th May 2006 21:39
Well for the tutorial I was planning on only completing one level. But as most of you probably know that in this type a game, you pretty much have to code all of the logic to have 1 level working. The rest is just creating the maps, and such.

The full game will be for my own undertaking and I will release all of the code when I'm done. For that, I will create a map making tool, that includes triggers and emey AI. For this tutorial everything is handcoded.

Thanks for your advice.
Dextro
19
Years of Service
User Offline
Joined: 26th Feb 2005
Location:
Posted: 11th May 2006 01:25
I would say, release it now.
I have an easier time following tutorials by parts rather than a huge post.
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 13th May 2006 00:01
Hey zen, nice comeback ...

I saw that code with the goto in
Jumping into an out of nested code should be punishable by death!

You should use a variable to control this instead:


I've not tested this code, but it looks right, and is simpler too. Although there doesn't seem to be a use for the 'jumping' variable, I've left it in just in case there's something you're doing with it elsewhere.

For free Plug-ins and source code http://www.matrix1.demon.co.uk
zenassem
21
Years of Service
User Offline
Joined: 10th Mar 2003
Location: Long Island, NY
Posted: 15th May 2006 20:48
Thanks IanM,

I hat using goto's as well. But I ran into another part of the code where I can't seem to figure out how to do without it. When the player is jumping and collides with a brick, I have it break out of the jumping code and GOTO the falling code. I'll post the code later today (as I am not on my computer right now).

I keep coding small but annoying problems for myself. As you will see a bit later today. I had to correct some problems in my jumping routine as it wasn't accurately reporting the PWLocy.

I would appreciate someone taking a look at it. I'll post the code at a little after 2:00pm

Thanks
jawchild
18
Years of Service
User Offline
Joined: 13th May 2006
Location:
Posted: 15th May 2006 21:29
This sounds awesome!!! I'm very eager to look through this tutorial.
zenassem
21
Years of Service
User Offline
Joined: 10th Mar 2003
Location: Long Island, NY
Posted: 16th May 2006 16:41
Here's the rough code so far. Mind you it's not exactly working in this state, and I still have to clean things up (ie add a variable for gravity rather than calculating each loop). You'll see where I use a goto in the main loop, if a collision occurs while jumping. Also use a goto to stopfall: if a collision happens while falling. I'll definately need to fix this.
Cryptoman
21
Years of Service
User Offline
Joined: 24th Nov 2003
Location: Utah Mountains
Posted: 6th Jun 2006 05:50
Any updates?


Login to post a reply

Server time is: 2024-11-27 17:40:15
Your offset time is: 2024-11-27 17:40:15