Jump to content
IGNORED

Doodle Jump INTV


Recommended Posts

As a matter of fact, most game physics can be abstracted to the following:

a = f(...)     ' Compute new acceleration
v = v + a      ' Update velocity by adding acceleration
x = x + v;     ' Update position by adding velocity

The magic is in the function f(...), which is different for each type of physical effect you wish to accomplish. For parabolic jump arcs, the function basically returns the acceleration due to gravity as a constant.

 

-dZ.

Link to comment
Share on other sites

I tried to put the code in but the stupid problem of the high/low jumps returned.

 

I am trying to help as best I can. I am not an IntyBASIC programmer and I am trying to figure out your code. Maybe some of the other IntyBASIC experts can help?

 

Perhaps you should post this in the IntyBASIC Contest thread to get some attention from the programmers... It can't hurt. You got two weeks to go. ;)

 

-dZ.

Link to comment
Share on other sites

I downloaded the code, but I don't really know what to look for, plus that it is always hard to follow someone else's code, in particular one that is very sparsely commented. Is the problem about the fact you can jump upwards through several clouds at a time before stopping, or something else? I think the gravity is fairly OK.

Link to comment
Share on other sites

I downloaded the code, but I don't really know what to look for, plus that it is always hard to follow someone else's code, in particular one that is very sparsely commented. Is the problem about the fact you can jump upwards through several clouds at a time before stopping, or something else? I think the gravity is fairly OK.

 

The problem was that on the first bounce on a platform the jump was fine, but on every subsequent bounce on the same platform, the jump got arrested before reaching full height (and decelerating to zero). It looked strange. I then suggested that he should simplify his jumping code (which appears to be a strange state machine with many variables) by using a simple gravity simulation.

 

However, I just tried revision #21 and that seems to have been fixed, so the jumping feels more natural. (YAY!) I haven't looked at the new code, but will do later.

 

There are now a few issues that crept up. I hope they are must minor things and easy to fix:

  • When the UpMonster touches a platform (even while in the air mid-jump), the jump velocity is reset to zero, causing him to soar higher and higher as he keeps going through platforms. I think you should only bounce when going down; going up should just go through the platforms. The net effect should be that you jump up through a platform and then, as you go down, you bounce on it when you touch land.
  • I can't seem to restart the game when I die now.
  • Sometimes, when the UpMonster falls through the bottom edge of the screen, he flickers at the top of the screen briefly (rollover). You may need to review your boundary detection or position ranges.
  • The platforms are too thick. I think they looked better the last time around (but that's just my preference).
  • The jump rate seems a bit.
  • I wonder if the width of the jumping area could use one more column... ;)

 

On the first item, if you are using a gravity simulation, then it's a matter of checking the sign of the vertical velocity: positive means going down, negative means going up. You only want to reset your jump velocity when the UpMonster collides with a platform and vertical velocity is negative.

 

Other than that, it's looking even better than before!

 

-dZ.

Link to comment
Share on other sites

