Re: Umbrarum Regnum



Ray Dillinger wrote:
Risto Saarelma wrote:

On 2007-05-18, Ray Dillinger <bear@xxxxxxxxx> wrote:

Would you like to discuss game architectures?
[snip long description]



It's very interesting to read about what you've accomplished, thanks. It
looks like the basic idea in your current framework is that pointers are
nasty and should be kept in controlled conditions.


Arbitrary pointer-based structures are actively harmful
to your ability to cleanly save and restore, and in the
absence of GC, often create interesting problems in
memory management, yes. This is the primary observation
that led to the current rewrite. My use of pointers is
now restricted to implementing structures easy to serialize.

Funny thing is, way
back when I'd just learnt C, I made a little RPG which was basically
mostly hardcoded tables, since the finer details of pointer-based data
structures weren't very clear to me back then. The game was actually
surprisingly manageable, and saving the game consisted of simply dumping
the tables into a file and loading them back.


Right. Whereas I "got" pointers and dynamic allocation,
(although the syntax of them still screws me up from time to
time) but needed the extra learning experience to figure out
when to NOT use them. :-)

Is the end result of this some sort of game database structure, which
holds all of the game state in some sort of easily serializable,
indexable and reflectable structure, instead of the default style of
storing the game state in a bunch of disparate objects and data
structures?


That was sorta my intent, yes.

And the event system looks like an abstraction of processes. Aren't
database transaction something pretty similar? The only way to alter the
database is through a transaction, and if the transactions are logged,
the changes can be reverted. A consistently implemented system like that
could be an easy way to make a Sands of Time style "rewind time" feature
in a game.


Hush, Hush! I wanted that to be a surprise! :-) Uh, yes, the
architecture allows for actions that "undo" other actions, and
allow actions to be stored in addition to just being executed.
Therefore it would be easy to add a "rewind time" feature and I'm
planning to do it. The easiest way is to make each event that
changes the dungeon create an action to undo its change (including
storing results of random rolls) and stack that action into an
"undo" queue in the game. The "undo" action, when executed,
undoes whatever the action did to the dungeon and if necessary,
restores a copy of the original action in the schedule.
Additional "undo" actions would be necessary to rewind the game
clock. But I didn't want to talk about it before it's done,
because I don't want to flog vaporware too much.

Rewinding time should allow building the ultimate bot; it can
actually minimax its way to the next round, trying things that
depend on random rolls a hundred times each to figure out what
the odds are. Of course, it will play .... v .... e .... r .... y
.... s .... l .... o .... w .... l .... y ...., but ought to be able
to come up with killer replayable "screensaver" games, and ought
to be able to create *VERY* good example games for training a
more conventional (and much faster) Artificial Neural-Network
bot.

So you have horizontal movement between maps? Does the game do smooth
scrolling between them, so that the player doesn't even see the map
borders, or does the player move over the edge of the screen and appear
on the opposite edge of a new map? Horizontal maps with hard transitions
between them might be a pretty literal source of edge cases.

Yeah, I'm still not sure of that. 64 x 64 was a fairly careful
choice; I'm making an arbitrary decision never to display a
map area bigger than 128 x 128 no matter how big the player
opens his xterm window and no matter how small the font is.
map sectors 64 x 64 allow me to guarantee that portions of
no more than 4 maps appear on the screen at any given time.
I'm trying to make the edges invisible to gameplay, but it's
still screwing up line of sight. If I can't make it work,
I'll probably change to bigger map sectors and avoid having
line-of-sight or missile fire across map sector boundaries.

Surely the solution is more abstraction: make the world appear as one smooth chunk of space. You have a global co-ordinate system where every location is (e.g.) a pair of integers, then have no part of the game except one module know about maps. You might also want a way to ask the map system "What area should I be simulating?", unless you change the policy on that.

--
Simon Richard Clarkstone:
s.r.cl?rkst?n?@durham.ac.uk/s?m?n.cl?rkst?n?@hotmail.com
"August 9 - I just made my signature file. Its only 6 pages long.
I will have to work on it some more." -- _Diary of an AOL User_
.



Relevant Pages

  • >>>> MAP GAMES <<<<
    ... addictive games with united states map, game maps ds, marauders map ... game, think tanks game maps, british legends game map, map game third ... grade, your child learns map game, sin game maps, middle east online ... 50 us states map game, make game maps, arcanum game maps, europe map ...
    (de.rec.buecher)
  • Re: Umbrarum Regnum
    ... The game was actually ... references aren't that nice. ... so that the player doesn't even see the map ... pointers or figure out what they refer to. ...
    (rec.games.roguelike.development)
  • How to write a roguelike game? :)
    ... This is a rough route map for the creators of roguelikes. ... Step 1 -- Decide to write a game ... Don't start by asking around about the definition of roguelike game -- you don't ... still fun to play for you -- you succeeded. ...
    (rec.games.roguelike.development)
  • Re: Todays battle report
    ... 'Stealers win if the flamer dies/runs out of ... The Nid player built this map as you moved, ... A game that only engages people as long as they're waiting ... Advanced missions convinced me that WD and CJ were worth the price. ...
    (rec.games.miniatures.warhammer)
  • Re: Quick review: Brothers In Arms - Hells Highway
    ... I never even finished the second game because the difficulty of it just ruined the fun for me. ... With this third game, which I've been playing on Veteran, it's very easy to just pick off the enemy soldiers using your M1 rifle. ... But not too realistic since in a few fights seem to be designed to have you easily take out *all* the enemy positions with the bazooka team. ... What I keep running into with the map, is that it doesn't offer enough detail. ...
    (comp.sys.ibm.pc.games.action)