LoginLogin

BOXTEST

Root / Submissions / [.]

LeminWedjCreated:
Download:4DH3R4R3
Version:3.2.1Size:
This is an endeavour that I dived into as my first real project. Itโ€™s intended to be a 2D platformer test, but as of the current moment this is all I got. Thereโ€™s 7 versions:
  • BOXTEST
  • BOXTESTV2
  • BOXTESTV2.5
  • BOXTESTV3
  • BOXTESTV3.1
  • BOXTESTV3.2
  • BOXTESTV3.2.1
As it stands right now I could actually use some help with collision detection. If anybody has any ideas, feel free to throw them out. As it stands right now this project is on hiatus until I get a big man brain. โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€” 3.2.1 HOTFIX - Found a typo in two variables, causing wall detection to not work - Fixed a debug GLINE function

Instructions:

A-JUMP DPAD-MOVE AROUND Hold SELECT to exit any program easily.

Feel free to look at my code to Find the Exit for inspiration. You should be able to use just one hitbox for collision detection against the top, left, right, and bottom edges. I like to make a separate function to see how far the player can move each direction. I also separate the tests so checking left or right then up or down clipping on any collision. The pictures look nice, I should download it and see if I can find anything I can help with.

Replying to:seggiepants
Feel free to look at my code to Find the Exit for inspiration. You should be able to use just one hitbox for collision detection against the top, left, right, and bottom edges. I like to make a separate function to see how far the player can move each direction. I also separate the tests so checking left or right then up or down clipping on any collision. The pictures look nice, I should download it and see if I can find anything I can help with.
Thanks! I'll take a look at your code later for some help.

I found a few bugs. You are missing a routine for collision on the right side which let's you walk through walls. You don't check if the player has hit the ground before letting them jump again which allows continuous jumping which crashes things when you exit the top of the screen You can hang in midair if you are jumping left against a wall. The worst one, if you let the program run for about ten minutes you get a stack overflow in a random unrelated part of the code. This is because you are using GOTO. If you need help using functions or loops let me know and I can write something up for you. You are GOSUBing a routine to show the player Sprite which instead of RETURNing, it does a GOTO your game loop instead. This eats up a little bit of memory every time through your game loop until everything crashes. Watch as the haters call me names for saying GOTO is bad now.