Author Topic: Item Corpses  (Read 4463 times)

Heretic

  • Moderator
  • Posts: 305
  • Castle Runner
    • View Profile
Item Corpses
« on: September 20, 2013, 12:04:27 PM »
Are Item Corpses a thing? My hope is that I can have gravestones in my graveyard be the main destructible item throughout the level - but would be way cooler if I could leave a broken gravestone behind.


If this isn't possible I might be able to reach the same effect by creating a gravestone 'character' who has like no range no damage etc, but drops stuff like a box or barrel does - does that seem feasible?
« Last Edit: September 20, 2013, 12:26:54 PM by Pwnography »

Grokitach

  • Posts: 99
  • Hotlane Creator
    • View Profile
Re: Item Corpses
« Reply #1 on: September 20, 2013, 01:39:50 PM »
Create a doodad with different doodad states. One good, one beign broken and one broke. Use the same script system as a breakable wall and it's done.

Heretic

  • Moderator
  • Posts: 305
  • Castle Runner
    • View Profile
Re: Item Corpses
« Reply #2 on: September 20, 2013, 01:52:32 PM »
Yeah, well think about how much scripting that is for like... 1 room. Like 20 scripts for gravestones in one room? The actor workaround might be a better workaround as far as workload :P

Grokitach

  • Posts: 99
  • Hotlane Creator
    • View Profile
Re: Item Corpses
« Reply #3 on: September 20, 2013, 02:02:13 PM »
Lol. You haven't made any firetrap labyrinth isn't it ? It's about 8 scripts for 1 square. I made over 100 squares in my map in less than 1 hour. Just group your scripts and copy paste them. After that you link the change doodads scripts to your different doodads and it's done pretty fast.

Heretic

  • Moderator
  • Posts: 305
  • Castle Runner
    • View Profile
Re: Item Corpses
« Reply #4 on: September 20, 2013, 02:08:09 PM »
I've done plenty of scripting. You're suggesting putting a script on every single barrel and crate equivilent lol, that is just bad design. Will make the level file sizes much larger, will add more computing per tick, and have you ever played throught he game as a mage? You can destroy 20+ of these things at a time and that would be 20+ more scripts being executed per second, more processor usage, etc.

Grokitach

  • Posts: 99
  • Hotlane Creator
    • View Profile
Re: Item Corpses
« Reply #5 on: September 20, 2013, 02:16:11 PM »
If you plan to add thousands corpses of items everywhere, it's a bad idea sir. Your game will be slow downed by all these sprites for sure.

And yes I played everyclass and even tweaked them a bit in my map because all the classes are not well balanced.

Heretic

  • Moderator
  • Posts: 305
  • Castle Runner
    • View Profile
Re: Item Corpses
« Reply #6 on: September 20, 2013, 02:17:56 PM »
Having a sprite change from one to another is no more load than the sprite being there in the first place! The engine doesn't display both of them at the same time you know :P

Grokitach

  • Posts: 99
  • Hotlane Creator
    • View Profile
Re: Item Corpses
« Reply #7 on: September 20, 2013, 02:19:49 PM »
You can check the characters like plant towers. There's a line in their xml that say to spawn a razed doodad after their death. You could do the same with your gravestones.
But I think that it will not be a great idea for a map if you have too much of them.

Heretic

  • Moderator
  • Posts: 305
  • Castle Runner
    • View Profile
Re: Item Corpses
« Reply #8 on: September 20, 2013, 02:21:29 PM »
That's pretty much exactly what I said :P But the add to the workload should be minimal as it is switching one sprite to another, and not adding anything.

Heretic

  • Moderator
  • Posts: 305
  • Castle Runner
    • View Profile
Re: Item Corpses
« Reply #9 on: September 20, 2013, 02:26:50 PM »
I've decided to scrap the idea anyways, as I want the gravestones a bit bigger and as workable terrain rather than breakable. Maybe I'll have some of them be cracked as secret containers similar to the secret entrances? o.O

Grokitach

  • Posts: 99
  • Hotlane Creator
    • View Profile
Re: Item Corpses
« Reply #10 on: September 20, 2013, 02:28:43 PM »
Yeah maybe. I understand your point.

Anyway, the game seems to have hard times loading lots of sprites at the same time (for example towers projectiles). Maybe it will work with your things, maybe the game will have hard times loading 100 sprites spawning at the same time when you cast a meteor swarm.

Grokitach

  • Posts: 99
  • Hotlane Creator
    • View Profile
Re: Item Corpses
« Reply #11 on: September 20, 2013, 02:30:01 PM »
Yes, spawning pick up upgrades or life or potions ;)