Dungeon Master for Pocket PC / Win CE

Discuss Chaos Strikes Back for Windows and Linux, an unofficial port of Chaos Strikes Back to PC by Paul Stevens, as well as CSBuild, an associated dungeon editor.

Moderator: Zyx

Forum rules
Please read the Forum rules and policies before posting.
User avatar
cowsmanaut
Moo Master
Posts: 4378
Joined: Fri Jun 30, 2000 12:53 am
Location: canada

Post by cowsmanaut »

what if I beg for a month or two?... do you take bribes?

moo
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

Well, it ain't impossible. I don't think I will ever
understand the Atari code well enough to do it right.
But I do have an idea of how to cheat and do it ugly.
Same result for the user.
User avatar
cowsmanaut
Moo Master
Posts: 4378
Joined: Fri Jun 30, 2000 12:53 am
Location: canada

Post by cowsmanaut »

so should I be taking that to say you would like those graphics bits cut up and seperated within their 16 col palletes and saved out as BMP's? if so I can send you a zip file containing them all

These were made for a version of DMJ a while back when Alandale and I were talking about adding 3D to it. However the project was dropped in favour of other things. (just incase someone thought I just whipped these up out of nowwhere)

moo
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

Hold that thought. I have lots of work to do to
make this thing fly. The CSB Utility has not been
touched yet. And the Hint Oracle is approimately
the most non-understanable code ever created. It
must have been compiled from some weird higher-
level language. When everything works we can talk
about making it pretty.

Right now I am thinking I will want a single, 16-bit
(65000) color bitmap and the locations of all the pieces.
The upper left corner, width, and height. Then I will
need the location of the piece it is to replace and the
location on the final PocketPC screen.

For each piece.
1) Location of rectangle on Atari screen.
2) English description of what is to be replaced. For example,
the spell controls have different symbols in the same location
at various times.
3) The location/size of the rectangle in your 16-bit bitmap file.
4) Where to put it on the PocketPC. Only need uper-left
corner because the size will be specified in part 3).

Example: The turn right button has three different bitmaps.
a) Just sitting waiting to be pressed.
b) Shaded out (greyed) when inactive.
c) Flashing after being pressed.

Parts 1) and 2) are the same for all three but part 3) will be
different and probably part 4) will be the same.

Does that make sense?
User avatar
cowsmanaut
Moo Master
Posts: 4378
Joined: Fri Jun 30, 2000 12:53 am
Location: canada

Post by cowsmanaut »

aside from the weapon action buttons everything else should be the same.

Now I'm certain you have a draw order for these images so the parts inbetween could be done by simply laying down a background image or a colour. (in this case most of it's a very subtle detail and likley missed so a solid colour for a lot of it should be fine. This would save memory I'm sure over one large image.

I will get the you precise pixel location and size. (years of doing interface and tile based games.. so I have plenty of practice ;) )

I was unaware you used 3 different bitmaps. I figured the grey out was a function to draw every other pixel thus showing a dithered image and the flash was a fast invert of the image. Is it faster to do it by image?

so I'll get to that sooner rather than later since I'm into it now and it's still fresh in my mind. You can always hold on to it for when you get the chance. :)

moo
User avatar
cowsmanaut
Moo Master
Posts: 4378
Joined: Fri Jun 30, 2000 12:53 am
Location: canada

Post by cowsmanaut »

I lie.. the hero thingy is bigger too. At any rate I'm sizing it all up and getting the layout down.

moo
User avatar
LazyOldman
Journeyman
Posts: 61
Joined: Thu Mar 04, 2004 7:17 pm

Post by LazyOldman »

Does this mean you guys can actually import new graphics to this? Does that mean we can import new duneon graphics into this?

I was thinking about it last night... has anyone studied the graphics.dat? do we know where different graphics are stored... Or can we just have a load of bmp's for walls etc and reference them in?

Or am i just giving you FAR too many nightmares suggesting this Paul? :wink:
User avatar
beowuuf
Archmastiff
Posts: 20687
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Post by beowuuf »

Other heads are fooling around with the graphics.dat (see ConfluxII)
User avatar
cowsmanaut
Moo Master
Posts: 4378
Joined: Fri Jun 30, 2000 12:53 am
Location: canada

