Jump to content


Photo

K X D T E (new Version!)


  • Please log in to reply
117 replies to this topic

#1 Kaietnap

Kaietnap

    The true slaadi

  • New Member
  • 196 posts

Posted 02 March 2007 - 07:49 PM

UPDATE (06/11/08 - v1.24)
-fixed a bug with scpKX_DTE_Chk_Line(...)
-reuploaded the extension as it appeared to have been corrupted

NEW STUFF (30/03/07 - v1.231)
-some slight optimizations added to the engine
-slight changes to the help file
-optimized the gml demo

Description
KX DTE is a complete extension to easily allow your games to use a destructible terrain just like Team17's Worms. It features over 30 functions and a easy drag and drop library for users who aren't experienced with GML.

Screenshot
Posted Image
This is a straight screenshot from the second demo.

Download
KX_DTE DOWNLOAD HERE!!!
The zip file is 641KB and includes the .gex extension and 2 .gmk demos to get a quick view of what is possible with this extension and how to easily integrate it in your games. Also be sure the read the help file!

License information
You may use it freely in any non-commercial game but please give credit. For commercial games, contact me.

Feedback
You can post feedback here. Report bugs to kaietnap "at" hotmail.com. You can also send me your suggestions for further versions.
If you make any interesting game with it feel free to advertise it here!

Also, please stop asking to have the source code as I do not wish to release it for the moment.

Edited by Kaietnap, 07 November 2008 - 02:45 AM.

  • 1
Get KX DTE, the BEST extension for DESTRUCTIBLE TERRAIN, HERE!!!
Get KX TESLA, the BEST extension for ELECTRICITY EFFECTS, HERE!!!

#2 buji_ryu

buji_ryu

    GMC Member

  • New Member
  • 324 posts

Posted 02 March 2007 - 08:03 PM

every time I shot, doesn't matter weapon it was, the fps dropped to 4 - 2. My computer isn't the best, but to go from 48 to 2 is pretty bad.

edit: my computer is like 5 years old( well probably 4)

Edited by buji_ryu, 06 March 2007 - 07:55 PM.

  • 0

#3 Kaietnap

Kaietnap

    The true slaadi

  • New Member
  • 196 posts

Posted 02 March 2007 - 08:09 PM

buji_ryu, can you give me your specs?

You must have a pretty old computer, cause I get at least 30 fps when shooting on every computer I tested it...
  • 0
Get KX DTE, the BEST extension for DESTRUCTIBLE TERRAIN, HERE!!!
Get KX TESLA, the BEST extension for ELECTRICITY EFFECTS, HERE!!!

#4 Code_wizard

Code_wizard

    GMC Member

  • New Member
  • 6 posts

Posted 03 March 2007 - 02:16 AM

Very nice, the character sticks in places, but thats expected and almost impossible to fix. Very clean.
Keep up the good work. I might use this in the future. What license are you giving to users of the extension?
  • 0

#5 Kaietnap

Kaietnap

    The true slaadi

  • New Member
  • 196 posts

Posted 03 March 2007 - 02:37 AM

As said above, you may use it in any way you like as long as you distribute your game freely.

Oh btw, did you experience any slowdown issues like buji_ryu?

Thx for your comments!
  • 0
Get KX DTE, the BEST extension for DESTRUCTIBLE TERRAIN, HERE!!!
Get KX TESLA, the BEST extension for ELECTRICITY EFFECTS, HERE!!!

#6 Daniel-Dane

Daniel-Dane

    GMC Member

  • New Member
  • 3581 posts

Posted 03 March 2007 - 06:45 PM

The GFX part was ever so awesome. (That word is so overused xD)
But I didn't like the coding though. It lagged too much. Did you make it with surfaces or the screen?

P.S. The hole effect is nicely done, great worms DT engine.
  • 0

#7 Kaietnap

Kaietnap

    The true slaadi

  • New Member
  • 196 posts

Posted 05 March 2007 - 08:50 PM

Hehe thx!

The whole engines uses surfaces to keep the terrain visuals, and a grid structure to keep the collision map
  • 0
Get KX DTE, the BEST extension for DESTRUCTIBLE TERRAIN, HERE!!!
Get KX TESLA, the BEST extension for ELECTRICITY EFFECTS, HERE!!!

#8 Daniel-Dane

Daniel-Dane

    GMC Member

  • New Member
  • 3581 posts

