4.5.9 Maze: Change prize tile to load blank tile on screen revisit.

kevintron

Active member
This question came up a few times and can't seem to get a solution so I'm putting it out there again. I'm not looking for someone to just drop code. I dont mind the work but I dont know where to start. Here are my bullet points on it so far....

1.Can this even be done in the maze module? I'm struggling to even find a finished game example that does this.

2.I thought triggers but every level would need it's own trigger screen and then wouldn't it erase all the prizes?

3.Should they be game objects instead? Would that count against your monsters?

4.To do this is what I'm missing a part that tracks visited vs unvisited screens? Would all the prize tiles need to be tracked too?

5.I really have gone through the maze and adventure tutorials multipul times. I have sifted through basically this whole board with no luck. Found out a lot of other useful things just not this. I really have tried.
 

CluckFox

Active member
Screen triggers apply on a per-screentype basis. You can have 255 screen types so you shouldn't run out too quickly. But then again the built-in tile rewrite code is all-or-nothing like you thought.

The game objects would occupy Object_ slots just like any other sprite. I would personally approach this by examining where the Screen Triggers are stored in WRAM and if there's any room nearby to keep a list of already-collected tile positions on a per-screentype basis. Once you have that, you can decide whether you want to use that data to 1) rewrite tiles or 2) spawn pickups as-needed on screen loads.
 

kevintron

Active member
Thank you that did give me a better understanding. I can make separate triggers for each screen which will not effect each other. This was a big part of where I was stuck.
The advanced idea about the WRAM is the brass ring to reach for. I do in a rudimentary way understand what you mean enough to start down that path. I really do appreciate it.
 

kevintron

Active member
Ok after playing around with it the trigger states dont work with the prize tiles out of the box. This should work for game objects but my game isnt gonna work with them the way I want it.
I'm not trying to discourage anyone but this is a concept that should be approached when you are comfortable on an advanced level of skill coding. I'm not there yet and I'm getting caught up on something that for my current game and skill isnt needed for it to work. I'd consider this an open topic for others to work with.
Its tuff realizing your game might not be the way you pictured it but that doesn't mean give up. It also doesn't mean it wont still be fun.
 

Jonny

Well-known member
I think CluckFox has the best solution, adding more to whats already there with triggers. I've been thinking of another method too for scrolling games, whereby if player is scrolling right to left (or opposite if needed) the object drawing is skipped or even only certain objects are not loaded based on scroll direction.
This would only be for stopping people scrolling back to collect pickups and not practical if those pickups were needed for game progression. Once the object was passed by it would be gone regardless if it was picked up or not. Only really any use to some games. Plus, don't know if its possible to code yet.
 

cycleric

New member
Hey, I've been wanting a solution to this too. Unlike you, I haven't any coding experience and would love it if someone figures it out and shares the code. I haven't delved into screen triggers yet but I'll be learning at some point anyway. Thanks for working on it, you have my encouragement and emotional investment.
 
Top Bottom