Mordoric

Want to talks about games you like, would like to see developed on the Oric, it's here.
User avatar
Nox
Officer Cadet
Posts: 36
Joined: Wed Feb 24, 2010 2:49 pm
Location: Berlin
Contact:

Mordoric

Post by Nox »

mordoric.tap V0.1 07.01.2012
mordoric.tap V0.2 14.01.2012
mordoric.tap V0.3 21.01.2012

The last few months I spent much time (once again...) playing a nice little game called Mordor: The Depths of Dejenol.
Its a 16 bit Windows-Prg from 1995, but runs well under XP.
If you like dungeon crawlers and don't know that game (and have nothing important to do in 2012...) I suggest to take a look at it.
There's a free demo version (first two or three dungeon levels) somewhere on the web.

It has almost no graphics, but is still very addictive, even today, and not just for nostalgic reasons.
It looks so simple and innocent, but believe me its a monster...

The most important piece (visually) is the (2-D) view of the dungeon map.
I was wondering how that would look (and feel) on an oric, so I tried a few things and came up with this:

Image

Well, my aim was not to draw the most beautiful dungeon possible, but to make something that looks "ok" and works,
using as few memory as possible. If I make such a game, I want (or need) to spent every byte for content,
a bigger dungeon, more items, more monsters, more spells...

But for now, happy exploring :)
controls:

cursor: move
T: take stairs up/down (you cannot leave the dungeon yet)
D: cast spell "Detect Rock"
E: cast spell "Ethereal Portal" (teleports through a wall)
M: show the current floor
A: cheat: reveal the current floor

Secret doors get visible once you walked through them...
Last edited by Nox on Sat Jan 21, 2012 10:12 pm, edited 2 times in total.
JamesD
Flight Lieutenant
Posts: 358
Joined: Tue Nov 07, 2006 7:38 am

Post by JamesD »

Looks like a lot like a Hack clone.
User avatar
Symoon
Archivist
Posts: 2307
Joined: Sat Jan 14, 2006 12:44 am
Location: Paris, France

Post by Symoon »

Looks promising :D
User avatar
Dbug
Site Admin
Posts: 4444
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Post by Dbug »

Quite nice.
I notice the map I have when playing is the same as on your screenshot, is it a hand edited level, or do you use random generation?
User avatar
Nox
Officer Cadet
Posts: 36
Joined: Wed Feb 24, 2010 2:49 pm
Location: Berlin
Contact:

Post by Nox »

JamesD wrote:Looks like a lot like a Hack clone.
Yes, I guess you're right. I never played it, but of course it's the mother of all such games.
I hope there are not already a dozen Hack-Versions for oric...
Symoon wrote:Looks promising :D
thank you!
Dbug wrote:Quite nice.
I notice the map I have when playing is the same as on your screenshot, is it a hand edited level, or do you use random generation?

For now, it's hand edited. A map generator is one of the nice-to-have features I have to see if I'll have memory for.
Of course the least thing to do would be to write a Windows-Prg that creates the .tap file with a random map...
User avatar
Dbug
Site Admin
Posts: 4444
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Post by Dbug »

A possibility is that you make the game in two parts:
- an "adventure generator" that allows the player to create his character, generate the dungeon based on some parameters (difficulty, number of treasures and monsters, etc...), and finally save the result as a "save game"
- the actual game, that loads the "save game" file