Posted 05 March 2007 - 09:10 PM

So no objects involved?
  • 0

#9 Kaietnap

Kaietnap

    The true slaadi

  • New Member
  • 196 posts

Posted 05 March 2007 - 11:07 PM

So no objects involved?

<{POST_SNAPBACK}>


yep! that's why the extension comes with a number of functions to detect collisions between the game's objects and the terrain.
  • 0
Get KX DTE, the BEST extension for DESTRUCTIBLE TERRAIN, HERE!!!
Get KX TESLA, the BEST extension for ELECTRICITY EFFECTS, HERE!!!

#10 Daniel-Dane

Daniel-Dane

    GMC Member

  • New Member
  • 3581 posts

Posted 06 March 2007 - 03:13 PM

Have you tested whether your method or the object method is fastest?
  • 0

#11 Kaietnap

Kaietnap

    The true slaadi

  • New Member
  • 196 posts

Posted 06 March 2007 - 10:33 PM

This method is much faster, cause it doesn't need to change the surface into a sprite each time the terrain is destroyed. It is especially faster if you need to destroy the terrain often, with a flamethrower for exemple. The function sprite_create_from_surface is simply too slow to be called each step or so.
  • 0
Get KX DTE, the BEST extension for DESTRUCTIBLE TERRAIN, HERE!!!
Get KX TESLA, the BEST extension for ELECTRICITY EFFECTS, HERE!!!

#12 sharprm

sharprm

    GMC Member

  • New Member
  • 147 posts

Posted 07 March 2007 - 11:55 AM

The slowest it ran on my laptop was 57 fps. This is great. Thanks for making it!
  • 0

#13 JDBar

JDBar

    GMC Member

  • GMC Member
  • 206 posts
  • Version:GM:Studio

Posted 07 March 2007 - 03:37 PM

Wow this is awesome. I had a constant 60! (58 when I used missles) And the terrain loaded in no time! :D Very cool.
  • 0

iTZiMtWC3OJL1.jpg


#14 sithlord6

sithlord6

    GMC Member

  • New Member
  • 193 posts

Posted 07 March 2007 - 09:40 PM

ThankYouThankYouThankYouThankYouThankYou!
This will be so stinkin' helpful it's ridiculous!
  • 0

#15 Coffee

Coffee

    Light and Sweet

  • GMC Member
  • 2351 posts
  • Version:GM:Studio

Posted 08 March 2007 - 06:02 AM

Wow! Really amazing, this is the best Destructable land example i have ever seen, and I'm not exaggerating for someone who have seen about 10 so far! Very smooth and everything!

100/100
  • 0

vmh.png Come Play Hungry Hungry Frogs!


#16 SquareWheel

SquareWheel

    Square Wheel Games

  • New Member
  • 851 posts
  • Version:Unknown

Posted 09 March 2007 - 12:55 AM

Slow if overloaded but quite nice. Good job.
  • 0
Cook Console | Editor Engine | Mass File Namer

All of my examples are publicly available and can be found at

#17 Kaietnap

Kaietnap

    The true slaadi

  • New Member
  • 196 posts

Posted 11 March 2007 - 06:13 PM

Hehe thanks for the good comments!

If anyone else try this: could you please give me the fps you get and your specs. I might try getting this extension even more optimized...
Also, anyone has requests for the next version?
  • 0
Get KX DTE, the BEST extension for DESTRUCTIBLE TERRAIN, HERE!!!
Get KX TESLA, the BEST extension for ELECTRICITY EFFECTS, HERE!!!

#18 Daniel-Dane

Daniel-Dane

    GMC Member

  • New Member
  • 3581 posts

Posted 11 March 2007 - 06:40 PM

Remove the lags there comes when you hold down the button :(.
  • 0

#19 Kaietnap

Kaietnap

    The true slaadi

  • New Member
  • 196 posts

Posted 13 March 2007 - 03:31 AM

Hehe, I'll try to work something about that, just for you DD!

Anyone has other requests?
  • 0
Get KX DTE, the BEST extension for DESTRUCTIBLE TERRAIN, HERE!!!
Get KX TESLA, the BEST extension for ELECTRICITY EFFECTS, HERE!!!

#20 Daniel-Dane

Daniel-Dane

    GMC Member

  • New Member
  • 3581 posts

Posted 13 March 2007 - 06:40 AM

Don't call me that...
  • 0

#21 Code_wizard

Code_wizard

    GMC Member

  • New Member
  • 6 posts

Posted 18 March 2007 - 11:08 PM

Sorry for the delayed reply. Very small slowdowns when clicking as fast as I can. Other than that, was pretty smooth.
  • 0

#22 subwayheaven

subwayheaven

    GMC Member

  • GMC Member
  • 48 posts

Posted 19 March 2007 - 05:25 PM

Sorry about asking a really dumb question....

But how do you make the background/terrian only in parts of the room , it just takes up the whole room :P

P.s im using the lib.... :)
  • 0

