Dungeon Master Java reworked

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
User avatar
solito
Journeyman
Posts: 89
Joined: Tue Feb 26, 2008 10:44 pm
Contact:

Dungeon Master Java reworked

Post by solito »

I've worked again on the DMJava code to make it as faithful as possible to the original DM.
Here is a link to the details of my version :

http://solito.free.fr/games/dmjava/solito_addon.html


You can contact me by email, if you are interested in this version.

Good Game.

Thank you Alendale.
User avatar
ian_scho
High Lord
Posts: 2806
Joined: Fri Apr 07, 2006 8:30 am
Location: Zaragoza, Spain

Post by ian_scho »

Wow, you have done a lot of work here.

Can I assume that the old dungeon format is NOT compatible with this one?.... Ahhh, found it.
Loading a Dungeon or Saved games v1.5 (original version) should work but the new saved file will be changed in v2.0 by the Editor or Game
You have mentioned fixing a few bugs fixed as well, that I noticed before when I was in my dungeoneering phase. These two below I'm sure were there when working on Alan's version
-fixed a bug that hanged the game (Wall and Floor switch activating itself)
-Play sound option with 'Loop - Delay' or 'Loop - No Delay' was not saved properly
Is there a bug where the memory continues to 'grow' with each sound played? It's not so important.

The list of changes is impressive.... Java version is 1.5 is it not?
User avatar
solito
Journeyman
Posts: 89
Joined: Tue Feb 26, 2008 10:44 pm
Contact:

Memory growing

Post by solito »

You are absolutly right, memory grows with the sounds and freezes the game after a while.

I fixed this too...

I'm still making some minor changes (animating monster death cloud, changing magic resistance (fire and magic resitance are 2 different things in orig DM)). Final version should be ready VERY soon!
User avatar
solito
Journeyman
Posts: 89
Joined: Tue Feb 26, 2008 10:44 pm
Contact:

Post by solito »

List of changes updated on my site.

I will stop working on this version for the time being, my next goal was to implement the "magic resistance" (very different from "fire resistance"), therefore the spellshield from Tiggy or magic shield potion would make sense.
This actual version only uses "magic resistance" as a defense vs all spells.

latest changes :

1) To compensate, I decreased by 50% the magic resistance of Heroes and Monster vs all spells expect vs Fire (immune monsters remain immune) in my version : lightning bolt is now more useful than fireball vs some monsters, like in the original DM.

2) Mana recovery drains stamina (vitality needed)

3) Cloud of dust for dead monsters.

I guess, this version should be played/tested by some of you interested and send feedbacks to adjust the balancing of the game, it's always tricky to balance a game correctly especially when trying to be faithful to an known version.

Good game.
User avatar
solito
Journeyman
Posts: 89
Joined: Tue Feb 26, 2008 10:44 pm
Contact:

v2.0 available

Post by solito »

I made the game available but this is a temporary version.
It will be changed with most (if not all) the real values of the default game 'dungeon master' :

to be added/changed (based on original game) :
- add all hidden skills
- add attack type for monsters (ex. screamers use psychic attack : wisdom computed for defense)
- add chance to wound a hero for each monster (ex. screamer can never hurt where a rock pile can only hurt legs/foot, etc..)
- add Anti-Fire to heroes
- add luck to heroes
- Remove magical defense from items (replace with sharp defense)
- Remove intelligence for heroes
- change spell cost/experience/delay action
- etc...

[u]If you know other source of info than dmweb.free.fr/ , please, let me know, I think some informations are missing there.[/u]

I will keep a internal patch system to change from version 1.5 (from alendale) to my version but I won't implement a patch to upgrade my own versions.
In other words, it will be possible to change a 1.5 dungeon to my latest version but not a v2.0 to the latest version.

This version is 2.0.
newguy
Neophyte
Posts: 8
Joined: Wed May 09, 2007 7:22 am

Post by newguy »

Hello Solito,

I have sent you email in which I need you to respond to. Please take a moment to read the email regarding an employment opportunity.

Thank you,

LK
syrphid001
Novice
Posts: 10
Joined: Wed Mar 21, 2007 11:02 pm
Location: UK

Post by syrphid001 »

Hi,
Like the update - however for me the main screen does not show any text - enter, resume, custom, view intro and exit - therefore I am having to hunt round the screen to start the game. Is it possible to change this?
Adama
Neophyte
Posts: 2
Joined: Tue Jun 05, 2007 11:52 am
Location: Barcelona, Catalunya

