Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Wizard vAlpha: A hobby roguelike attempt

0 views
Skip to first unread message

Narf the Mouse

unread,
Mar 24, 2008, 8:42:46 PM3/24/08
to
It's been a while since I posted a roguelike and I've learned enough
to make starting all over a good idea since my last attempt.

This is fortuitous, as my last attempt has apparently been lost in a
disk shuffle.


So: I present to you, Wizard. A roguelike game of playing...a wizard.
(May eventually be expanded to other spellcasting classes. May
eventually *Have* classes)

I warn you, this is a hobby for me and was originally started so I
could learn how to use events. That being said, it looks barer than it
could be because I've spent the past nine days just working on engine
upgrades.


The Alpha version has (limited) prefix/suffix spellcasting, four (very
different) player races (It randomly selects one for the PC), one
animal (Rat, because you have to have rats), three monsters (None of
them standard, even the Skeleton), random map generation (Of course),
ASCII graphics (A roguelikes' natural state) and experience gain with
stat increase.


The latest build is at: http://www.mouse-producedgames.com/Wizard4.zip

(If the link doesn't work, try changing it to 1, 2, or 3. My webhost
is slow to update files, so I have to upload a new file to get a new
version up)

Narf the Mouse

unread,
Mar 24, 2008, 10:31:40 PM3/24/08
to
I forgot to take off some test limitations; that last version had only a
20x20 map and 5 animals.

That is now fixed; new download is
http://www.mouse-producedgames.com/Wizard.zip

Nate879

unread,
Mar 25, 2008, 9:44:14 AM3/25/08
to
It's not a good idea to make each monster type a separate class. It's
better to have one "monster" class, which would allow you to store the
monster types in a file so you could edit them without recompiling the
program.

Nate879

unread,
Mar 25, 2008, 9:47:16 AM3/25/08
to
I also found what looks like a bug: when I attacked with FireBreath,
the game said "You attack for -2147483648 damage!"

Nick Beam

unread,
Mar 25, 2008, 11:30:34 AM3/25/08
to
It immediately crashes on startup, and prints out quite an unfriendly
unhandled exception message. I tried to dump it to a file, but then it
just prints out a different error and the dumped file ends up being
empty. :/

Narf the Mouse

unread,
Mar 25, 2008, 12:15:14 PM3/25/08
to

That could work better, but I could use some more detail - Can you
describe in brief how you would set up the monster/animal class(es)?

Thanks.

Nate879 wrote:
> I also found what looks like a bug: when I attacked with FireBreath,
> the game said "You attack for -2147483648 damage!"

I just tested it and got the same result. Probably happening due to some
change when I changed the stats from discrete values to dictionary
lookup values.

Narf the Mouse

unread,
Mar 25, 2008, 12:19:58 PM3/25/08
to
Some computers just seem to refuce to run .Net
I'm no expert, so all I can do is throw out the obvious questions.

Do you have the .Net 3.5 runtime?
Are the fonts set to raster and 8x12? (One person had problems due to
his font settings)
Any chance you could compile it on your comp and see if it'll run then
and if not, what error message(s) come up when trying to compile?
(Visual C# Express)

Thanks for any feedback.

Martin Read

unread,
Mar 25, 2008, 1:54:38 PM3/25/08
to
Narf the Mouse <large...@gmail.com> wrote:
>Nate879 wrote:
>> It's not a good idea to make each monster type a separate class. It's
>> better to have one "monster" class, which would allow you to store the
>> monster types in a file so you could edit them without recompiling the
>> program.
>
>That could work better, but I could use some more detail - Can you
>describe in brief how you would set up the monster/animal class(es)?

In C, a monster struct would look like this:

struct monster
{
enum monster_num mnum; /* Tells you what kind of monster it is */
/* Followed by whatever stats - hit points, defence, etc. - are
* specific to an instantiated monster rather than a fundamental
* property of the kind of monster it is. You might even put in
* some function-pointer variables for things like being able to
* dynamically change which activity selection algorithm the monster
* uses. */
};

The "permonst" (PERmanent MONSTer - the in-memory representation of a
*kind* of monster) would look something like:

struct permonst
{
char *name; /* becomes a pointer to an in-memory copy of the name
* string read in from the DB */
/* what follows is a bunch of stuff about the monster's default
* properties that you read in from the DB. */
};

enum monsternum is an enumerated type providing unique tags for all the
monsters. How you construct the definition of that type is left as an
exercise for the reader.
--
\_\/_/ some girls wander by mistake into the mess that scalpels make
\ / are you the teachers of my heart? we teach old hearts to break
\/ --- Leonard Cohen, "Teachers"

andrew...@gmail.com

unread,
Mar 26, 2008, 12:38:22 AM3/26/08
to
When I try to run it, it gives me a strange error message:

Unhandled Exception: System.IO.FileNotFoundException: Could not load
file or ass
embly 'System.Core, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=b77a5c56193
4e089' or one of its dependencies. The system cannot find the file
specified.
File name: 'System.Core, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=b77a5c
561934e089'
at Wizard.Character.StartingDataModification()
at Wizard.Drakon..ctor(CharacterControlTypes characterControlType,
RaceTypes
raceTypes, AnimalTypes animalTypes, MonsterTypes monsterTypes,
Subtypes subtypes
)
at Wizard.CharacterFactory.Generate(CharacterControlTypes
characterControlTyp
e, RaceTypes raceTypes, AnimalTypes animalTypes, MonsterTypes
monsterTypes, Subt
ypes subtypes)
at Wizard.Program.Main(String[] args)

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM
\Software\M
icrosoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind
failure lo
gging.
To turn this feature off, remove the registry value [HKLM\Software
\Microsoft\Fus
ion!EnableLog].

Any clue how I can fix it?

Narf the Mouse

unread,
Mar 26, 2008, 2:27:02 AM3/26/08
to
I'm an amature at understanding stuff like that, but 'System.Core' is
probably the namespace file for 'System', which sounds like you don't
have .Net 3.5 installed.

If you already have it, then I got nothing.

Can anyone explain what the more esetoric stuff means? I've included an
'As far as I know' explaination interspersed. (Stuff pulled out of a hat
:) )

andrew...@gmail.com wrote:
> When I try to run it, it gives me a strange error message:
>
> Unhandled Exception: System.IO.FileNotFoundException: Could not load
> file or ass
> embly 'System.Core, Version=3.5.0.0, Culture=neutral,
> PublicKeyToken=b77a5c56193
> 4e089' or one of its dependencies. The system cannot find the file
> specified.

'System.IO' is the namespace that deals with file input-output. I guess
it's used to load the rest of .Net. Since you do have System.IO, you
probably have an earlier version of .Net.
'System' is one of the basic .Net namespaces. Sounds like it can't find
version 3.5 of it. (Hence my explaination)

> File name: 'System.Core, Version=3.5.0.0, Culture=neutral,
> PublicKeyToken=b77a5c
> 561934e089'
> at Wizard.Character.StartingDataModification()
> at Wizard.Drakon..ctor(CharacterControlTypes characterControlType,
> RaceTypes
> raceTypes, AnimalTypes animalTypes, MonsterTypes monsterTypes,
> Subtypes subtypes
> )
> at Wizard.CharacterFactory.Generate(CharacterControlTypes
> characterControlTyp
> e, RaceTypes raceTypes, AnimalTypes animalTypes, MonsterTypes
> monsterTypes, Subt
> ypes subtypes)
> at Wizard.Program.Main(String[] args)

It errored out on the function that sets some of the starting data for a
new character that can't be set in the base classes' constructor.
(Wizard.Character.StartingDataModification)

This was done while generating a Drakon race player character, the first
character generated, so if the error isn't missing .Net 3.5, it's
probably either in the derived class Drakon or the base class Character.

The generation was done by the static method Generate in the class
CharacterFactory, which does pretty much what it sounds like - Makes
characters. The only input it has in the process of actually making the
character is providing data.
Main is the first thing run in the code.

> WRN: Assembly binding logging is turned OFF.
> To enable assembly bind failure logging, set the registry value [HKLM
> \Software\M
> icrosoft\Fusion!EnableLog] (DWORD) to 1.
> Note: There is some performance penalty associated with assembly bind
> failure lo
> gging.
> To turn this feature off, remove the registry value [HKLM\Software
> \Microsoft\Fus
> ion!EnableLog].

This sounds like it would provide more data. Anyone know how to turn
that on? The provided explaination of how isn't really comprehensive.

> Any clue how I can fix it?

Any chance you could try compiling it yourself?

Hope any of that babble helped.

Narf the Mouse

unread,
Mar 26, 2008, 12:34:54 PM3/26/08
to
Thanks for the info. :)