#23 Kaietnap

Kaietnap

    The true slaadi

  • New Member
  • 196 posts

Posted 20 March 2007 - 06:12 PM

simply call the init action and then use the add rectangle action and enter the coordinates you want the terrain to be limited to...
  • 0
Get KX DTE, the BEST extension for DESTRUCTIBLE TERRAIN, HERE!!!
Get KX TESLA, the BEST extension for ELECTRICITY EFFECTS, HERE!!!

#24 weirdo_studios

weirdo_studios

    GMC Member

  • New Member
  • 174 posts

Posted 22 March 2007 - 12:26 PM

the terrain collision is verry slow when i have like i box of coins the fps drop from 450-500 to 30...
i like the tearing of the terrain tough..

Edited by weirdo_studios, 22 March 2007 - 12:35 PM.

  • 0

#25 Kaietnap

Kaietnap

    The true slaadi

  • New Member
  • 196 posts

Posted 27 March 2007 - 03:31 PM

Here I've released a second version!
I've mainly added some optimizations to the engine... and some few optimizations to the gml demo. I guess the demo could be even more optimized though...

I can't really make the engine any faster now... Its up to the users to make sure their games are as much optimized as possible. In particular avoid any collision check that isn't necessary...
  • 0
Get KX DTE, the BEST extension for DESTRUCTIBLE TERRAIN, HERE!!!
Get KX TESLA, the BEST extension for ELECTRICITY EFFECTS, HERE!!!

#26 weirdo_studios

weirdo_studios

    GMC Member

  • New Member
  • 174 posts

Posted 28 March 2007 - 05:21 PM

nice but still slow (unfortuanatly)

anyway do you know how this can be done???

Edited by weirdo_studios, 28 March 2007 - 06:23 PM.

  • 0

#27 Kaietnap

Kaietnap

    The true slaadi

  • New Member
  • 196 posts

Posted 28 March 2007 - 11:02 PM

sure, my engine use surface transparency, so...

just use:
surface_set_target(someSurface);
draw_set_blend_mode_ext(bm_zero,bm_zero);
draw_clear_alpha($000000,0);
draw_set_blend_mode(bm_normal);
surface_reset_target();

now your surface is empty and transparent...
  • 0
Get KX DTE, the BEST extension for DESTRUCTIBLE TERRAIN, HERE!!!
Get KX TESLA, the BEST extension for ELECTRICITY EFFECTS, HERE!!!

#28 d41

d41

    GMC Member

  • New Member
  • 526 posts

Posted 30 March 2007 - 02:00 AM

Cool... I might use this in my game. (what name do you want me to give credit to?)

I couldn't get scpKX_DTE_Dig_Circle(x,y,r1,r2,fore,back) to work though, it gave me an error about the wrong number of arguments, and then when I removed the last two arguments it worked... (rectangle and other dig functions worked fine though)
  • 0

#29 Kaietnap

Kaietnap

    The true slaadi

  • New Member
  • 196 posts

Posted 30 March 2007 - 01:25 PM

Oops! Small error in the help file, should have been scpKX_DTE_Dig_Circle(x,y,r1,r2).... Corrected it now.

oh, and you can just credit me as "Kaietnap", that will do it...
  • 0
Get KX DTE, the BEST extension for DESTRUCTIBLE TERRAIN, HERE!!!
Get KX TESLA, the BEST extension for ELECTRICITY EFFECTS, HERE!!!

#30 d41

d41

    GMC Member

  • New Member
  • 526 posts

Posted 31 March 2007 - 01:14 AM

Oops! Small error in the help file, should have been scpKX_DTE_Dig_Circle(x,y,r1,r2).... Corrected it now.

oh, and you can just credit me as "Kaietnap", that will do it...

<{POST_SNAPBACK}>