Post by cowsmanaut »

yeah, Charlatan and I did a bunch of new monsters and items for conflux II. ZYX stuck them back into the graphics.dat and it worked out all good. :)

anyway, one other detail. Paul, are you pulling the font from DM or is this from a BMP? I noted while fooling around there is a font I have called "small fonts" (smalle.fon) can't remember if this is one I picked up or a standard windows font. However, it seems more space concious than the one provided in DM. Thought of using it instead? (if it's not standard I can send it to you.. thought it says microsoft in the details.. (shrug))

moo
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

Again.....I don't think I can change what is on the
Atari screen. I don't know where their font arises.
I am pretty sure it is a combination of the graphics.dat
and the hard-wired code.

If you want to change the font we will have to do it like
any other rectangle. "If you see an 'a' at postion x
on the atari screen then draw this bitmap at position y
on the PocketPC screen. We need to list the 50 or so
characters and their replacement bitmaps. Then we need to
list the 100 or so places that a character might appear
and specify where the replacement should appear.
And it is a bit complicated by the multilple screen modes
like 'Menu Mode', 'Adventure Mode', 'Inventory Mode',
'Credits Mode', etc.

Altogether about 150 lines of text in the config.txt just for
the replacement font. (Programming is commonly just
plain tedious.)
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

I ran my 5-1/2 hour ConfluxII movie successfully on
the PocketPC. That is a really tough test of the runtime
engine. I posted CSBwinCE15Mar.rar. I don't think it
is really much different except to fix errors that occurred
during the ConfluxII testing. Find it at:
dianneandpaul.net/CSBwin.
Remember it all must go into Windows\Start Menu\Programs\.
And don't forget to turn off recording if you play ConfluxII.
The PocketPC ain't as big as your harddrive.

Next I need to solve the inventory problem and add some
of the menu items that everyone has come to know and love.
User avatar
andyboy_uk
On Master
Posts: 647
Joined: Thu Feb 20, 2003 1:51 am
Location: London, UK

Post by andyboy_uk »

Wow, this thread moves damn fast.

Sorry for not being clear about the PM and thanks for the link. Will try and grab it tonight. On looking back over the thread it didnt stand out as to where it was.

@Cows: The latest incarnation looks incredible.

Cheers,
A
Regards,

Andy
User avatar
cowsmanaut
Moo Master
Posts: 4378
Joined: Fri Jun 30, 2000 12:53 am
Location: canada

Post by cowsmanaut »

ouch!!! needing to change that much just for text?? I figured since they are going to need to be showing up over new images that simply replacing it with an actual font, would be less painfull of a task.

wow.. crazy.

:shock:
moo
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

simply replacing it
Great idea. The source code and graphics are available for
you to download from dmweb. You can simply replace the
the fonts and ship me the files that required changing.
I will install them and we are done!

Actually, 150 lines of code ain't that bad. CSBwin and CSBuild
together amount to about 120,000 lines. 150 is a
a drop in the bucket. I think you will wind up changing
more lines than that when you simply replace the font.
User avatar
LazyOldman
Journeyman
Posts: 61
Joined: Thu Mar 04, 2004 7:17 pm

Post by LazyOldman »

Sorry Paul, where are the graphics on dmweb?

In looking i found some tools for extracting the graphics from the .dat the couple i tried either were sporadic in their accuracy or didn't work... There is one that said it could recreate the .dat after editing, how were the graphics for confluxII were added to the graphics .dat?

From the look of things it could be possible to take any selection of graphics and write them into a graphics.dat, provided you reduced them to 16colours. So theoretically you could recreate DM2, DMJava or EOB!!!!!

Anyone got any pointers on how i can do it? what i need to do? i.e. learn to program, beg, bribe... :lol:
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

Sorry Paul, where are the graphics on dmweb?
They are all in a file named 'graphics.dat'.

I have never attempted to understand anything about
that file. Zyx and cowsmanaut managed, somehow, to
replace many of the graphics. You will have to ask them
how they did it. I suspect it was a bit contrived. That is
to say I don't think there is a simple user interface to view,
edit, and replace the graphics. I might be wrong.