I don't get Y positioning. Can someone explain it? What is the greatest number a Y position value can have? 255? If so then why does the upmonster appear mid way through the screen if he dies before leaving it? I'm not getting something here (line 297 is specificially what I'm having trouble with.)

dj22.zip

Link to comment
Share on other sites

I believe you are rolling over the maximum limit, i.e. an unsigned 8-bit variable will hold values 0-255 but if you have 255+10 you get 9 instead of an error. Perhaps adding some checks so jumpingthingy is within desired boundaries after VY is added would improve things?

 

 

VY=255
 
...
if jumpingthingy>140 then jumpingthingy=VY+1
if jumpingthingy<120 then jumpingthingy=jumpingthingy+VY 
VY=VY+gravity
Link to comment
Share on other sites

I don't get Y positioning. Can someone explain it? What is the greatest number a Y position value can have? 255? If so then why does the upmonster appear mid way through the screen if he dies before leaving it? I'm not getting something here (line 297 is specificially what I'm having trouble with.)

Because when the y position is over 128, $80, then the sprite is 16 pixel high card. So 0-128 range is safe for 8 pixel high card.

 

 

if jumpingthingy>100 and jumpingthingy<127 then jumpingthingy=201 : jumpingthingx=0 : gameover=1 : SOUND 0,1,0 

May work.

Edited by Kiwi
  • Like 1
Link to comment
Share on other sites

I don't get Y positioning. Can someone explain it? What is the greatest number a Y position value can have? 255? If so then why does the upmonster appear mid way through the screen if he dies before leaving it? I'm not getting something here (line 297 is specificially what I'm having trouble with.)

The Y register position field goes from 0 to 127, but the actual MOB can only move within the effective object area. What is the "effective object area"? It's essentially the visible screen plus an extra 8 pixels above and to the left of it.

 

The extra column and row are not part of the visible screen, but they are what allow you to position a MOB outside the screen and have it transition smoothly into view, one pixel at a time.

 

So, the effective MOB space is the size of the screen plus an extra row and column above and to the left, meaning that it's 21 columns x 13 rows x 8 pixels.

 

That means that the effective vertical MOB space, the actual range of the Y position, is 13 x 8 pixels = 104.

 

Y = 0: The MOB is above the screen, on the "hidden" row.

Y = 104: The MOB is at the bottom of the screen, already out of it.

 

Values greater than 104 and up to 127 are still valid, but they are not anywhere visible. Values greater than 127 will overflow the position field in the Y register and affect other bits, like the vertical resolution and size fields.

 

Does that help?

 

dZ.

Link to comment
Share on other sites

New Version.

Tell me what you think.

 

 

It feels much better. Here's my feedback on this version:

  • The jump feels more natural now.
  • There is still the two-size jump issue (first bounce is high, and all other bounces are lower), but they don't bother now that the rest of the jump physics are more natural.
  • The horizontal space seems right. The UpMonster does not get claustrophobic in a tight space any more. :thumbsup:
  • The platforms look like cute puffy clouds, and I like them now.
  • The jump sound effect is too long and can get annoying after a while. It is not too bad, though, so if you can't come up with something significantly better, leave it in.
  • There is still the issue of the vertical velocity resetting when you touch a cloud while going up. Like I mentioned before, try to only register the collision with the platform only when the UpMonster is going down.
  • Personally, I think that the horizontal velocity may be a tad too fast, but I'm not sure. Perhaps it is necessary in order to be able to reach from one side to the other. It's up to you.
  • Since the UpMonster starts the game bouncing already, you may want to give the player time to get ready by displaying a message like in Pac-Man (or Christmas Carol) alerting the player that the game is about to start. You can give him 2 or three seconds. This is most critical for the two-player game, which starts the carnage immediately.
  • And, by the way, kudos for the two-player game. That seems like a nice addition.

 

To me, the remaining issues are the jump sound effect and the upwards jump reset. Everything after that is just icing on the cake. :)

 

Among the various things you can start considering for additional enhancements, are (some of these have been shamelessly ripped off from DoodleJump):

  • A special cloud that makes DoodleJumper UpMonster jump very, very high, scrolling upwards for extra points.
  • Clouds that move horizontally.
  • Something that gives invincibility against the angry bird-o'-dactyl, or allows you to kill him.
  • Clouds that affect your jump in various ways.

 

Congratulations, Chris! The game is looking very good. You have turned it from a silly, cute but awkward experiment, into a full-fledge interesting game, with charm and addictive quality. There are still ways to go to make it a great game, but right now it's already playable and enjoyable; and for those of us who played DoodleJump for long stretches like if it were crack, it is very reminiscing of it. :)

 

Keep it up, there's two more weeks till the end of the contest! :thumbsup:

 

-dZ.

Edited by DZ-Jay
Link to comment
Share on other sites

I finally found out what was causing the high/low jumps. It was the scrolling upwards code and not the jumping code after all. So I tried to fix it. This is my first attempt. What do you think?

 

 

Yeah, much better! Now the jump is of a single size all the time and feels more natural. Here's my current high score:

 

post-27318-0-82956500-1531904879.gif

 

Some feedback:

  • The jumping mechanic feels fine now. Congratulations! I know it was hard and frustrating to get it to this point, but you got it now!!! :thumbsup:
  • The jumping sound is still a bit too long, and the longer I play, the more annoying it gets. You may want to tweak it a little.
  • It seems that you reset the jump when a collision is registered when the vertical velocity reaches zero, and not only when actually falling. In other words, if the UpMonster is going up in his jump, as soon as he reaches the apex (but before he starts going down), if a platform is underneath, he continues his jump upwards. This is not too bad, but it is still is a little odd. If you can fix it, I would recommend to register collisions only when actually falling (moving downwards).
  • Bug Alert!
    • Even after the UpMonster dies, the bird-o'-dactyl timer still can kick in.
    • Also, at one point, as soon as I died, the bird-o'-dactyl chirp started but was arrested mid-way and got stuck in a high-pitch screech for a second or two. There may be a race condition there.
  • Need a "Game Over" message.
  • Need a way to count lives or tries.
  • Need a goal. In DoodleJump, the goal is to finish a discrete level and unlock the next one, since levels were pre-defined and finite. In the UpMonster game, since there are no levels and everything is random, what is the motivation to continue playing? Higher score helps, but there could be more. Here are some ideas:
    • Timer (this is the easy cop-out; effective, but just plain jane boring).
    • A "cloud counter" to track height, and an UpMonstress waiting for him "at the top." ;)
    • After a certain time, or number of clouds, or quantity of points, etc. a different "level" starts where the platforms behave differently or the scenery changes, or something like that.
    • Come up with a cool story that puts the UpMonster into action.
  • There should be additional challenge at some point. Avoiding the bird is too easy after a while (which is OK, don't make it harder!), and aiming at the platforms horizontally is challenging but can get dull after several seconds. Here are some ideas:
    • When the bird-o'-dactyl is not flying, you could use the MOB for horizontal missiles (like in Jumpman Jr.) or falling debris (like in Beauty And The Beast). Or perhaps you could add a random enemy waiting on a cloud, which the UpMonster must avoid or kill.
    • There could be different kinds of clouds with different hazards or abilities.
  • Play the UpMonster Theme music on the "Game Over" screen.

 

Nice work. I think you're now deep in the "spit-and-polish" phase, so it's time to make your game shine. I'm quite impressed with how the game has turned out so far, but it still has some ways to go in order to become an actual game people will want to re-play more than once. :thumbsup: :thumbsup:

 

Keep it up!

 

-dZ.

  • Like 1
Link to comment
Share on other sites

I like the UpMonstress idea. Perhaps she is kept hostage by some giant, like a combination of the tales of Jack and Beanstalk and good old Donkey Kong. Perhaps there can be something to collect on his way, like bananas to throw on the giant to let him go of the UpMonstress.

  • Like 1
Link to comment
Share on other sites

I like the UpMonstress idea. Perhaps she is kept hostage by some giant, like a combination of the tales of Jack and Beanstalk and good old Donkey Kong. Perhaps there can be something to collect on his way, like bananas to throw on the giant to let him go of the UpMonstress.

 

That's a neat idea. I'm sure atari2600land can come up with something even better. He always has quirky ideas. I do like the idea of an UpMonstress in distress.

Link to comment
Share on other sites

Sure, Chris always has great and unconventional ideas. Perhaps there doesn't even have to be a giant, just that you need to collect fruits to feed the wife. Well, that is assuming that UpMonsters eat fruit. Apparently they're not so much for poultry.

 

:lol: Perhaps UpMonstresses eat slugs. LOL!

Link to comment
Share on other sites

New changes:

+ Title screen - upmonster is now standing on a cloud. Changed the word "upmonster" to yellow to make it more readable.

+ 2P Game - starts with a message to press fire on the first game.

+ 1P Game - added Game over message.

+ both - shortened jumping sound.

 

I am wondering if it's really necessary to have a "press fire" message on the 1p game, since there's only one player, and he wouldn't have pressed fire if he wasn't ready to play anyway.

 

How about this for an idea:

the Upmonster is an alien, and the reason why he's jumping on clouds is because his spaceship crash landed and he's trying to get back to his home planet? Just a thought.

 

 

dj24.rom

Link to comment
Share on other sites

 

How about this for an idea:

the Upmonster is an alien, and the reason why he's jumping on clouds is because his spaceship crash landed and he's trying to get back to his home planet? Just a thought.

 

 

Or if you have distinct levels, then the upmonster could be jumping up to his hovering UFO in the sky and actually need to successfully jump on to it to successfully complete each level?

Link to comment
Share on other sites

New changes:

+ Title screen - upmonster is now standing on a cloud. Changed the word "upmonster" to yellow to make it more readable.

+ 2P Game - starts with a message to press fire on the first game.

+ 1P Game - added Game over message.

+ both - shortened jumping sound.

 

All sounds good! I'll check it out tonight, when I get home.

 

I am wondering if it's really necessary to have a "press fire" message on the 1p game, since there's only one player, and he wouldn't have pressed fire if he wasn't ready to play anyway.

 

I think it would be useful, if only to be consistent in your interface between the 1P and 2P games. That way, in either case, the player knows what to expect.

 

Also, it's always good to give the player a warning. When the player hits the button on the title screen it may no be clear whether the game will start immediately, or just a cut-scene or something.

 

Take a lesson from arcade games of yore: pressing the "Start" button will always either play a jingle, show a countdown or message alerting you when that the action is about to start.

 

How about this for an idea:

the Upmonster is an alien, and the reason why he's jumping on clouds is because his spaceship crash landed and he's trying to get back to his home planet? Just a thought.

 

Sounds great! Now, how about adding something in the game to give that impression?

 

(I still like the idea of the UpMonstress, maybe she's waiting for him on his planet.) :)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...