DSP Status

I’ve applied for a sourceforge site for DSP. It is a takeover from another project using ‘dsp’ as its name already, they haven’t used the project at all however, (it has been idle for 2 years,) so I shouldn’t have any trouble getting the name.
I’ve done some minor improvements since the last release including:
– Show splash/speed when > 0
– Show tower stats when maxed.
– Very minor rendering tweaks.

I’ve also been researching improving the framerate and trying various different techniques.
Currently DSP renders at 30fps on the PSP, dropping to 20 if you are on the ingame-menu when between waves (text rendering is slow by the looks).
I’ve tried converting the rendering engine from immediate mode to use vertices with glDrawArray, this gave no noticable FPS differences.
During this testing I discovered that certain textures of the same size render faster than others.
Looking into this further (including the pspgl source) It would appear to be that PSPGL doesn’t copy/move textures between GE-Memory and System-Memory, so if your texture ends up in system memory you get slower render speed and nothing you can do about it 🙁
Will need to do more research into this including a debug build of PSPGL to find out what is really happening, but that is my current thoughts.
It may be possible to fix this in PSPGL or alternatively switch to using GU for rendering on PSP instead, we will see.
Not something DSP needs as of yet since the framerate stays high even with huge waves with lots of towers firing at them, but something new, fun and interesting to work on at some stage 😉

I’ve also created a draft XML file for the next level format: http://OFFLINEZIP.wpsho/dsp/level_draft_1.xml
This is a proposed replacement for the current level.txt.
Switching to XML for the file formats will give numerous advantages:
– Files become alot more self explanatory (no more, “what is line 5 again?”)
– Better backwards compatibility in the future.
– etc… >_>
Please give it a quick look over and offer any suggestions you may have (especially you Shazz!)

I will also switch enemy.txt / tower.txt to XML files, but haven’t drafted any up yet.

Another interesting thing I’m thinking about adding is the ability to run levels from within zip files, this will make for much faster copying of levels to your PSP.

Thats enough news for now.
danzel.

Update, will use this post for general ‘next gen’ XML file format discussion.
level.xml changes:
– Capitalize all attributes.
– Add ‘Radius’ to waypoints.
– Change “Name” attribute to “Folder”
– Change Path.flags to be seperate attributes (Boss, SaveTheHouse, UpgradePoint, all default to false)
– Add Enemy.Multiplier, makes old enemies new again! 😉
I’ve also added an enemy and tower draft, no big changes in there yet.
http://OFFLINEZIP.wpsho/dsp/level_draft_2.xml
http://OFFLINEZIP.wpsho/dsp/enemy_draft_2.xml
http://OFFLINEZIP.wpsho/dsp/tower_draft_2.xml

Draft 3
Level:
– Add Level.LevelSprite (includes changeable Width, Height)
Enemy:
– Enemy has levels, the first one is used by default unless specified in Level.Waves.Wave.Enemy->Level (Which replaces Multiplier)
– Specify Sprites/Sounds in XML, allows different amounts of Frames for each.
– Add a “Leave Level” sound.
Tower:
– Add Capability (Hit Ground/Air, Slows), Replaces old tags
– Add Sprites (includes turret position)
– FireSprite (shown when shoots).

http://OFFLINEZIP.wpsho/dsp/level_draft_3.xml
http://OFFLINEZIP.wpsho/dsp/enemy_draft_3.xml
http://OFFLINEZIP.wpsho/dsp/tower_draft_3.xml

Draft 4 (final)

Everything:
– UpgradePoint is now an integer everywhere.
Level:
– InterestLevel/Live can now cost upgrade points.
– Add StartSound to Wave.
– Add Win/Lose (With Sound and Sprite)
Enemy:
– Add Weakness (take more/less damage from certain towers)
Tower:
– Add PlacementSound
– Add SellAmount to Level
– Add Poison:Damage/Length to Level
– Move Capability.Slow to Level.SlowLength/SlowAmount
– Change to , has supporting attributes for shot animation etc.

http://OFFLINEZIP.wpsho/dsp/level_draft_4.xml
http://OFFLINEZIP.wpsho/dsp/enemy_draft_4.xml
http://OFFLINEZIP.wpsho/dsp/tower_draft_4.xml

Still missing:
– Music, Special music for boss waves.
Smoke trail ShotType.

Missing but may not make it:
Add min range (to define a target reachable band instead of a target reachable disk)

