How do i make a 2d survival game?

I want to make a game sorta like Terraria but I have no clue how to make a way to break items or blocks. Can people help me with this please?

2 Likes

This is the game link -https://arcade.makecode.com/S42798-62317-62424-88472

1 Like

look up sandbox games and if it has me in it my game 2.0 version should have a somewhat inventory system and it alters tilemap at tilemap location of sprite. feel free to use some code or be inspired whatever, just maybe give credit. i hope i helped

2 Likes

If you want to break blocks or tiles, then this could be a potential way to do it.
Screenshot 2022-12-09 122558

This will help alot thanks!

1 Like

Sure I’ve Made A 2D Survival Game Called “PixelBuild”

1 Like

Do you happen to know how to highlight objects you are breaking? If so can you send the code?

1 Like

i have a game called pixelplace that could be very useful with the code (weird how similar the names are but you only have so many options of names that describe a game where you build). if you want i can send the code just i am busy now is why i will only send if you need and ask

Screenshot 2022-12-12 115337
This code asks which tile you’re breaking:

Hope this helps! :slight_smile:

mine isn’t perfect for this but some of the code could be useful

This does help but, because my game has gravity it still mines the way it was originally where it mines the block below you aswell. Sorry for the complaint.

1 Like

Im sure i’ll use parts of it

Thanks lot guys! This’ll help alot!

1 Like

No worries! I tried your game (it’s really cool) and I observed that problem too. I’ll try to find a way to fix it! (If I end up being able to fix it, then I’ll post the link for the update in a reply to this topic.)

Ok thanks :+1:

1 Like

FINALLY AFTER 3 SLEEPLESS DAYS I CAN now help. I can help you if you want?

1 Like

Okay, I think I may have found a fix! It only works for grass tiles right now, but it allows for you to mine blocks that you’re hitting all around you. In order to mine below you, you simply hold ‘B’. I hope this helps! :slight_smile:

Yes please! :smiley:

What do you need help with?

Oh ok thanks ill try help with mining other tiles.

1 Like