Combining Adventure and Platform

Tishero

New member
As of right now, is there a way to combine the adventure module and the platform module like how Blaster Master uses both, or like Super Mario Bros. 3 has the map selection screen?
 

chronosv2

New member
I'm fairly certain there's not enough space in the Static Bank for both sets of code. Fitting two engines into a game might be possible with 4.1.0 but no matter how you cut it it's going to be an extremely difficult thing to achieve.
 

jorotroid

Member
If you asking if there is a way to do it just through NESmaker, no. If your asking if it would be possible to modify the asm to have the functionality of both a platformer and an overhead game, yeah, I think that is doable. The main difference is in the physics script. There is some overlap between the two and for the differences you could have game states that tell it to run as a platformer or as and overhead game. But you will have have to do a decent amount of coding to get it to work. If you are at the level of being able to code it, I think you could also be at the level to cut other aspects of the engine to make room if needed. Also it would probably be prudent to point out that you would have to divide up your graphical resources between the two modes.
 

Knietfeld

Member
I combined the adventure game physics and the platformer game physics. I'll just cut and paste some stuff I said in another post about all of this.



"I have bats in my platformer and I wanted them to fly around in 8 directions but they only flew left and right. It turns out, when they modified the Adventure Game Physics code to work for a simple platformer they completely removed the code that checks for vertical movement. I cut and pasted code from Adventure_Physics and optimized it a bunch so it wouldn't be too big but still do everything that both physics routines do. It is bigger than the original script still.

I've attached that ASM file as well as my condensed Adventure Physics routine if anyone wants to save a little space in their adventure game.

I suggest unzipping the file into whateverYouNamedYourNESMakerFolder\Routines\UserScripts, that way it's close to the scripts NESMaker is already using for physics, or you can move them wherever you like from there.

To use either of these physics scripts you'll need to add a couple variables to whateverYouNamedYourNESMakerFolder\Routines\Variables\ObjectsBytesRam.asm. That script has all the variables that have to do with Objects, including vertical and horizontal speed. You can just cut and paste

Object_t_speed_lo .dsb 1 ;; for KN physics
Object_t_speed_hi .dsb 1 ;; for KN physics

to lines 19 and 20. They are temporary variables my code uses for both vertical and horizontal speed (the t stands for temporary), and the variables for each Object's speed are in lines 15-18.

All you need to do after that is open Projects Settings in NESMaker, Click on the "Script Settings" tab and replace the very top line, Physics, with the file you just unpackd in UserScripts."


With this code, if you want an object to move around like an adventure game, just check the ignore gravity box in the Actions tab in Object Details. I don't know exactly how you'd make one object (especially the player character) move around using both physics, but there's probably a workaround. Hopefully this can help you out a little though.

If I didn't explain that well enough, just ask any questions you have and I'll try to answer.
 

Attachments

  • KNPhysics.zip
    8.4 KB · Views: 90
Top Bottom