If it only has those arguments, then how do you tell it to only go through the foreground but not the background? When I tried it like that it just went straight through the terrain and showed the room's background.

thx
  • 0

#31 Kaietnap

Kaietnap

    The true slaadi

  • New Member
  • 196 posts

Posted 31 March 2007 - 02:31 AM

r1 is the radius in the foreground, r2 is the radius in the background...
just set r2 to 0 and the circle will only be dug in the foreground!
  • 0
Get KX DTE, the BEST extension for DESTRUCTIBLE TERRAIN, HERE!!!
Get KX TESLA, the BEST extension for ELECTRICITY EFFECTS, HERE!!!

#32 d41

d41

    GMC Member

  • New Member
  • 526 posts

Posted 31 March 2007 - 02:38 AM

r1 is the radius in the foreground, r2 is the radius in the background...
just set r2 to 0 and the circle will only be dug in the foreground!

<{POST_SNAPBACK}>

Oh...ok thanks. I thought r1 and r2 meant like an ellipse.... You may want to specify that in the manual.

Since you said it uses surfaces, will the destructible terrain take up lots of video memory in a big room (even if I'm only using it in one small section of the room)?
  • 0

#33 Kaietnap

Kaietnap

    The true slaadi

  • New Member
  • 196 posts

Posted 31 March 2007 - 04:28 AM

Since you said it uses surfaces, will the destructible terrain take up lots of video memory in a big room (even if I'm only using it in one small section of the room)?

<{POST_SNAPBACK}>


well... yes. the terrain uses two surfaces which are the same size as your room, so it may take a good amount of video memory if you're using a very large room. but unless you either have a very crappy video card or you're using ridiculously huge rooms, you should be fine.

if my calculations are correct, the engine loaded in a 1024/768 room should be taking exactly 6MB of video mem.
  • 0
Get KX DTE, the BEST extension for DESTRUCTIBLE TERRAIN, HERE!!!
Get KX TESLA, the BEST extension for ELECTRICITY EFFECTS, HERE!!!

#34 Schyler

Schyler

    Noskcirderf Derf

  • GMC Member
  • 2680 posts
  • Version:GM:Studio

Posted 31 March 2007 - 04:33 AM

cool.
  • 0

#35 Daniel-Dane

Daniel-Dane

    GMC Member

  • New Member
  • 3581 posts

Posted 31 March 2007 - 07:41 AM

You could make it half the size and then stretch it. You won't lose much quality.
  • 0

#36 Kaietnap

Kaietnap

    The true slaadi

  • New Member
  • 196 posts

Posted 31 March 2007 - 04:27 PM

You wouldn't get much speed either... It's the collision detection that makes it lag...

I guess the easiest way to cut the lag would be to simply make your room half the size and double your view...
  • 0
Get KX DTE, the BEST extension for DESTRUCTIBLE TERRAIN, HERE!!!
Get KX TESLA, the BEST extension for ELECTRICITY EFFECTS, HERE!!!

#37 d41

d41

    GMC Member

  • New Member
  • 526 posts

Posted 31 March 2007 - 05:31 PM

Since you said it uses surfaces, will the destructible terrain take up lots of video memory in a big room (even if I'm only using it in one small section of the room)?

<{POST_SNAPBACK}>


well... yes. the terrain uses two surfaces which are the same size as your room, so it may take a good amount of video memory if you're using a very large room. but unless you either have a very crappy video card or you're using ridiculously huge rooms, you should be fine.

if my calculations are correct, the engine loaded in a 1024/768 room should be taking exactly 6MB of video mem.

<{POST_SNAPBACK}>


Hmm... And my room size is 8000/768, that should take up about 47MB of video memory. That isn't a problem for me (I got 256MB Video) but it might not work on older computers, especially because I think I'm going to use more surfaces for lighting effects etc. Maybe I can cut the room into quarters and then move between them.... Is there some way I can only have DT in one section of the room and not make the surface(s) the size of the whole room (with your extension)?


thanks
  • 0

#38 Kaietnap

Kaietnap

    The true slaadi

  • New Member
  • 196 posts

Posted 31 March 2007 - 06:14 PM

well, currently, provided you want the terrain to be contained in a section starting at (0,0) and ending wherever you want, its possible...

when initialized, the surfaces are automatically set to the size of the current room... so if you init the terrain in a smaller room before moving to your gargantuan one, it will work...

of course, maybe you don't want it to start at (0,0) but somewhere else... in that case, its impossible... yet.
  • 0
Get KX DTE, the BEST extension for DESTRUCTIBLE TERRAIN, HERE!!!
Get KX TESLA, the BEST extension for ELECTRICITY EFFECTS, HERE!!!

#39 Daniel-Dane

Daniel-Dane

    GMC Member

  • New Member
  • 3581 posts

Posted 31 March 2007 - 08:44 PM

Actually, you should try and set the size 1/4 and see if you lose quality. You might not save speed but you would save a lot of VRAM.

Edited by Daniel-Dane, 31 March 2007 - 08:45 PM.

  • 0

#40 Kaietnap

Kaietnap

    The true slaadi

  • New Member
  • 196 posts

Posted 03 April 2007 - 03:11 AM

The quality loss would be considerable. 1/4 res would be like applying a pixelisation filter to the whole terrain. Not pretty.

Anyway, I prefer to let the users decide how they want to manage the resolution of the terrain. Those who want to make it 1/4 just have to shrink their terrain and enlarge their view accordingly.
  • 0
Get KX DTE, the BEST extension for DESTRUCTIBLE TERRAIN, HERE!!!
Get KX TESLA, the BEST extension for ELECTRICITY EFFECTS, HERE!!!

#41 Archangel7x

Archangel7x

    GMC Member

  • GMC Member
  • 236 posts
  • Version:Unknown

Posted 08 April 2007 - 04:01 AM

Kaietnap this is the BEST EVER Thanks ::lmao::
  • 0

#42 death-droid

death-droid

    GMC Member

  • GMC Member
  • 2600 posts

Posted 15 April 2007 - 01:36 AM

awesome constant 60fps
  • 0

Posted Image


#43 Jbkr

Jbkr

    GMC Member

  • New Member
  • 3 posts

Posted 16 April 2007 - 08:30 AM

THIS IS DA BEST!!!!! :blink:
  • 0

#44 klchris0

klchris0

    GMC Member

  • New Member
  • 108 posts

Posted 16 April 2007 - 09:44 AM

thanks so helpful. :blink: :D :D :D
  • 0

#45 hokage69

hokage69

    GMC Member

  • New Member
  • 43 posts

Posted 16 April 2007 - 02:57 PM

AWESOME!!!!! there is one more feature i would like. I want functions to check how much destroyable terain is left
  • 0

#46 Kaietnap

Kaietnap

    The true slaadi

  • New Member
  • 196 posts

Posted 16 April 2007 - 10:15 PM

how? you'd want a function to return how much pixels are left in the terrain?
  • 0
Get KX DTE, the BEST extension for DESTRUCTIBLE TERRAIN, HERE!!!
Get KX TESLA, the BEST extension for ELECTRICITY EFFECTS, HERE!!!

#47 Jay Jogos

Jay Jogos

    GMC Member

  • New Member
  • 25 posts

Posted 09 May 2007 - 09:08 PM

Wow, love the enigine.
FPS never went lower than 45 and my pc is about 5 years old except for when I used laser and rocket a the same time.

10/10
  • 0

#48 Bill23

Bill23

    GMC Member

  • GMC Member
  • 460 posts
  • Version:GM:Studio

Posted 12 June 2007 - 07:14 PM

The zip file is currupted. Can you please fix it?
Edit: Spelling.

Edited by Bill23, 12 June 2007 - 07:15 PM.

  • 0
Posted Image
Posted ImagePosted Image

#49 Kaietnap

Kaietnap

    The true slaadi

  • New Member
  • 196 posts

Posted 13 June 2007 - 01:55 AM

works perfectly to me... I guess the problem must be on your side. I re-uploaded it anyway, just to make sure...
  • 0
Get KX DTE, the BEST extension for DESTRUCTIBLE TERRAIN, HERE!!!
Get KX TESLA, the BEST extension for ELECTRICITY EFFECTS, HERE!!!

#50 Bill23

Bill23

    GMC Member

  • GMC Member
  • 460 posts
  • Version:GM:Studio

Posted 13 June 2007 - 06:02 PM

It still doesn't work. At least I have the actual extension, I just wanted to download it again for the examples.
Edit: It works. Thank you! I'm definately using this!

Edited by Bill23, 14 June 2007 - 01:13 PM.

  • 0
Posted Image
Posted ImagePosted Image