Custom Graphics for DMJava.

Discuss your creative projects: game development, writing, film making or any thing else, fantasy related or otherwise! Talk about art you like, display your own artwork or stories, or offer help and insight.
Forum rules
Please read the Forum rules and policies before posting.
Post Reply
User avatar
Kelly
Artisan
Posts: 157
Joined: Thu Aug 31, 2006 7:51 pm
Location: U.K.

Custom Graphics for DMJava.

Post by Kelly »

Hey.

I've been looking into "editing" DMJava for these past few days, and if you've read my previous posts, it's restricted to what you can do.
(As some would already know!)

I've been trying to understand the Java language - which I will state I'm very new at - to the point this is my first attempt! - But during these past few days, and the help of tutorials, I have made a few alterations.

I will also admit that at this moment, I have absolutely no idea what I'm doing - but my mistakes are helping me learn!!! :lol:

Anyway, I have at this point added new Wall Decoration - which although is quite basic for the time being - actually works!

I have also been trying to add animation - but from what I've found out Java 1.4 has it's restrictions in this regard.

I will continue to research this possibility - and as I learn, I will be implementing new "things" into DMJ as I progress.

This progess, however, will be slow - I've never done any programming of this extent before - not unless you count Basic on the Dragon32!!!

However, I'm sure in time my understanding will become more clear - and I will continue to work with Java and DMJ until I'm happy with the result!

Anyway, I'd just wanted to share my thoughts, and I will post my progress, regularly.

PS - If anyone has any advice, I would be extremely grateful - not to mention a big, wet, sloppy kiss! :lol:
User avatar
ian_scho
High Lord
Posts: 2806
Joined: Fri Apr 07, 2006 8:30 am
Location: Zaragoza, Spain

Post by ian_scho »

You can fix a 'feature' that has been bugging me for ages, then. :P

With custom pillars, if you dont get exactly the same width as pillara.jpg or pillarb.jpg the image in the dungeon will sit either to the right (off) or the left.

The image should always be centered imho, disregarding it's width dimension.

On another point you could post bullet points as to what you want to do. Other users may have suggestions, or even save you development time by suggesting work-arounds. I'd love to have the time to poke around with the DMJava engine myself. I've got it loaded in Eclipse recompiled and everything but alas, no time.

Good luck
User avatar
ian_scho
High Lord
Posts: 2806
Joined: Fri Apr 07, 2006 8:30 am
Location: Zaragoza, Spain

Post by ian_scho »

No kisses, mind.
User avatar
Kelly
Artisan
Posts: 157
Joined: Thu Aug 31, 2006 7:51 pm
Location: U.K.

Post by Kelly »

Just a little update......

Hmmm, is been hard going, but a few bits here and there are working out, although very slowly.

One of the things I do want to get working most at the moment, is custom levers, buttons etc...

At the moment you can only utilize the ones from the main map dir - which obviously looks odd when using custom maps (walls).

I can see where the problem lies, I'm just not familiar with Java enough to correct it.... I WILL keep trying - it's just gonna take a while for my intelligence to comprehend it all!!! :lol:

I'll be sure to take a look at them pillars as well - and I've also found the key to making things animate - just don't know how to code it yet!!!

Like I've said, progess is slow, and there is MUCH I have to learn! - but for those who are interested I will be around for quite a while, figuring this out, and I will be posting my progess regularly.

Until then, I'll take that "good luck" with enthusiasm - I'm gonna need it! :P


EDIT:- Took a look at the pillars. Basically, from what I can tell, the pics are centralized. What happens, is whan you "turn" around the pic "follows" you - hence it "turns" around with you. A mirror effect???


Hmmmm - will look at this futher...
User avatar
ian_scho
High Lord
Posts: 2806
Joined: Fri Apr 07, 2006 8:30 am
Location: Zaragoza, Spain

Post by ian_scho »

Thanks for that Kelly. For some reason I could have sworn that the pillars weren't centralised....

The switches (wall and floor), will probably be one of the most complex parts of the game. Indeed, I wreckon I use the wall multiswitch for everything. The multifloor switch I find a bit buggy, btw, and can crash the game. I assume that they dont reuse the same code between them.

Being able to use multi custom wall maps in the same dungeon would be great. As you've pointed out, not all wall objects are updated upon changing level.

More luck
User avatar
Kelly
Artisan
Posts: 157
Joined: Thu Aug 31, 2006 7:51 pm
Location: U.K.

Post by Kelly »

Okay, the wall switches are proving difficult, to say the least!

There are just so many of them, the code is complicated - for me anyway.
I'll get back to this at a later.....