Help offered

Post by Adama »

solito

Hi solito,

I'm a java programmer and I planned to reworked DMJava mydelf but I haven't had enogh time. :oops:
But you made a very huge work and I would like to help to improve this marvelous piece of work.
If you plan more improvements I'd be glad to enter in this v2 DMJava version. :wink:
User avatar
Adamo
Italodance spammer
Posts: 1534
Joined: Fri Apr 22, 2005 11:59 am
Location: Poland
Contact:

Post by Adamo »

WHO STOLE MY NICK??? ;)
Hello Adama & welcome to the forums!
Spoiler
(\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/)
Spoiler
(@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@)
Spoiler
(>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<)
Adama
Neophyte
Posts: 2
Joined: Tue Jun 05, 2007 11:52 am
Location: Barcelona, Catalunya

Post by Adama »

Hi Adamo, :D

thank you!!
syrphid001
Novice
Posts: 10
Joined: Wed Mar 21, 2007 11:02 pm
Location: UK

Post by syrphid001 »

It would be good to have some extra features.

A line of text to say success with a spell or potion.
More information when an object is raised to the eye icon. Such as for custom items the custom number would be useful - I keep looking for items and never seem to find the right one no matter where I go in the dungeon.

Also the darkness does not seem very dark - I remember that in the original FTL game when it was dark - it was really dark near pitch black and without a torch or light spell you could not see anything.

Stamina - when sleeping to recover health or mana this can reduce so much that it stops the character from sleeping and can in extreme cases result in death due to the stamina being reduced so much when sleeping, I agree that stamina should be affected when recovering health and mana but not at such an extreme amount.

My intro screen does not have any text on it, so I have to hunt for the resume, new etc. Nobody else seems to have this problem, but it is as if the text is transparent! I can find the right places but if I press incorrectly I can exit instead of playing!!

How difficult would it be to increase the graphics quality ? it would be nice to have really good looking items, rather than ones which look like sprites - I know that DM Java is a remake of the FTL classic but there are other clones which try to emulate the original look of this game - that doe not mean that DM Java cannot be brought up to date graphically. (Please note this is just a thought from someone who cannot program and therefore does not know the difficulties this may involve).
User avatar
beowuuf
Archmastiff
Posts: 20687
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Post by beowuuf »

Graphically I think all the graphics can be replaced, just hi-res graphics take a huge amount of time. However, if you can get them, you can use replace all the files that are in the current graphics folders with new ones I believe
syrphid001
Novice
Posts: 10
Joined: Wed Mar 21, 2007 11:02 pm
Location: UK

Additions/Changes

Post by syrphid001 »

I know the original aim was to reproduce the FTL game, however if a modification to the code and graphics is to continue then I have some suggestions.
In Alan Berfield version a message saying that a succesful casting of a spell had taken place, as some spells are not always visible this would be useful to have.
An animated mouth/face when eating or drinking.
Re-arrangement of screen to allow for extra icons:
Fingers for rings (at the moment you can hold a ring or something else but not both at the same time) you should be able to have at least three rings per hand.
Use of both hands in the weapon field, so that sword can be used in one hand and a potion or wand could be used in the other hand.
Larger quiver.
Larger backpack.
Larger pouch.
If shops are to be implemented then a coin pouch would be required which would show the number of gold, silver and bronze coins - color of coin with number next to it. Special coins (Gor etc used for triggering doors etc) would still be separate.
Ability to sell items found in the dungeon as well as buy items which may not be found anywhere else.

On a separate note on the intro screen I have no text (Enter, Resume, Custom, View Intro and Exit). Any ideas?
syrphid001
Novice
Posts: 10
Joined: Wed Mar 21, 2007 11:02 pm
Location: UK

Graphics

Post by syrphid001 »

If replacing the graphics would the format have to be changed as *.GIF seems rather limited. *.PNG seems better or would *.JPG be better still? Memory should not be a problem as most of us probably have at least 2gb of memory and 256mb of graphics.
User avatar
Gambit37
Should eat more pies
Posts: 13714
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Post by Gambit37 »

JPG is an awful format for game assets, count that out straightaway.:-)