That would work on floppy (it's what Tyrann did), and would be optimal on a floppy disk setup (where you get 16 additional kilobytes of ram, plus of course you could have giant levels on the floppy, loading them one at a time in memory).
User avatar
Nox
Officer Cadet
Posts: 36
Joined: Wed Feb 24, 2010 2:49 pm
Location: Berlin
Contact:

Post by Nox »

Yes, that would be a good solution. (Currently I do not even consider an option to load/save the game...)
But I don't know yet anything about how to use the disc (or overlay mem., or even tape).
And I'm not sure if I can find enough information on this website, or elsewhere, but I'll check again...
User avatar
Chema
Game master
Posts: 3014
Joined: Tue Jan 17, 2006 10:55 am
Location: Gijón, SPAIN
Contact:

Post by Chema »

Hi Nox!

This is good news indeed... looks very promising.

I recall having posted something (including code) on sector-based disk routines. Of course you can see the source code of Space:1999 or 1337 on the repository and if I can help you with this in any way, just let me know.
User avatar
Nox
Officer Cadet
Posts: 36
Joined: Wed Feb 24, 2010 2:49 pm
Location: Berlin
Contact:

Post by Nox »

Ok, thanks. Currently I'm of course more motivated to do other things,
but I might come back to you when memory gets shorter...

Current status: string, text, textcompression, menu-functions 95% done.
Much code, not so much to see.
Currently working on items (code and content creation). 50% done (no magic attributes yet).
The random item generator ist already fun to play with.

There are 64 basic item-types and 8 materials that alter the basic stats.
Not all combinations are possible though (wood+shield=good, wood+gloves=not good...)
User avatar
Nox
Officer Cadet
Posts: 36
Joined: Wed Feb 24, 2010 2:49 pm
Location: Berlin
Contact:

Post by Nox »

First weekly Update:

mordoric.tap V0.2 14.01.2012

Image

Main menu and bank are somehow working.
Store is 50% done (but disabled in V0.2).

Maybe that screen looks a bit confusing at first... so much information to display.
Items can be moved and equipped (not complete yet).
The two-dimensional menu took more code than expected, but I'm still on target.

Had a big problem with the random number generator, now use a new one...
that seems to be a real difficult issue, and yes I used google and tried something recommended.
Maybe I'm doing something wrong...

I'm currently using 8, 16 and 32 bit unsigned integers. Not sure yet how big the numbers will get,
but 16 bit surely aren't enough for gold and experience. Maybe 24?
Since speed is not relevant, I'm thinking about doing everything with 32 bit, instead of having
three sets of math functions, maybe that saves some bytes?
User avatar
Dbug
Site Admin
Posts: 4444
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Post by Dbug »

If you are interested I have a 6502 version of the random function used in microsoft products: I was working on an Oric version of FreeCell, and wanted to get the exact same hands when using the same random seed, and it's what I have, working fine. Not super fast, but it works.

For you game, you should consider redefining the font to make it look more "fantasy" :)
User avatar
Nox
Officer Cadet
Posts: 36
Joined: Wed Feb 24, 2010 2:49 pm
Location: Berlin
Contact:

Post by Nox »

Oh yes, I'm interested! It don't have to be fast. So please post it here (or in another topic),
or "pm" me. Thanks!

And yes, having a nice font would make the game much more appealing.
I think that are (ca.) 512 bytes well spent, so I will keep that (them) in mind.
User avatar
Dbug
Site Admin
Posts: 4444
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Post by Dbug »

The code for the random is actually now in the new OSDK version.

To use it from C, I added the following to LIB.H:

Code: Select all

extern unsigned int randseedLow;
extern unsigned int randseedTop;
extern unsigned int pcrand();

#define srand(seed) if (0) {} else {randseedLow=(seed);randseedTop=0;}
#define rand() (rand32()?(randseedTop & 0x7fff):(randseedTop & 0x7fff))
from Assembler it's not much different:

Code: Select all

jsr _rand32
lda _randseedTop+0  ; Low byte
lda _randseedTop+1  ; Top byte
There you are :)
User avatar
Nox
Officer Cadet
Posts: 36
Joined: Wed Feb 24, 2010 2:49 pm
Location: Berlin
Contact:

Post by Nox »

It works! (and the new osdk too).
Takes 38 bytes more than my old routine, but I don't want to complain :wink:
User avatar
Dbug
Site Admin
Posts: 4444
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Post by Dbug »

Cool :)
Well for the 38 bytes, I'm sorry. I did a very straight conversion of the code.
As a benefit now we also have a 32 bit multiplication routine in the osdk.
Post Reply