Page 2 of 3

Re: Destructible terrain (kind of like Worms)

PostPosted: Sat Nov 01, 2014 12:52 pm
by fldr
im pretty sure the fast algorithm is really faster (not so much but faster), try to make >10 fast clicks, you can see the slow one really hang a while

Re: Destructible terrain (kind of like Worms)

PostPosted: Sat Nov 01, 2014 4:27 pm
by DatapawWolf
@Coin-coin le Canapin if you're doing testing, you should really just have a button that always fires the destruction code in the same area, while you count ticks between the start and end of the algorithm.

Do that for multiple areas on the screen, refresh, do it all again, and average through a few runs.
Then do that for your "new" algorithm.

Because honestly I don't notice a difference between the two.

Re: Destructible terrain (kind of like Worms)

PostPosted: Sun Nov 02, 2014 9:07 am
by Coin-coin le Canapin
I measured the duration of each event using wallclocktime function and clicking like mad, and it appears that the first algorithm is faster.

0.12s vs 0.15s, the results are constant over my tries.

Re: Destructible terrain (kind of like Worms)

PostPosted: Mon Nov 03, 2014 4:11 pm
by DatapawWolf
Well cool. Good to know. Any updates on the game you're working on?

Re: Destructible terrain (kind of like Worms)

PostPosted: Mon Nov 03, 2014 8:34 pm
by Coin-coin le Canapin
Not much.
http://canapin.com/construct/worms/v8/
Damage calculation has some glitches (with the 2nd weapon), players can't move and some badly optimized events cause too much CPU work.
Plus, I didn't implemented the proportional particle effect.

Actually I'm refactoring my engine from A to Z because it was a complete mess. I'll create a thread about it when I have something to show.

My project is creating a multiplayer game inspirated mostly by Gunbound, which had an incredibly amazing gameplay until the developper ruined it. I could talk about it for hours.

That said, I've never finished any project, with Construct 2 or not. But I enjoy trying year after year :D

Re: Destructible terrain (kind of like Worms)

PostPosted: Fri Nov 07, 2014 10:33 am
by Ize
Heh nice to see other people working on destructible terrain...

i guess we all use the same method (more less) invented by @R0j0hound for this using an array

Here is an (now old) video of my lemmings like thingy: http://www.youtube.com/watch?v=wA-pjHIF ... GLlM6slAlg

Re: Destructible terrain (kind of like Worms)

PostPosted: Mon Nov 10, 2014 1:07 pm
by Coin-coin le Canapin
This is amazing ! May I ask you to share your capx with me ?

Re: Destructible terrain (kind of like Worms)

PostPosted: Mon Nov 10, 2014 2:30 pm
by Ize
I'll check if i can find it when i'm back home. It's messy though! :D

Re: Destructible terrain (kind of like Worms)

PostPosted: Tue Nov 11, 2014 9:55 pm
by Ize
Sorry, didn't make it yesterday!

Here it is: http://ize.rocks/c2/Pingus.capx

However, as mentioned before... really messy :D

Re: Destructible terrain (kind of like Worms)

PostPosted: Wed Nov 12, 2014 12:52 pm
by Coin-coin le Canapin
Thank you very much !