How to keep collectable tiles from being redrawn when re-entering screen

twin paradox

New member
First off, I am using version NES Maker version 4.1.5. I am using the Simple Platformer module and have everything working pretty much the way I want it so far. My problem is that I am trying to implement a coin system using the "collectable - just for score" script. The script works fine and I am able to collect coins and they are reflected in the hud. The problem is that when I return to the screen, all of the collectable tiles respawn. An obvious work around would be to make coins "game objects", but then I would only be limited to having 4 of them on screen (plus I need monsters, other game objects as well). Also, if I trigger the screen by collecting the "coin objects" then that would break other parts of my game (unlocking doors prematurely, etc).

Long story short, I am wondering if there is a way to have collectable tiles change to another tile type permanently so that it would persist through screen transitions (without triggering the screen).
 

twin paradox

New member
Bucket Mouse said:
I was about to say "you can't do that on the NES" but.....then I thought of Mario 3.

Exactly! I know it is possible on the NES but I guess I'll see whether it'll be possible (or worth the effort) on NESMaker if anyone else chimes in.
 

dale_coop

Moderator
Staff member
You could do anything in code... but for doing what you want, you would have to keep track of each coin collected, in a array variable... then when a screen is loaded, you would have to not create/draw those coins if you have already it in your array.
It's a lot of code... and will required a lot of space.
Because every game is different, every game doesn't need that feature. NESmaker is a versatile tool for every kind of games... so, having that would be a waste of code and space, for projects doesn't need it.

NEsmaker makes simple games. If you need more specific features for your game, you will have to digg in the code, it's an advanced feature.
 

twin paradox

New member
dale_coop said:
You could do anything in code... but for doing what you want, you would have to keep track of each coin collected, in a array variable... then when a screen is loaded, you would have to not create/draw those coins if you have already it in your array.
It's a lot of code... and will required a lot of space.
Because every game is different, every game doesn't need that feature. NESmaker is a versatile tool for every kind of games... so, having that would be a waste of code and space, for projects doesn't need it.

NEsmaker makes simple games. If you need more specific features for your game, you will have to digg in the code, it's an advanced feature.

I definitely understand the logic behind NESMaker being a more broad approach to making an NES game, so it makes sense that what I was asking about would not be a feature out-of-the-box. I think for now I will just design my game around that limitation instead. Maybe down the road if I get really ambitious, I will see about digging further into the code. Thanks!
 

dale_coop

Moderator
Staff member
If you want your game to remember which collectable tile you already collected (individually), you will have no other choice to keep the track on in some variables (depending of how many collectable tiles you have for your game).
It's doable, if it's an important mechanic for your game, but it will require some work. If you're at ease with code, it's very interesting to digg'in the code. If not, you will need to get a coder doing that for you (It's a few hours to spend on that).
 
Top Bottom