Don't be too certain about the 2GB ram and 256MB graphics card. That might be normal for new machines, but some of us still have older machines that aren't anywhere near that spec. :(
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

2GB ram and 256MB graphics card
The folks that created DM on a machine
with 0.0005GB and 0.0000MB graphics would
wonder about needing such things. It is like
putting a 5 liter, super-charged racing engine
on a surfboard. It ain't no longer a surfboard.
syrphid001
Novice
Posts: 10
Joined: Wed Mar 21, 2007 11:02 pm
Location: UK

graphics format

Post by syrphid001 »

So which format would be better for higher resolution graphics?
Would a revision to the code be required to allow for different formats to be used by different users?

Please note that I cannot program and therefore I do not know what problems this would entail.
User avatar
linflas
My other avatar is gay
Posts: 2445
Joined: Tue Nov 04, 2003 9:58 pm
Location: Lille, France
Contact:

Post by linflas »

PNG (GIF sux, JPG is worst)
Roquen
Artisan
Posts: 179
Joined: Fri Jul 11, 2008 11:34 am
Location: Biarritz, France

Post by Roquen »

If anyone is mucking around with a DMJ code clean-up, an issue would be moving the source into packages. The trick here is that the data files are (sort-of) serialized. This is easy to fix but the technique is not generally known.

Loading 'legacy' data files COULD be handled by using a custom ObjectInputStream class, as follows:

Code: Select all

public class WhateverName extends ObjectInputStream
{

  private static HashMap<String, Class<?>> map = new HashMap<String, <Class<?>>();

  private static final boolean DEBUG = true;

  // this is merely an example...all moved classes must
  // be present.
  static {
    map.put("Item",    Item.class);
    map.put("[LItem;", Item[].class);
    map.put("Chest",   Chest.class);
  }

  protected ObjectStreamClass readClassDescriptor() 
  throws IOException, ClassNotFoundException
  {
     ObjectStreamClass desc  = super.readClassDescriptor();
     String            name  = desc.getName();
     Class<?>          clazz = map.get(name);
     
     // print out name to track down any missing
     if (DEBUG)
       System.out.printf("class lookup: %s\n", name); 

     // if we've found a moved class, return its description
     if (clazz != null)
       return ObjectStreamClass.lookup(clazz);

     return desc;    
   }
The above usage of HashMap is overkill, since the number of classes that are really serialized is small. Most are explictily written/read from the stream.
User avatar
Kelly
Artisan
Posts: 157
Joined: Thu Aug 31, 2006 7:51 pm
Location: U.K.

Re: graphics format

Post by Kelly »

syrphid001 wrote:So which format would be better for higher resolution graphics?
Would a revision to the code be required to allow for different formats to be used by different users?

Please note that I cannot program and therefore I do not know what problems this would entail.


Just hanging around the forum while I have a minute, and I noticed your question.

To change the graphical format from GIF you would need to edit the DMJ code that handles these attributes.
Doing the addon packs, I changed from GIF to PNG for the teleporters and some walls as PNG allows for transparencies <(spelling?) and basically just looks better allowing for more colours to be used, yet I can still maintain a smaller filesize.
You can bang these up as high as you like, but not everyone will be able to use it, coz not eveyone will have the PC spec's as mentioned elsewhere.

Basically, to change from GIF, you'll have to change the code as well.

I do know that monsters are default as both GIF and PNG.
User avatar
caclark
Neophyte
Posts: 4
Joined: Thu Mar 20, 2008 9:12 pm

Post by caclark »

Roquen wrote:If anyone is mucking around with a DMJ code clean-up, an issue would be moving the source into packages. The trick here is that the data files are (sort-of) serialized. This is easy to fix but the technique is not generally known.

Loading 'legacy' data files COULD be handled by using a custom ObjectInputStream class
Thanks for the pointer on ObjectInputStream there - I admit that the serialization/deserialization code creates a big problem because of the fact that all the classes are in the default package. I agree that making a base package for the game is a good start for a refactor of the code - maybe something like net.alandale.dm? 8)

Also, another big issue is splitting up the uberclasses in the code - for example dmnew is too large as a class, and would suggest that the actual main class for the game be something such as 'Main' (with a manifest.mf entry for it being the main class), and all the classes such as Monster Hero and Item being moved out as classes of their own (instead of being inner classes of the main class).

Once all the structural refactoring is done there, maybe dedicating individual packages to I/O, sound, graphics, etc.

Any thoughts?
Roquen
Artisan
Posts: 179
Joined: Fri Jul 11, 2008 11:34 am
Location: Biarritz, France

Post by Roquen »

Since my serialization post, I had actually started on ripping the code apart to allow for a major clean-up (assuming that someone is motivated to do it). Personally I doubt that I will put a ton of effort into this as I feel it would be less effort to create a new clone. However, my hacks have opened lots of avenues for making the code reasonable. I've started pretty much everything that you mention plus some other stuff.

See this thread: DMJ Hack-in-progress

Let me know if you want a snapshot of the source.
User avatar
caclark
Neophyte
Posts: 4
Joined: Thu Mar 20, 2008 9:12 pm

Post by caclark »

Roquen wrote:Since my serialization post, I had actually started on ripping the code apart to allow for a major clean-up (assuming that someone is motivated to do it). Personally I doubt that I will put a ton of effort into this as I feel it would be less effort to create a new clone. However, my hacks have opened lots of avenues for making the code reasonable. I've started pretty much everything that you mention plus some other stuff.

See this thread: DMJ Hack-in-progress

Let me know if you want a snapshot of the source.
Would be very interested in looking at that snapshot, Roquen 8) at the moment, using your serialization tip (which works great, and was just what I was looking for to aid the package based refactoring of the code, thanks) I have already started doing a major refactor myself (mainly along the lines of not adding functionality, but just trying to restructure the code more sensibly).
kukulcan
Neophyte
Posts: 8
Joined: Sun Jan 04, 2009 12:58 pm