Wasn't Christophe working on such a thing???
User avatar
LazyOldman
Journeyman
Posts: 61
Joined: Thu Mar 04, 2004 7:17 pm

Post by LazyOldman »

Can you tell i was born to the point and click generation?

So how'd you manage it then cowsmanaut?
User avatar
Gambit37
Should eat more pies
Posts: 13715
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Post by Gambit37 »

Use the quicklinks above to grab Rain's ZIP file called DM Extractor. This utility is the only one that can extract all the images from a graphics.dat and rebuild it again. It includes a readme.txt on how to use it.

To do anything really clever though, you also need to change stuff in the 0558.dat file that's within the graphics.dat. There's more information here:

http://www.dungeon-master.com/forum/vie ... hp?t=23191

To extract the graphics from conflux 2, you need an extra parameter (-i), for example:

Code: Select all

dmextract -x conflux2.dat -d conflux2 -i 3
User avatar
cowsmanaut
Moo Master
Posts: 4378
Joined: Fri Jun 30, 2000 12:53 am
Location: canada

Post by cowsmanaut »

Paul, well you informed me that it was not at all simple.. and I feel quite assured that it is indeed not a simple process. I gave up programming a long time ago in favour of art. Now I use pretty pictures to bribe programmers ;)

At any rate if the font must stay the same.. so be it. The main reason the other is more space concious is the size of things like the "I" and such.

Lazyoldman, the way in which I got the graphics in was I made the bitmaps in the correct pallete and handed them to ZYX and he did the rest ;)

moo
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

more space concious is the size of things like the "I"
Oh, my goodness. You wanted to install a proportional font?
That would be a task. It might be possible in the text area but
anywhere else (like charater names).......no way. They are
simply too integrated into the totally abstruse graphics code.
Of course some young graduate student could prove me wrong.
User avatar
LazyOldman
Journeyman
Posts: 61
Joined: Thu Mar 04, 2004 7:17 pm

Post by LazyOldman »

TA DA!!!!!!

Image

Thanks Gambit37 & cowsmanaut!! Now on to the other 500+ graphics!??! argh...

One small question... the colour palette? i've noticed that the bmp colours aren't quite the in game colours (like the above, it was a white block with black text - whoops) Am i right in thinking the palette is determined by the code? and is everything in the dungeon 'window' entirely limited to a 16 colour palette? even monsters, walls, items all from 16 colours? and does that include the background colour, i.e. the transparent one?


Paul, the last exe, 15mar, was it just basic fixes? no changes to layout, accessing character screens and moving the group? just checking incase my ppc is doing something it shouldn't...


Ed: Any one guess what the font is / from? :wink:
User avatar
cowsmanaut
Moo Master
Posts: 4378
Joined: Fri Jun 30, 2000 12:53 am
Location: canada

Post by cowsmanaut »

well, this is me just talking out my @$$ here.. but my initial assumption was that you were simply translating the information comming from the atari code and just using your own code to print to screen with the graphics. So once I had that established in my mind and you began talking about adding in bitmaps and different colour zones I figured you were using sectional areas to do what ever you wanted graphically. So for me the next logical step was .. hmmm he's doing this with windows with his on graphics code.. why not just add some text.

silly me. :P

Seems now from what you are saying that everything is far more integrated than I thought. With that in mind I'm quite a bit more impressed with how it's cobbled together.. It gives me an image of a opened radio with wires flowing in and out of it to various other devices and doo-dads. makes my brain hurt and facinates me at the same time ;)

moo
User avatar
cowsmanaut
Moo Master
Posts: 4378
Joined: Fri Jun 30, 2000 12:53 am
Location: canada

Post by cowsmanaut »

hmm posted right ahead of me.. Well the answer to your question is yes. It is determined by the code. Images like the front screen, the front entrance and various levels all have different set of colours. this is due to the fact that they didn't have enough colours for what they wanted to do. Things like the purple worms for example would not have been purple if they had not shifted the pallete at different points.

Anyway, the point here is knowing which colours are which once they have been ripped. so when it get's converted back you know what it will change to.

moo
User avatar
cowsmanaut
Moo Master
Posts: 4378
Joined: Fri Jun 30, 2000 12:53 am
Location: canada

