Goomba4K

No, but that one’s fun too… been a long time since I played it though. :smiley:
Might try that as well, if you’re not doing it :>

My suggestion if that bug DOES turn out to be a matter of mario falling down fast and the goomba moving up fast, then simply run the logic code twice at half the speed :slight_smile: I’m sure frame rate isn’t an issue here so you could effectively double your accuracy without changing the game speed. Or you could triple it or quadruple it… whatever you find best :slight_smile: That way you don’t need any crazy code for advanced collision detection/handling.

A better idea is to simply add a terminal velocity. All the Mario Bros. games had a terminal velocity. Which was a good thing, because otherwise you would have hit the ground like a screaming meteorite.

terminal meaning like maximum velocity? this could work if I cap it at 30pixels a frame… it would never go through a goomba this way … unless, of course, the goomba is bouncing UP towards you :stuck_out_tongue_winking_eye:

[quote=“woogley,post:44,topic:26031”]
Correct. Terminal Velocity is the speed at which air resistence overcomes your acceleration due to gravity. For human beings skydiving, this is about 200 MPH. (That’s about 321 kph for you limeys.) In video games it can be whatever feels about right. :slight_smile:

OK I have confirmed there’s definitely a collision detection bug somewhere, aside from the one where if you fall just way too fast you go through them.

I was playing earlier and after a single bounce, regular height, I came down on top of a goomba and lost. I ignored it at first figuring something rational must have happened.

Then it happened again, and this time I was CONFIDENT I really hit the goomba because he wasn’t going that fast and I didn’t come from very high.

Then a 3rd time, there was a pile of honestly 3 goombas, and this was after a single bounce so I was coming from the default lowest height and I landed square in the middle of this pile of 3, and I lost. No way was I off on that one. I might believe I messed up on the first couple times, but that one I know I really hit.

Aside from that, 29 is my best score :slight_smile:

Oh and to help fix the terminal velocity bug: If you keep Mario’s height above like >= 0, and you find that when he’s hit 0, you check for collisions. If he’s hitting a Goomba, set him back up. If he genuinely hit the ground, then continue on to the Game Over screen. I imagine the bug is occuring because you allow Mario to get somewhere at like a height less than -spriteImage.getHeight() :slight_smile: Meaning the rectangle check will fail because you fell too far below too fast. If you add:
if (sprite[0].height < 0)
sprite[0].height = 0;
before you check for those collisions and end game logic I think you could solve most of these problems.

I still can’t produce any of the errors any of you are getting, I’m actually not convinced I even need to implement terminal velocity.

there is one way to make sure. can you reproduce any of the errors on this Test jar? (may be CPU intensive) - http://javaunlimited.net/goomba4k/Test.jar

that is the very same game (no modifications) except that there are 500 goombas rather than 15. you pretty much can’t even hit the ground if you wanted to. see if you can reproduce the errors with that… I got mario way above the screen and I still landed on a goomba successfully

Couldnt reproduce the glitch it it that version. Btw it runs with about the same speed as the first verions :slight_smile:

Whats nice is that you can bounce of the walls, which effectively means that you can quickly change the direction. Havent noticed that before.

Woogley, you have a PM in your inbox. :slight_smile:

I played your test jar. I died with a score of 13. There was certainly no empty space to fall through… let me try again…

Yup died at 12 this time, right smack in the middle of the screen. Trying again…

3rd try didn’t happen, got up to 180 and suicided…

Nope, can’t make it do it again. Hmm! Interesting results. It certainly happened at least twice, and not at the edge so no issue of missles hitting me.

[quote]see if you can reproduce the errors with that…
[/quote]
I could reproduce them, I got the score 8 on my first run. I left Mario bunching up and down on the spot, not a single left/right key press. And there were Goombas convering the entire ground so he shouldn’t have slipped through.

okay, I need your help figuring out what bug this is, because I cant reproduce it. there is now an ‘autopsy’ version of the Test.jar that tells you how mario died rather than what your score is. this should help me figure out where the bug is. give it a try! http://javaunlimited.net/goomba4k/Autopsy.jar

also, a new key is enabled: enter. this performs a VERY high jump just to prove that terminal velocity isnt needed (you couldnt bounce on goombas enough to get as high as pressing that enter key). you can only press the key when mario is falling down (you cant press it if his veritcal direction is already upwards)

so reproduce the bugs and tell me what the cause of death is! :smiley:

thanks for any help :slight_smile:

I just reproduced the problem. Cause of death was “Crashed into ground”. What I did was hold down the Enter key for about 2.5 seconds. Then I let go and crashed into the ground. It may take one or two attempts, but it is easy to reproduce.

Windows XP Pro
Pentium 4 Hyperthreaded 3GHz
1GB of Memory

holding down the enter key isnt a bug, you can never get that high under normal circumstances ;). If you tap the enter key he goes WAY above the window and crashes down without death

the bug Im looking for is the random death when you’re around a group of goombas (I think Malokhan was the one who had that)

Well, just print the maximum velocity value somewhere. If its bigger than the height of both boxes together, you can warp through. (Alternatively you could just do the math.)

thats fine but that isnt really the ‘bug’ im worried about, malokhan and a few others were dieing randomly at like 3 or 4 points at normal jump heights. Im trying to figure out if there’s some bullet that’s not being drawn or… something

Ah, sorry. Well, there is something wrong with the collision detection. I wasn’t very high at all (just a normal jump, not even a hit off a mid-air goomba) and I managed to die. Cause of death was “Crashed into the ground”. I haven’t been able to reproduce it yet, but I was jumping toward the left and landed about 1/3 into the playing field.

It would probably help if your diagnostic versions just froze the game rather than switching to the death text. That way we could take screenshots and figure out what’s going on.

good idea, screen now freezes (clouds dont freeze but hey whatever).

also mario’s velocity is printed just for kicks and giggles :slight_smile:

edit: the link again: http://javaunlimited.net/goomba4k/Autopsy.jar

http://kaioa.com/k/goomba.png

shrug

I know what it is, and why it appears to only happen when you’re in a “group of goombas”

try to follow this. during the collision detection, when mario intersects with anything no matter what the outcome, the collision loop breaks (allowing only one collision per update). also, you only bounce off of a goomba when your feet are at least half way higher than the goomba. so, if you’re falling with a goomba thats falling (but is too far above you for you to bounce), then thats a collision with no results - but it still counts as a collision. so, if that falling goomba is checked before the ground goombas (which depends on the position in the array), then the goombas on the ground never get checked for collision, so he just falls right to the ground :slight_smile:

yes, I figured that much out from oNyx’s screenshot.