Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

ZGB Engine: Need help! (Switching tiles)

A topic by freshdeus created Aug 31, 2021 Views: 410 Replies: 6
Viewing posts 1 to 6
Submitted

Hi,

maybe it´s not the right place to ask for coding help, but I´m kinda depressed (and annoyed), because. every piece of information I found  wasn´t  very helpful. 

My question: How can I change background tiles (with the ZGB Engine) of a level permanently? I looked at several examples / tutorials and the GBDK documentation, but nothing worked quite right.

My idea: I have a tileset, which has items as tiles. When the player sprite stands over such a tile and a button is pressed, the tile switches to another tile of the same tileset (an empty one) as if the item was picked up. I want to try this idea, because the sprite limit is giving me headaches. Ton of games use this trick (Tetris, Chessmaster, Castle Quest), but I am not skilled enough (learning C at the same time) to get it working myself. The important part is switching the tiles. I got tile checking already working (for example: stairs).  So I hope to find some advice (for codes or other places/forums to look/ask). Thank you! 

Jam Host

you may try to ask on GBDK-2020/ZGB discord server: https://discord.gg/rva4MVEs

Jam Host

What toxa said (especially if you search for "animated tiles" in #zgb-help)

You can also find an example in the source code for this game:

https://github.com/InfectedBytes/TempleOfVelcro/search?q=AnimBkg_Setup

Submitted

Thanks toxa for the replies...for now I will stick to my current idea. Maybe for another game I will try again to use tileset swapping...

Does the game have scroll with large maps?.
One way is to clone the map to be able to write on it.
I did it in : https://nekete.itch.io/a-fairy-without-wings

Submitted

@Nekete: What do you mean by cloning the map? BTW: Your game looks awesome...

(2 edits)

Since the rom is inmutable, you have to copy the map content into ram. The main problem is that it should fit (that is why I mentioned the map size limit)

edit: And thank you for playing the game :)