For now, I thought it best to start with something "smaller", so I've been trying to add custom mirrors (hero mirrors) from any custom directory. At the moment they only load from the main "maps" dir.

The code is much easier to follow - but unfortunately I keep getting an error. I'm missing something - but I will endeavor!!!

Anyway, I will keep plodding on, and I will sort it out! Just keep that good luck coming! :lol:
User avatar
Kelly
Artisan
Posts: 157
Joined: Thu Aug 31, 2006 7:51 pm
Location: U.K.

Post by Kelly »

I've found out a few more things - Pillars have to be a certain size in order for them to be centralized - however, the coordinates can be changed within the Java code. The only down-side to this, is that if you change the custom pillar coordinates - you'll have to stick with it.

The up-side is, you can centralize bascially anything, especially if your willing to sacrifice one of the pillars - in which case, I've made an outside dungeon, which opens up to reveal a large mass of water. I've made it so you can't cross this, by using invisible walls or teleporters to block your path.

Might be worth looking at?

Also, I've been messing around with custom walls - now if you're willing to get creative, you can utilize two (or more) seperate wall sets into one dungeon theme. This requires switches to work (I used floor switches) but it is effective.

Bascially, how it works, (Some would already know this) is you place a floor switch on the square in front of where the new "wallset" is going to appear.
(I seperated this by placing a door first and making the switch invisible).

Then tell the switch to teleport you to a new level - targeting the level for your new graphics. It would be best to make the dungeon look the same (like a corridor or room in which your new graphics will appear) - hence it looks like you've just opened a door and entered the "new" room, while not looking like you've entered a new level.

Now this isn't perfect - but with a little creative flair - can be made to look better. I'm looking into it more now.

This can also work for custom doors as well - and if you copy over the default "breakable" doors (default wood and grate) you can obviously break them. Some would ask why? Well, again if you're willing to get creative - a "door" doesn't have to look like a "door" - if could look like a breakable wall (put some cracks in it so it appears damaged) or something entirely different (a pile of rocks or even a tree).

Whatever you decide to add, the coordinates can be changed to centralize it - I've mentioned walls and doors here, because they are the most customizable graphics from any custom maps directory.

Anyway, I'd just wanted to share my thoughts - and to give others ideas for their own projects.
User avatar
ian_scho
High Lord
Posts: 2806
Joined: Fri Apr 07, 2006 8:30 am
Location: Zaragoza, Spain

Post by ian_scho »

...if you change the custom pillar coordinates - you'll have to stick with it...
I dont know if the library used for the images has the option to give you the width of the image. You could always center it then.
...opens up to reveal a large mass of water.
'Intriguing'. Moreso if I could spell the word.

Didnt know that you could make switches invisible. That's done by changing the image?... Hmmm

The breakable door thing seems like a good idea. Not sure how the door frame looks though. I need to test this myself. (Play!)

I wonder how many changes you've made to the code to get it working. When you've finished your dungeon, dont forget to include the new class files, copies of the originals, and you source code :P ... You have added comments havent you.

Keep up the work
User avatar
Kelly
Artisan
Posts: 157
Joined: Thu Aug 31, 2006 7:51 pm
Location: U.K.

Post by Kelly »

The coordinates for the pillars is straight forward - x and y. Just adjust them to the "size" of the image used.

No matter what your graphic is - it can be centralized - for anything - but like I said if you change it, it will only suit that particular graphic set (not unless you do something else with the same width and height).

But on that note, not everything will probably look right ingame. It'll be trial and error.