Post by cowsmanaut »

wow, three in a row.. people might think I just like to hear myself talk here :P

anyway, need some clarification here Paul. The coord for 0,0 is this the top left of the screen, or the top left of the window (ie under the banner where you actually start drawing the CSB stuff)

for now I'm going to assume the top of the window and not the screen.

(edit..) and while I'm at it.. here's a final comp of the layout and bits

Image
User avatar
Gambit37
Should eat more pies
Posts: 13715
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Post by Gambit37 »

@Lazyoldman: Yes, as Cowsmanaut points out, different images use different palettes -- the front door for example, the scroll and the logo -- all use different, unique palettes.

You can use the correct palettes while making your graphic. Then you can re-apply the default palette when you are ready to re-import it. Using something like Paint Shop Pro will allow you load the default DM palette, and as long as you "Maintain Indexes" all the colours will be in the correct place. It'll look weird though!

I've had these sitting on my HD for a while. These are all Paint Shop Pro format palettes, they might help you or someone else:

http://homepage.ntlworld.com/matt_hill/psp_palettes.zip

EDIT: Here's Photoshop versions too:

http://homepage.ntlworld.com/matt_hill/ ... lettes.zip

@Cow: Totally o/t, but I had a weird dream last night, and in it some woman was being interviewd on a chat show about her unusual job. She was a cowsmanaut! ;)
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

Covering several topics/questions.
i've noticed that the bmp colours aren't quite the in game colours
CSBwin translated the 0777 palette to a (currently) 16-bit palette.
I don't remember exactly how. I suspect it was by simply shifting
the bits to the left. At any rate, others may have done it slightly
differently and the color values could be off by 1 or 2. Maybe more
if we tried to make a 7 turn into a 31 rather than a 28, for example,
to make it as bright as possible.
is everything in the dungeon 'window' entirely limited to a 16 colour palette
That, my friend, was all the Atari had at any one time. Now, you
may ask "But when the viewport darkens how do they keep the
colors the same in the portrait area? Each has 16 colors, does it
not? That makes 32 colors. The answer? THe code counted the
scan lines as each frame was painted onto the screen by the
video chip/monitor. After the 30th line (or wherever the portraits
ended) they changed the palette setting in the video hardware.
Then again after the viewport was drawn and the text was about
to be sent to the monito (about line 170) the palette in the video
chip was changed again.
the last exe, 15mar, was it just basic fixes
Yes. I am just working on functionality now. No beautification
projects. However I am working to make some of the proposed
beautification possible.
The coord for 0,0 is this the top left of the screen
I call (0,0) the top left of the game screen. The flag would be
at (0,-15). The first pixel in the first portrait is at (0,0).
So your current assumption is correct.
here's a final comp of the layout and bits
In my view you have wasted too much real estate in the
portrait area. The text area has only 3 lines. And they are short
lines. Longer messages are going to have to be wrapped (I don't
know how to do that yet!!!! It will have to be done inside the
Atari program). But I am going to try to make things work in
a way that is configurable in config.txt and if we can pull off
your 'final' suggestion then it will probably be flexible enough
that people can modify it slightly if they prefer something a
bit different. Also, putting it in config.txt is a self-defense
mechanism to protect me from having to rewrite the whole thing
when you change your mind and want to move everything up
one pixel.

Another thing. You appear to have changed the font. In the
champion names. To a proportional font, no less. Did you mean
this? And the letters will have to be copied from the Atari screen
to the PPC screen. On the Atari screen the background is
a uniform color. In your example, the 'G's in GOTHMOG appear
to have part of the background included. It is not a uniformly
grey background. I had not planned any sort of transparency
although, upon reflection, I suppose it is not beyond the possible.
I would prefer not. I am working really hard to make the code
for all of this as efficient as possible. The older PPC are not
very fast and manipulating these pixels is very intense work for
the CPU. Transparency would add some more work. I would
like to avoid that to keep the game itself as snappy as possible.
The gameplay comes first in my mind.

And, by the way, don't expect any of this soon.
User avatar
cowsmanaut
Moo Master
Posts: 4378
Joined: Fri Jun 30, 2000 12:53 am
Location: canada

