I need to create a digging game

0 favourites
From the Asset Store
Awardkit
$5 USD
Create custom awards and achievement or use the many templates and create your own.
  • hey guys! I need to create a game like this link but I don't know where to start

    Tagged:

  • This is usually done with a tilemap. There are plenty of examples, search for "destructible terrain". Here is one:

    howtoconstructdemos.com/create-a-destructible-terrain-as-in-scorched-earth-with-a-tilemap-capx

  • thanks, but instead of being a pixel, it can be a destructive terrain in HD

  • Use a bigger tilemap.

  • If the tilemap has only one tile type and is invisible, then even with 1x1 px tiles the performance shouldn't be that bad. You can make 4x4 tiles.

    Use a separate object for the visible ground, and erase it by spawning round sprites above it with Destination Out blend mode.

  • thank you very much, your method helped many

  • If the tilemap has only one tile type and is invisible, then even with 1x1 px tiles the performance shouldn't be that bad. You can make 4x4 tiles.

    Use a separate object for the visible ground, and erase it by spawning round sprites above it with Destination Out blend mode.

    hi it's me again, that was really nice but now i have one more problem, when i click on the ground to dig the optimization is slow, i will send my capx

    mega.nz/file/rMB1VJyJ

  • Use Debug Mode (Shift+F4) to troubleshoot issues. You will see that too many Erase objects are created. That's because you have "Create object Erase" action inside the For loop. And it's repeated 160 times!

    Change the event like this

  • Use Debug Mode (Shift+F4) to troubleshoot issues. You will see that too many Erase objects are created. That's because you have "Create object Erase" action inside the For loop. And it's repeated 160 times!

    Change the event like this

    I did it the way you told me and it's still slow, the error is not associated with the creation of the erase, but when erasing the blocks in the tilemap this is what causes the slowness, any alternative to work around this problem?

  • It runs at 50-60 fps on my laptop after that change.

    If it's slow on your machine, you can increase tile size, this should definitely help.

  • It runs at 50-60 fps on my laptop after that change.

    If it's slow on your machine, you can increase tile size, this should definitely help.

    your pc must be pc gamer? it's really still slow here only when i delete the blocks from the tilemap, i just would like to understand which is the method that this guy used in his game that runs smoothly without crashing when deleting the blocks

  • No, I have a mid-range laptop with integrated video, definitely not gaming.

    Can you share your latest project? Because when I set tile size to 4x4 it runs very smoothly.

  • No, I have a mid-range laptop with integrated video, definitely not gaming.

    Can you share your latest project? Because when I set tile size to 4x4 it runs very smoothly.

    Hi sorry for the delay, here is the updated project with the same slowness when I delete tiles from the tilemap mega.nz/file/iV4R3RyA

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Your first version was better. Events 9-12 in the last version are the reason why it's slow. The more Erase sprites are spawned, the more collision checks are made. With 100 sprites the game will be making over a million collision checks per second!

    It's ok to use this method once on start of the layout, but don't do it on every tick.

    Change the events like this:

  • You can significantly improve the performance if you change the tile size to 2x2 or even 4x4

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)