I do see some benifits; namely, more general handling and less need for
special cases.

The downside is that it sounds a bit restrictive of special cases.

Slash

unread,
Mar 26, 2008, 1:09:24 PM3/26/08
to

It is not actually that bad idea, as long as each class defines unique
monster behaviour and not attribute data (and as long as there is a
base Monster class, probably abstract); this is however better be
handled using a separate ActionSelector object, (or AI Module, but I
dislike calling them like that, Brain is much more "Jade"like :P) for
each monster object. Defining specific data values on each class would
break the usefulness of inheritance though.

Also, as long as all classes extend from a base class, he can store
the basic attributes from all the monster types on a file, just like
if they were the same class? that could also include the AI Module
itself, as a class to be instantiated via reflection on startup I
guess.

--
Slashie
http://slashie.net

Kenneth 'Bessarion' Boyd

unread,
Mar 26, 2008, 2:20:38 PM3/26/08
to
On 2008-03-26 17:34:54, Narf the Mouse <large...@gmail.com> wrote:

> Thanks for the info. :)
>
> I do see some benifits; namely, more general handling and less need for
> special cases.
>
> The downside is that it sounds a bit restrictive of special cases.

Between the monster id and using bitflags, it's theoretically possible to
rewrite all special cases in terms of the monster data.

