Page 1 of 1

Dungeon Master Java reworked

Posted: Tue Feb 26, 2008 10:51 pm
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.

Posted: Wed Feb 27, 2008 8:46 am
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?

Memory growing

Posted: Wed Feb 27, 2008 11:17 pm
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!

Posted: Thu Feb 28, 2008 9:41 am
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.

v2.0 available

Posted: Mon Mar 03, 2008 9:10 pm
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.

Posted: Sun Mar 16, 2008 5:34 pm
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

Posted: Thu Jul 31, 2008 9:01 pm
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?

Help offered

Posted: Fri Aug 01, 2008 1:08 pm
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:

Posted: Fri Aug 01, 2008 2:09 pm
by Adamo
WHO STOLE MY NICK??? ;)
Hello Adama & welcome to the forums!

Posted: Fri Aug 01, 2008 2:47 pm
by Adama
Hi Adamo, :D

thank you!!

Posted: Tue Aug 12, 2008 6:58 pm
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).

Posted: Tue Aug 12, 2008 8:14 pm
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

Additions/Changes

Posted: Sun Aug 17, 2008 8:36 pm
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?

Graphics

Posted: Sun Aug 17, 2008 8:44 pm
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.

Posted: Sun Aug 17, 2008 8:51 pm
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. :(

Posted: Mon Aug 18, 2008 1:13 am
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.

graphics format

Posted: Mon Aug 18, 2008 5:05 pm
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.

Posted: Mon Aug 18, 2008 5:14 pm
by linflas
PNG (GIF sux, JPG is worst)

Posted: Sun Aug 24, 2008 9:35 am
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.

Re: graphics format

Posted: Tue Sep 09, 2008 3:01 pm
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.

Posted: Fri Dec 26, 2008 3:05 pm
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?

Posted: Sat Dec 27, 2008 9:37 am
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.

Posted: Sun Dec 28, 2008 8:40 pm
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).

Posted: Wed Jan 07, 2009 8:03 am
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?

Posted: Wed Jan 07, 2009 9:30 am
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

Posted: Wed Jan 07, 2009 10:31 am
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

Posted: Thu Jan 08, 2009 2:54 pm
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.

Re: Dungeon Master Java reworked

Posted: Mon Feb 02, 2009 7:08 pm
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?

Re: Dungeon Master Java reworked

Posted: Tue Feb 03, 2009 8:17 am
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.