Post by cowsmanaut »

Ok, first things first. In all of this design I am flexible so taking these additional details in.

No text transparency. I didn't know text came with a background I thought it was clipped with it's background colour thus the reason you see it in different colours and on different backgrounds (gold on grey above and things like red on black below). The text type I used in the comp I should have mentioned was just a stand in.. I didn't want to place each letter one by one hunting them out of dungeon clippings and I wanted the longer names to see how they would fit. Fortunately GOHTMOG was all larger letters and would be roughly the same size in both fonts. I'll adjust the upper part of the window to accomodate that name since I think it's the biggest one. or is the max 8 characters? I don't think this sixe of window could hold that many. Not without them looking like one string of letters.

the lines of text at the bottom are as long as they can be. Nothing I can do to fix that with my design. that is completely dependant on it being turned on it's side in which case my current design gets changed anyways since I built it around the taller interface. 3 lines of text is not so bad for most things it means most messages will fit. what's the longest message in the game? you can also get several more lines if you make it full screen ;) (look at my previous comp, I wasn't paying attention and covered everything)

I don't think I would ever need to shave off any lines of pixels.. not by my own choice anyway ;) I think most changes come out of necessity and those would be discovered during this process we are going through now. However, your config.txt does mean that others can layout things as they like too. add in new things.

one more thing about the text. I have it centering on the name bars.. is that a 'no' kind of thing.. or a 'maybe' kind of thing?

moo
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

I posted CSBwindCE16Mar.rar at dianneandpaul.net/CSBwin.

Inventory by tapping on health bars.
Change champion position.
Lots of graphics changes that you won't see but that will
allow us to rearrange things later.

I didn't know text came with a background
Inside the Atari the text is separate from its background.
If we all understand what I am doing then these questions
will not arise.

***I am not changing what appears on the Atari screen.
(except, perhaps, the length of text lines).

***I copy portions of the Atari screen to the PPC screen.
Rectangular pieces. Perhaps with palette changes. Perhaps
with background bitmaps. Perhaps substituting a user-defined
bitmap as replacements for particular patterns of pixels that
I see on the Atari screen. But the rectangular area that
contains any text will be copied as a whole. The text and
the background are both in that rectangle and both will be
copied. I could designate a transparent color but I don't
really want to. I will do transparency only if it is really
necessary and you can convince me it is for a really good
purpose.

***I might make some small editing changes to the resulting
rectangular areas on the PPC screen. For example, I have deleted
two pixels between the health bars to make the portraits fit.
The skeletons that appear upon death suffer from this. I hope
to fix the skeletons eventually.

The longest lines that appear in the text area are very long.
A quick example is the text you see when you take your first
two steps in the CSB prison. Something like "This level
only contains the champions. Select your champions, save the
game, and use the utility disk to create a new game to play."
ConfluxII has some that are much longer.

Turning the game sideways does not buy very much.

Centered text? If it is centered on the Atari screen then
OK. But.....as I have said.....I only copy rectangular regions
of the Atari screen to the PPC screen. I don't know if it contains
text, portraits, or what.
User avatar
sucinum
Pal Master
Posts: 872
Joined: Wed Apr 18, 2001 1:00 am
Location: Karlsruhe, Germany
Contact:

Post by sucinum »

Paul Stevens wrote:Inventory by tapping on health bars..
just a throw-in at this place:
would it be possible to transfer items into the inventory by clicking with them on the health-bars? that's a feature of DM2 which i liked very much.
so click with an item on the health-bars puts it into the inventory at some free space.
a click without item opens up the inventory then.
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

Have you played DM with the Pocket PC?
One thing you will notice is that, unlike DM on the PC,
there is really no cursor. So there is less feedback as
to what you are holding in your hand. I think it would be
confusing to deposit things in the inventory this way.
Especially if the inventory were full.

Moreover, it would require a change in the runtime
engine and right now I am buried deeply in the task of
making the interface work. When things calm down
in a couple of months perhaps we could think about/discuss
this again. I am not going to make a note of it now......I
will leave it to you to remember sometine when we go a
few days without any forum activity.
Post Reply

Return to “Chaos Strikes Back for Windows & Linux (CSBWin) / CSBuild”