Post by kukulcan »

Hi...

I tried to run DMJ on iPhone, but with little success, maybe some of you can help me.

The JamVM engine as well as the alcheMo (which converts Java to C) both dont work with the AWT Toolkit. Would it be feasible to replace those calls with other calls available on iPhone.

To make it playable there probably need some changes to be done (to output sizes probably) but at least onscreen direction arrows...would that be a problem?
User avatar
ian_scho
High Lord
Posts: 2806
Joined: Fri Apr 07, 2006 8:30 am
Location: Zaragoza, Spain

Post by ian_scho »

I assume that it's a complete rewrite! Yes the images may need resizing, but I wreckon you'd have to recompile the source to the JavaME environment and perhaps remove any library dependencies that were there... Sounds like a lot of work to me. Not heard of anyone that has done it...

Pity that there isn't an emulator to run WinCE stuff on the iPhone, then you'd be flying with this version:

http://www.dianneandpaul.net/CSBwin/CSBwinCE10_9.zip
Roquen
Artisan
Posts: 179
Joined: Fri Jul 11, 2008 11:34 am
Location: Biarritz, France

Post by Roquen »

Doing a port of CBSWin would probably be easier than fixing-up DMJ.

In DMJ all the components are cluttered with AWT, the image sizes and 'mouse interactions' are all hardcoded sizes, positions, etc.

The dungeon view area is 448x326, where (correct me if I'm wrong) the iPhone has a 480x320 display. So the view almost fits and I suppose you could simply have three lost columns on both sides and it would really wouldn't matter. Then all the other UI elements would be needed to be refitted to work in the remaining space, which is possible. So the real trick would be AWT elements. With JamVM, the question would become are there existing native AWT that could be taken from somewhere else? Or maybe this might work: http://www.xmlvm.org/overview
kukulcan
Neophyte
Posts: 8
Joined: Sun Jan 04, 2009 12:58 pm

Post by kukulcan »

Thanks for the answers...I wasnt really looking into porting the game as I dont have the skills. I hoped it would easily work with the java options on iPhone just with some added directional buttons.

Should Sun fulfill their promise to release a virtual machine for iPhone I will try again, if it runs then I will think about making the necessary changes to make it playable.

Or maybe someone ports either the Amiga or Atari ST emulator, that should work pretty good.
User avatar
stewy
Craftsman
Posts: 122
Joined: Sun Nov 13, 2005 9:02 am
Location: Idaho

Re: Dungeon Master Java reworked

Post by stewy »

I have a question, Whenever I try to give my custom monsters items, and I update them It wont save them to the monster. is it me or the machine?
User avatar
ian_scho
High Lord
Posts: 2806
Joined: Fri Apr 07, 2006 8:30 am
Location: Zaragoza, Spain

Re: Dungeon Master Java reworked

Post by ian_scho »

It's been a while but I do recall having a similar problem as well. You'd place a monster down in the dungeon, with a special item added to it's inventory. Check it again and sometimes it won't have anything but the default items, if any at all. It's more an annoyance than anything as they do 'stick' eventually but I could never reproduce the behaviour to consistently get it to work.
Post Reply