47 thoughts on “DSP Status

  1. apfel

    Wow, would increase size of file, but better and faster to understand/edit. I see a bright futur for a map editor with xml support.
    About zipped levels: What load method do you consider? (tmp unzipping->playing or load in memory->playing)

  2. Shazz

    ah ah ! very cool update, and apfel (tv8 ?), the size will be a little bit more but in comparison to the wav files and all the png, that’s nothing, and only used at loading. Having sounds as mp3 or atrac3 would be a better optimization

    About the perfs issues, Danzel, I’ve got a good knowledge of the GU so I can help you to optimize, the fact is if you want to keep SDL and the fact that it runs on the PSP, Windows, OSX and Linux (which is uberGood) we will have to see how to manage it…

    My feedback on the XML :
    – for the TowerMenu tag, I think it is dangerous to implicitely match the value with the folmder name (on Windows it doesn’t work if you use Capital letters), I would prefer a folder attribute to make the link
    – Paths : cool 😀 I hope a type attribute will be there later to define different path types (path finding, waypoints, curve,…). Oh you did it for pathc, perfect !
    – Waves : perfect…. just a question, I’d like an option that can enable/disable the fact that you have to push a button for a next wave and have the option to set the waves against the time (like in DesktopTD)
    – for Enemy, same comment, dangerous to implicitely map a name to a floder name
    – for Enemy, possibly a radius factor to set the enmy along the path (to avoid straight lines)
    – for Waves, isntad of flags=”UH maybe better to have explicit attributte like Boss=”False” SaveTheHouse=”True”

    So only minor comments, that is exactly what I was waiting for !

    all for now !

    Good work Danzel, you well earned your 200$ 😀

  3. Danzel Post author

    @apfel – I would be loading the files in memory, we have memory to spare and well, its just better 🙂

    @Shazz – mp3/atrac3 will be a possibility in the future for sure.

    How do you see the TowerMenu thing working, currently the name is the foldername, which obviously works badly. Could you write a sample bit of xml or something in this respect?

    Paths – oh yeah, curve, will add that in.

    Waves – there is a timer which can be used to force new waves: waittime.
    It will allow you to have multiple overlapping waves on different paths, etc.

    radius – You mean enemies will walk within this radius of the actual path, instead of walking directly on it? If so should be able to add this.

    Wave Flags – Definitely!

    Thanks 🙂

  4. Shazz

    Hiya Danzel !

    First of all, I was looking for a free, light and easy2use XML editor to help the level maker, at least for the time that we don’t have a fully integrated editor for DSP (and only you knows if it will happen 😉 )
    So I found a little tool which is nice to fill the XML, permit grammar checking and so on…

    http://www.firstobject.com/dn_editor.htm
    direct link : http://www.firstobject.com/foxe22.zip

    Tell me if you like it and then I can try to make a full package with TileStudio, some scritps and this tool for final XML tweaking

    About the /folder name issue, yep that’s no an easy one… I would propose :

    And the name should match with the Tower.xml attribute to check for errors. (not sure this name attribute is really useful :D)
    But at least an attribtue name directory may warn people they have to enter a filepath.

    About the radius, yes that’s that to be able to have this kind of enemies walk :



    instead of :
    – – –

  5. Shazz

    Arg…. wordpress deleted my XML tag ! It refuses brackets !
    So I meant :

    About the -TowerMenu-/folder name issue, yep that’s no an easy one… I would propose :

    -TowerMenu x=”0″ y=”0″ directory=”mytower” name=”SuperCool Tower”/-

    and for the radius, to have for example an arrow of enemies instead of a straight line

  6. Danzel Post author

    I see, don’t really need the name attribute there, that would be defined in the xml file for the tower.
    Speaking of which, I’ll go knock up tower/enemy xml files.

    And Updated, check the post.

  7. Shazz

    Cool !
    New comments ? Yes !

    Level.xml

    – Maybe add at the beginning something like
    That’s nice as if you use a validation-able XML editor, it can immediately validate your file (and having generated a DTD, it seems the XML is not valid, there is an issue with the Path, Stat and End tags (dtd : http://tmpstore.free.fr/DSP/level.dtd)

    – you forgot a doublequote in laser folder (cool to have automatic validation :D)

    – Quite cool to have a multiplier at the enemy level for recycling… I guess later could be nice to specify for an enemy a level instead of a multiplier

  8. Shazz

    The tower XML :

    – it was the case in text also but I still don’t understand the turretLength ? what does it do ?

    – instead oh HitsX and Slows why not a Capability Tag with attributes HitsGround=”True” SlowDown=”True” …

    Optionaly :

    – Maybe to have tags for the resources : png and wav instead of explicit file links (shot.png, icon.png…).
    I mean we can define in XML the different sprites and sounds with names and parameters :
    – I’d like a TurretPosition tag to define the X,Y position of the turret
    – I’d like some spriteSheet parameters to define the shot animation (number of sprites), same for explosion.
    – same for the sounds
    – possibly a fire sprite to show when the turret shots (like sparkles, flames…)

  9. Shazz

    The Enemy XML :
    – like the Tower I’d like to be able to define levels (so for each level the health, the goldvalue, the speed, the size could be different
    – tags for resources (png, wav)
    – DOCTYPE
    – Capability tag with flying=true, immunize, unslowable…
    – Frametime used in the resources tags

  10. Danzel Post author

    Validation will be good, I’ll leave making a DTD until we are closer to finalising the format.
    Doctype yep, but we’ll need a DTD 😉

    Turrent Length: its the distance from the turret position (currently assumed to be the center) where shots are spawned.
    This means if your tower has a long turret, shots will spawn at the correct position (the end of the barrel).

    TurretPosition: Yep.
    Capabilities sounds good, cleans that up a bit.
    Enemy Levels sounds good, can always default them to level 0.
    SpriteSheet/Resources w/ parameters: will do.
    Firing sprite: will do

    I’ll post another updated version tonight.

  11. Shazz

    Eh eh it seems you’re working when I’m sleeping…. that’s global coworking 😀

    I have generated the DTD for level and seems to work well : http://tmpstore.free.fr/DSP/level.dtd, you can use it to start if you like.

    Cool for the update 😀 I did not expect all my comments to be taken into account 😀

    If there are some points I can help in investigating or whatever, just tell.

    Danzel for president ! 😀

  12. apfel

    level.xml
    //
    // arrow
    // fire
    //

    Only one upgrade point possible per tower or can I make a tower, which requires more upgradepoints?
    Do I need always to set a “X”.

  13. apfel

    the missing part of my previous commant:
    (Requirements UpgradePoint=”true”)
    (RequiredTower)arrow(/RequiredTower)
    (RequiredTower>fire

  14. shazz

    perfect…. all the comments I can make are already in your still missing section !

    however…. even if I can leave with it…. in level.xml the fact that there is no name for an enemy and a tower and the only link is a folder name looks strange… bah.. that’s me, forget !

    and for the dtd, yes, I forgot to delete the 16, 64… values from the generated dtd.

  15. Danzel Post author

    We’ll go to draft 4 (which I’ll knock up in the next 24hrs, should get time). Then that will be the plan going forward. (Shouldn’t be any/many major changes in it, just some additions)
    After draft 4, assuming there are no issues, Me/Shazz will make an ‘official’ DTD for each of the files to let you verify against, this may change in minor ways as we go forwards with implementation of course.

    You may have to wait a while before you get a build that loads the XML bits however 🙂 Could take a while to code all those new features, lol.

  16. shazz

    Très bien !
    Let’s start with this !
    I will generate the DTDs asap, test them a little and post a link.
    Then I’ll update the tileStudio env to generate both txt and XML versions.

    Danzel, time to add the tinyXML parser now 😀

    what about sourceforge ?

  17. shazz

    TowerDTD posted.
    http://tmpstore.free.fr/DSP/tower_draft_4.dtd

    add to the beginning of the XML file :

    or download it to your XML folder locally and add :

    Note for Danzel :
    – FireSound, HitSound and PlacementSound are mandatory by an attribute Use (True or False) indicates if it is used. (DTD forbids optional root elements or I did not find how to do it)

    I made some tests, adding ,removing, specifying bad values� looks ok

  18. Danzel Post author

    Still waiting on Sourceforge, might have some time to check out those DTDs in the 24hrs.
    Should be able to do optional root elements, otherwise that sucks 🙁

  19. BetaSword

    Using the tower DTD, I noticed that it still requires a turret sprite and a fire sprite. Is it possible to make those two optional, like the various sound effects, as well? Cause right now, none of my towers use either (their all just static images), and requiring both means I’d have to have just blank .pngs hanging around in the tower folder.

  20. shazz

    BetaSword, according to Danzel’s draft, I did not know if those 2 sprites definition can be optional or not…

    But I may understand that the turret can be optional… and the fire sprite too… so I have update the DTD to have both optional, Danzel will react if he doesn’t agree 😀

    get it at the same url :
    http://tmpstore.free.fr/DSP/tower_draft_4.xml

    cool to see some people use the DTDs !

  21. borgqueenx

    danzel, could you take alook at the dcemu psp news forum, and click duke nukem 3d there, and check page 15 and 16, id hope you could fix it.
    the thread is on page1.
    sorry for talking offtopic, but i lost your email:(

    its such a nice game and i was hoping you could fix the damn loading bug…
    everyone there waits for a developer to fix it and i thought maby you could…

  22. Danzel Post author

    @borgqueenx.
    If the source isn’t too hard to get working I’ll have a look for what I can do.

    My email address is in the readme for everything I’ve released 😉

  23. borgqueenx

    mmmm thats to bad, i really like the port on the psp, no lag…
    i wish loading could work.

    anyways you tried:) and i’m happy you could do that for me:)

    And uh, you said that your defence station game only needs music, and some other stuff.
    How many levels does it have now and can you attach a complete version to put on my psp instantly?

  24. Danzel Post author

    I’m doing a ‘project name takeover’, so it will take a while. I was certainly expecting it done by now however!
    I’ve done some minor things towards the next version, but I’m waiting on SF.net before I start on the XML reader.

  25. borgqueenx

    i’l send you some music made for my productions…
    i’l do that tommorrow…
    But you’l have to credit the composers who made the music ok?

  26. borgqueenx

    ok then, do you like the music good enough for dsp?

    PS:
    if you use bossfighting you need to credit /\lex, else you dont have to credit him…
    If you only use bossfighting, you dont have to credit Nils Kjellman…

  27. Danzel Post author

    Wow, you’re faster than Sourceforge, they still haven’t mailed me about it!
    Will get uploading and setting it up.

Comments are closed.