Moving candle (4.5.6)

retroarcade

New member
Hi !
I'm currently using the Metrovania assets.

I'd like to put some candles with moving or glowing flames in the background of a room.

How could I achieve that?

I thought that I should create a new game object with some frames to simulate animation but then I saw these .monster files and I'm quite lost because I don't know how to deal with them.
 

dale_coop

Moderator
Staff member
Hey retroarcade :)
Glad to have you with us.

You are thinking well. Currently NESmaker doesn't have animated tiles, so using a monster is a good idea.
For that create a monster object (or a Game Object if you plan to use that object often) who will be your candle.
Don't set any particular type for that object (don't set it as "monster" nor "player" ... keep it to nothing), no need any speed/acceleration.
The only thing you will need is the set the Action Step 0 to "ignore gravity" and set the "animation speed" for the flame animation you would create for it.
 

retroarcade

New member
Merci Dale!
I've created a candle with two frames, just to simulate the movement of the flame. For this I've modified the image file that comes with the metrovania assets (the one with the girl running).

Well, sorry for the question, but now how do I place it in my screen? With screen info or by right-clicking the mouse?
 

Jonny

Member
Once you've set the monster group for that screen 'Screen Info / Day Monster Group / (drop down menu).

You will then be able to place any of your objects or monsters on that screen.


objectplacement.png

Also, I've attempted to implement the exact same thing you're attempting.

I quickly realised that I couldn't have many of the flames on the same scanline, especially if I was having a monster or the player there too. Not too bad as they can be spaced apart.

The main reason I've shelved the idea for now is that, when scrolling, the flame object sprite was drawing (or had the effect of seeming to) 1 pixel off to the left or right as I moved my player. This is something thats probably not noticable for monsters etc but for something thats supposed to be stationary, it was quite noticable. Something to do with when the sprite is being drawn to the screen in relation to the background but too advanced for me to even attempt to solve at the moment.

I know a few people have done bank switching and there's some information on the forum but it's very advanced and not something there's a tutorial for as such. That would be the better way to achieve the effect.

Try the object/monster route for yourself, you may get different results. I'd be interested to hear how you get on.

View: https://youtu.be/rFNHxsZ-5hA
 
Last edited:

dale_coop

Moderator
Staff member
Yes, to place a monster (or a game object) on a screen, you need to have your monster objects in a "monster group"... and having that monster group assigned to your screen (when editing a screen, click on the screen "Infos" button, and assign the monster group for "Day Monsters").

Note: Even if it's a game object you want to place on a screen (and not a monster object), you need to have at least one monster group assigned to your screen... else the right click will not display the "Place Monster" items.
 

CutterCross

Active member
Going the object route for such minor details isn't a good idea in the long run due to how CPU intensive NESmaker's object system is, and adding NESmaker's scrolling engine into the mix is a recipe for slowdown during gameplay, even when there's not a lot of actual action on screen.

Palette cycling is a good alternative for background tiles to create a similar effect. The main cycling code on the forums breaks during attribute updates when scrolling, but drexegar talks about some fixes / workarounds.

Also since Mapper#30 has 4 banks of CHR-RAM, you can write a system for proper animated tiles. It's just not a default thing from the tool.
 

Jonny

Member
Going the object route for such minor details isn't a good idea in the long run

I learnt this the hard way!

I'm going to do what you've suggested and try doing it with palette cycling and read-up on drexegar's posts about it. Might be something for single screen bosses in my case.
 

retroarcade

New member
Hi everybody.
I've got something that works but now I have to understand how to use the palettes because the candle palette influences also the player...


I can't understand why something that should be easy to implement is so painful in nesmaker.
 

CutterCross

Active member
Hi everybody.
I've got something that works but now I have to understand how to use the palettes because the candle palette influences also the player...


I can't understand why something that should be easy to implement is so painful in nesmaker.
If you're going the object-route you could just skip implementing the palette cycling and just make an animation for the flame.

But anyway yes, the NES' PPU has 4 "slots" for sprite subpalettes. For palette cycling you'd want the object you want to cycle use a different palette than your player, powerups, etc.
 

Jonny

Member
Those palettes don't go a long way!

I guess it would depend how many palettes you're using for your player. Even if you stick to one, there's then NPC/monsters, your HUD or text box, pickups and then the cycling palette if you want one. Getting creative in spite of the limitations is the beauty of it.
 

retroarcade

New member
Finally I got something that works:


I am not completely satisfied because now I realise that I want a halo too...

Thanks guys!
 
Last edited:
Top Bottom