More importantly (in C++), if you can wrangle both structs to be POD-structs
(Plain Old Data), you can use C binary file I/O safely when saving and loading
games.

Narf the Mouse

unread,
Mar 26, 2008, 2:36:22 PM3/26/08
to

Problem with that is that I'm writing in C#. :)

But yeah, the idea has merit - It can certainly be converted - And I'll
have to think it over.

Martin Read

unread,
Mar 26, 2008, 2:39:37 PM3/26/08
to
Narf the Mouse <large...@gmail.com> wrote:
>Thanks for the info. :)
>
>I do see some benifits; namely, more general handling and less need for
>special cases.
>
>The downside is that it sounds a bit restrictive of special cases.

Go take a look at dodip() in the Nethack source code sometime.

Narf the Mouse

unread,
Mar 26, 2008, 5:58:27 PM3/26/08
to
Latest update: http://www.mouse-producedgames.com/Wizard2.zip

Mostly, I've made the damage rolling work by unified methods; a struct
that stores the dice count, minimum, maximum and rolling method.

Also, I took time out to add quick-add three new monsters... :D

I'm worried damage may be too low; that it may be too much of a slogging
match.

Version notes:

Version 0.0.3 (26/03/2008)
Added: Damage spells now working with Statistic damage as well as Acid,
Fire and Lightning.
Added: Confusion, Impact and Lethal damage. Weapons convert impact
damage to lethal, in various amounts.
Changed: Better random damage handling.
Changed: Elemental damage now does secondary stat damage.


Version 0.0.2 (25/03/2008)
Changed: Spell system is beginning to work off Prefix/Verb/Suffix system.
Added: Zombie, Chaos Bunny, Worm.


Version 0.0.1 (A ~few days before)
Changed: Lightning/Acid/Fire damage changed to something that should be
more mathematically correct.

