Discord
Login
Community
DARK THEME

Need some help on my game

Hey I have been working on a game and I need some help. There is a few lines of code that I have written and basically it removes items off of the map when the player collects it. But when I collect the items and it get removed, then I finish the game as normal and get to the end screen. But when I try to restart the game through init(), the items that I have collected and got removed off of the map don't spawn back in. I have already tried putting the items on the map through the code, but it doesn't seen to work. Does everyone have any suggestions on what I should about this. I will put a link to my game if anyone wants to take a look at it and give any suggestions. https://microstudio.dev/i/CRADuck/forgottenhero23/

Thanks, CRADuck

Hello CRADuck,

your game looks great! I would make a copy of your map with mymap.clone() before you start. Something like this:

backup_map = maps['level1'].clone()

And when the game is over, simply copy it back:

maps['level1'] = backup_map.clone()

Good luck!

Exactly what KimWijs says :)

And wow, your game looks great. The pixel art and level design are looking amazing, can't wait for the final game! One suggestion, are you planning on adding a climbing animation for the frog?

Post a reply

Progress

Status

Preview
Cancel
Post
Validate your e-mail address to participate in the community