DMJ Hack-in-progress

This is a forum for the DM clone DM Java created by Alandale. Note it also has it's own set of forums at ezboard (link stickied)

Moderator: alandale

Forum rules
Please read the Forum rules and policies before posting.
Post Reply
Roquen
Artisan
Posts: 179
Joined: Fri Jul 11, 2008 11:34 am
Location: Biarritz, France

DMJ Hack-in-progress

Post by Roquen »

I've made some minor hacks to DMJ related to this thread: http://www.dungeon-master.com/forum/vie ... hp?t=27859

====
If anyone has any desired modifications, let me know.
====


At the moment, they are not very interesting for players.

* editor uses sub-menuing for quick level changing.
* compressed dungeon & save game files
* graphics files specified without extensions, so designer may override default graphics with any file type. Likewise for images specified in the editor, since neither editor nor game any longer care about the extension. As a side-bonus this would make adding a virtual filesystem and/or caching pretty easy.
* All actions can have an assigned sound-effect on triggering. The game takes the action name, removes spaces and dashes, lowercases and appends ".wav" to the end. If a file with that name exists, it is used as the sound when an action is performed. Otherwise the game uses the old default behavior.
* Added support for Ogg/Vorbis audio
* The action item icon is grayed-out while an action is in-progress.
* Minor eye-candy to equipment screen and when heroes take damage.
* Corrected bug in loading of (level specific) back-drop image.
* Modified maxload & stamina drain damage.
* Modified poison damage
* Add a logfile which reports missing assets.
* Fullscreen/Windowed mode (in-game) toggling.
* explicit vars logically grouped into arrays to open up generalization of routines,
* Dungeon specific scripting supported (partially added).
* virtual filesystem (partially added)

Java specific stuff:
* Generic types have been added to all objects. Little of the old-style casting have been removed nor loops converted into for-each.
* Image loading via ImageIO instead of Toolkit. (Toolkit spawns threads), with the exception of GIFs that contain animation.
* Some refactoring to pave-the-way for more generic routines and allow adding in support for hidden skills.

The modified version reads 1.04 & 2.0 files, but those written by both the modified editor and game are not non-backward compat. Now requires JRE 1.5.
Last edited by Roquen on Sun Dec 27, 2009 9:47 am, edited 9 times in total.
User avatar
Broken_Paladin
Craftsman
Posts: 107
Joined: Wed Oct 01, 2008 5:33 am

Post by Broken_Paladin »

Roquen has done an excellent job with the work he has done with dmj.
* All actions can have an assigned sound-effect on triggering. The game takes the action name, removes spaces and dashes, lowercases and appends ".wav" to the end. If a file with that name exists, it is used as the sound when an action is performed. Otherwise the game uses the old default behavior.
You can create your own action for a weapon and it will play the sound you assign to it (before it played no sound).
I.E Dagger has ability "Backstab" plays the "Backstab.wav".
User avatar
ian_scho
High Lord
Posts: 2806
Joined: Fri Apr 07, 2006 8:30 am
Location: Zaragoza, Spain

Re: DMJ Hack-in-progress

Post by ian_scho »

Roquen wrote:... GIFs that contain animation.
That was one thing Java 1.4 couldn't do I believe - animated gifs. I would fudge it at the time using a timed switch but it was a LOT of hassle!

I love the way you can override the action sounds.
Roquen
Artisan
Posts: 179
Joined: Fri Jul 11, 2008 11:34 am
Location: Biarritz, France

Post by Roquen »

DMJ doesn't have any heartbeat processing and I was too lazy to shoe-horn in a worker thread, so I just punt back to Java 1.0 for animated GIFs. The downside of that is all animations are synced, so if you have two torches they are always on the same frame. Which I find a mild annoyance as it breaks the illusion.
User avatar
ian_scho
High Lord
Posts: 2806
Joined: Fri Apr 07, 2006 8:30 am
Location: Zaragoza, Spain

Re: DMJ Hack-in-progress

Post by ian_scho »

A quote from elsewhere in the forum:
Roquen wrote:I have not done any data modifications, just worked on the game code
This means that all of the olde DMJava 1.4 dungeons would work with your build.
Roquen
Artisan
Posts: 179
Joined: Fri Jul 11, 2008 11:34 am
Location: Biarritz, France

Re: DMJ Hack-in-progress

Post by Roquen »

Yes, It (should be) 100% backward compatiable.

But dungeons created with my codebase will not run with the older version.
Post Reply