Narf the Mouse

unread,
Mar 26, 2008, 6:29:30 PM3/26/08
to
...Looks like a routine to handle dipping potions in stuff.

It uses flags to handle special cases.

Ok, I'm seeing a connection.

Still, I learn by doing, so I'll have to make some test code.

Thanks for the reference. :)

Paul Du Bois

unread,
Mar 27, 2008, 3:16:12 AM3/27/08
to
> More importantly (in C++), if you can wrangle both structs to be POD-structs
> (Plain Old Data), you can use C binary file I/O safely when saving and loading
> games.

... except if you want saves to be portable between different
architectures.
Not that I have anything against data-driven systems, but ease of
serialization
is a red herring.

Granted, a game in C# probably won't need to worry about data
portability, but being a more dynamic and reflective language it has
an easier
time with serialization as well.

p

Narf the Mouse

unread,
Mar 27, 2008, 3:26:22 AM3/27/08
to
Paul Du Bois wrote:
>> More importantly (in C++), if you can wrangle both structs to be POD-structs
>> (Plain Old Data), you can use C binary file I/O safely when saving and loading
>> games.
>
> .... except if you want saves to be portable between different

> architectures.
> Not that I have anything against data-driven systems, but ease of
> serialization
> is a red herring.
>
> Granted, a game in C# probably won't need to worry about data
> portability, but being a more dynamic and reflective language it has
> an easier
> time with serialization as well.
>
> p

There's an effort to make a portable library for the C# platform. It
goes by the somewhat dubious name of 'Mono.

Martin Read

unread,
Mar 27, 2008, 4:31:52 AM3/27/08
to
Kenneth 'Bessarion' Boyd <zai...@zaimoni.com> wrote:
>More importantly (in C++), if you can wrangle both structs to be POD-structs
>(Plain Old Data), you can use C binary file I/O safely when saving and loading
>games.

I like the on-disk representation of my data to be a byte stream with a
well-defined ordering, personally. It means that I can *do* something
on my little-endian development system with a saved game file I receive
in a bug report from a user with a big-endian system.

Kenneth 'Bessarion' Boyd

unread,
Mar 27, 2008, 9:52:25 AM3/27/08
to
On 2008-03-27 09:31:52, Martin Read <mpr...@chiark.greenend.org.uk> wrote:

> Kenneth 'Bessarion' Boyd wrote:
> >More importantly (in C++), if you can wrangle both structs to be POD-structs
> >(Plain Old Data), you can use C binary file I/O safely when saving and loading
> >games.
>
> I like the on-disk representation of my data to be a byte stream with a
> well-defined ordering, personally. It means that I can *do* something
> on my little-endian development system with a saved game file I receive
> in a bug report from a user with a big-endian system.

I prefer to use an explicit converter utility for that.

If I'm going to that much trouble, I might as well weak-encrypt the savefile.

Kenneth 'Bessarion' Boyd

unread,
Mar 27, 2008, 10:02:30 AM3/27/08
to
On 2008-03-27 08:16:12, Paul Du Bois <paul....@gmail.com> wrote:

> > More importantly (in C++), if you can wrangle both structs to be POD-structs
> > (Plain Old Data), you can use C binary file I/O safely when saving and loading
> > games.
>

> . .. except if you want saves to be portable between different


> architectures.
> Not that I have anything against data-driven systems, but ease of
> serialization
> is a red herring.

It's a red herring in high-level languages. C++ is not high-level for this
purpose. (Neither is C, but with stdio.h the Faustian bargain of trading
cross-platform portability for programmer time makes sense. Just stuff in the
cross-platform capability at an intentional format break.) I had missed that
the original poster was in C#, so (like Java), his choice of language provides
the format standardization for low-level data types.

I have seen exactly zero easier-to-use-than-self-roll serialization libraries
for proper C++ classes since 1985, and serializing polymorphic classes properly
is a pain even before considering versioning.


0 new messages