As for the door frame - the image can be changed to suit your needs or simply "left out" of the map set. To do this, obviously the coordinates of the door will have to be changed, as well and the width and height. I would not recommand this though. (Changing the width and height without doing this, places the door too "forward" and to the "left" too much, then disappears into the wall.
I would though, leave the "door runner" out of the map set though. It kinda look odd with this left in.

As for the breakable doors, I am trying, at the moment, to make all the doors breakable - including the custom ones. For now though, there is only three that are breakable by default - wood, grate and black door.

You can however, for example, take the opennorm graphic and replace it will a complete wall - of your own choice. This will fit in nicely with no other adjustments to be made, and allows you to "walk" through it, as if it was an illusionary wall. Hence it's an "open" door. Not saying that this information will be any good - but it's something else to play with!

But using the "opennorm" as allowed me to create a "fence" which in turn was used for a graveyard theme (wrought iron railings with a statue at each corner). Again, if you're willing to sacrifice say the openkey, for example, this can have possibilities.
User avatar
ian_scho
High Lord
Posts: 2806
Joined: Fri Apr 07, 2006 8:30 am
Location: Zaragoza, Spain

Post by ian_scho »

As for the breakable doors, I am trying, at the moment, to make all the doors breakable - including the custom ones. For now though, there is only three that are breakable by default - wood, grate and black door.
That would be great. I recall the images are something like door.jpg and door_broken.jpg so you could follow the same idea.
...take the opennorm graphic and replace it will a complete wall
Ohhh scary. I assume that particular level in the dungeon will be small and have only a couple of doors... Again though, a clever idea.

I await the dungeon to look at your tricks.
User avatar
Kelly
Artisan
Posts: 157
Joined: Thu Aug 31, 2006 7:51 pm
Location: U.K.

Post by Kelly »

Some of the breakable doors are now done - although I'm still working on the alternate "broken" pics. (Still have to check if this will work for custom doors) - I doubt it, since it's coded differently. (Will check this later).

The first five of the "default" doors are working - just have blank images at the moment. (I can send the code, if anyone is interested - and you can do your own graphics).

As for the "opennorm" that I mentioned in my last post - yes, indeed scary!

It does have restrictions - but I used this only on a "forest" level - I would certainly not recommand trying it on a "normal" dungeon.
Also, I placed deco in between each open door, giving it the illusion that the "railings" in this case, disappeared in the tree line. Again, it was just something I was experimenting with - I doubt it will accomplish much.

But while were on the subject, something else to mess around with, would be ambient sounds. This can accomplish a cool effect within your dungeon theme.

For example, I used floor switches as one passed an illusionary wall, which played a "wind / breeze" kinda like effect. Hence the illusion of a breeze passing through the wall.
Also, I've placed floor switches near a deco-fountain I created, which played the sound of running water.
The same method can be used in an outside theme, as a breeze or maybe a strong wind blowing, combined with the rustling of trees.
And the creation of footsteps as your party walks, either outside or on the stone floors of your dungeon. Make these "echo" a little to add to atmosphere.

Anyway, due to getting those doors working, I haven't had time to do much of anything else - so I'll shut up there and get some more done. :lol:


EDIT:-

Okay, the doors are proving to be a pain in the backside, to say the least. It would help if I knew what I was missing, but unfortunately I've not had much success. The first 5 doors works prefectly (that includes the 3 default doors) but it seems after the sixth door (pictype = 6) I'm not doing to good.

Now the editor is working fine - you can place your doors, choose whether or not you want it broken, and enter the breakpoints, with no errors. When it comes to loading it in, it says the map is corrupt.

Any ideas???
User avatar
ian_scho
High Lord
Posts: 2806
Joined: Fri Apr 07, 2006 8:30 am
Location: Zaragoza, Spain

Post by ian_scho »

Hi Kelly,

I hope you've been taking the occasional backup of your map as you've been going along...

I can send you the class file of the Doriginal MJavaEditor if you want - I don't know if you've been 'tinkering' with that in Java. If so, maybe you've changed the way you serialize the map (i.e. from the DMEditor environment to a file)? The way you deserialize the file has to be the same in both the editor and the game, of course.

Apart from that absolutely no idea.
User avatar
Kelly
Artisan
Posts: 157
Joined: Thu Aug 31, 2006 7:51 pm
Location: U.K.

Post by Kelly »

@Ian' - Thanks for your input, appreciate it.
I have been making backups as I go, and a backup of the source code untouched and unaltered.
Obviously, whatever I change or add, has to be associated with both the code for that specific "thing", the editor code and the extension of that code - for example sidedwall and sidedwall2.
(Which has confused me on more than one occasion!).

Anyway, after putting the doors to one side for the moment, I have been doing other things.
I knew that going through the Java code would not be easy, and a lengthly task at best.
Therefore, I have made another slight alteration and plenty of mistakes that has helped me on the way to understanding Java a little more!

As for the doors, I now know (I think) where the problem lies - I will check this later.

For now, I have made new graphics for the scroll - complete with added lines of text (8 lines can now be used). I will concentrate now on centralizing the text a little better, so more words will fit on one line and perhaps change the font as well.

(If anyone's interested, I will send you the files via email).

I will update this post again and report on my progress.
User avatar
Kelly
Artisan
Posts: 157
Joined: Thu Aug 31, 2006 7:51 pm
Location: U.K.

Post by Kelly »

Update.

I've added quite alot since my last post, to the graphics and slight modifications to the code.

I have added some links that will allow you to preview some of the things finished so far.

Thanks to Beowuuf, he had appropiately moved this over to the DMJava thread.

The download link for all the graphics completed, so far, is there as well.
Post Reply