Showing posts with label stew. Show all posts
Showing posts with label stew. Show all posts

Sunday, November 27, 2011

Roguelike development deferred

For now all my roguelike projects are officially deferred for the indefinite future.

The Blacken Java library is on code.google.com. It is currently usable, and I may use it on a 7DRL at some point. There are no immediate plans for a full-scale roguelike.

The Python STEW Roguelike library ran in to trouble with the desire to go to Python 3. It also suffered from repeated redesigns. The dependency on full Unicode support -- while required for my goals -- further complicated things. Add to this many of my goals for it are now met with LibTCOD, and it just isn't high-priority.

The joy I get out of talking about writing projects is just as great as the joy I got out of talking about Roguelikes or my other projects when I managed to talk to someone who "got" it. More than this, the chance of an average person "getting" what I am talking about is so much higher that it is suddenly a joy to talk to complete strangers about my passion projects.

This site will remain the location for my random tech notes. The primary audience here has always only been me.

Saturday, September 5, 2009

STEW update

I was preparing a check-in to my private STEW Bazaar repo, and I thought I'd post an update.

Localization work continues. I'm working on a zipgettext to allow me to pull message catalogs out of zipped files. At this point, though, I want to support full localization for individual games, but the requirement really is just that the core library is fully localized. A zipgettext is required to support drop-and-go functionality for games using the library. They'd be self-contained and not installed via a system installer. They could be localized, and shouldn't need to rely upon the user extracting the message catalogs and putting them in some obscure path.

The initial languages supported will be US English and Pig-Latin. All languages should support variants -- including unofficial "silly" variants. Pig-latin is a good test of internationalization, as you can programatically turn English in to Pig-Latin, so it is fast to roll out a pig-latin version of the native development language. Ideally, these "silly" localizations should actually work when specified via an environment variable, this has not been verified, though.

Keymap progress has been started. The idea is to support nearly official keymaps for various roguelikes, in addition to having our own keymap or two. The draft "native" keymap supports a concurrent ROGUE and NUMBER_PAD layout, while containing all the functionality required to allow it to be used as a replacement for any of the other keymaps. (Through the use of more general "use " functions, as well as menus for the less-used commands.) My play-a-like games will also have this flexability.

I've developed an initial concept of keyboard layouts, with the aim to allow game keys to remain in the same key positions, when the physical keys are in different places. This is particularly important in TTY mode when using a keymap with roguelike keybindings.

While introducing a roguelike to a friend, I came upon a realization of a particular need. Now, early on in development there will be a "keytrainer" game designed to assist new players in learning the keys.

We have a concept of stand-alone interactive tools that exist parallel to the game tree. The base logic there is essentially the same as for the game tree. This is in addition to the capacity to have command-line tools specific to a particular game. The idea is that some tools -- such as a map/room/vault editor may exist independant of any particular game.

We're starting to build data models for the various rulesets. The two core rulesets are currently Fudge and D20 (3.5). It appears that all of the table-top RPGs have some implicit terrain knowledge that needs spelled out in something like a rogue-like game. We're setting aside all thought about rulesets to do some exploration in to practical roguelike terrain. For terrain basics, this means terrain that would work for a narrative-based roguelike.

The exploration of practical roguelike terrain should help clear up some of my current questions and concerns. It will also get me thinking about narrative roguelike games, and the narrative roguelike game includes features that broadly span any of the underlying rulesets. At this point, it really seems like the best angle of approach.

Sunday, September 14, 2008

Roguelikes for the blind?

I'm the sort of guy that likes to plan ahead.

Part of planning ahead is foreseeing potential problems and preparing for them beforehand. This means, I think about things like special needs. Because I may well have a need of it myself some day.

This is why I want a single-story house. If I wind up in a wheelchair some day, I don't want to deal with stairs. Plus, if I'm just old and enfeebled, I could fall down the stairs and break my back. Stairs are dangerous. Stairs kill.

Anyway, I was working on PyGame support in STEW, and looking at how PyGame handles keycode input. It occurred to me that it only has the capacity to tell me that keys have changed state, and it certainly doesn't appear to have any built-in accessibility features. Things like sticky-shift states would need to be accomidated at the application-layer. (Why sticky shift states? Well, a number of neurological disabilities could cause me to be unable to simultainously press the correct modifier keys with the correct target key.)

While I was thinking about this, it occurred to me that it would be nice to play a roguelike if I was blind. Of course, that would cause things to get much weirder, though. Ideally, I'd want to present an interface that could not only be read by screen readers, but could actually interface directly with a screen reader. This makes the whole visual representation of the map/rooms hard to present.

It also starts turning the result in to something more resembling a single-user MUD. I was actually thinking of keeping the internal representation of the map, but each room also needs an identifier -- a number will probably do, though we could just as easily do named rooms when something special comes along.

Then, there's the contents of the room. In general, I think I favor a bucket approach. A room has a certain size, and that size is filled by things in the room, with no relationship to the real-world shape of those things.

Melee combat is one thing that doesn't take in to account, though. If we're dealing with two creatures, we can easily take the empty space in the room and pick a random amount of space between the two opponents. However, some rooms are literally packed with creatures. While we can easily state that at most 6 or 9 creatures can attack you at once (depending on whether we want an implied hex map or a standard roguelike grid) you still have things like wands and breath weapons that can strike a large number, bounce off walls, and hit even more.

We could go with a literal roguelike grid, with the ability to look various attackable directions. We'd need short-cuts so that you could also just look at and attack a particular monster type. Sometimes attacking a monster would have implied movement to reach it.

It does seem to me that after thinking about it a little, we need to retain the roguelike map. We'll just need to have sufficient short-cuts to make visual representations of the map unneeded.

Here's a potential example of what it could look like:
You travel 10 feet. You turn east to follow the corridor. You travel 60 feet. You stop 10 feet from the doorway to room 1 on floor 7.

To the easy, you see:
  • a broken door
  • an orc chieftain
  • 3 orc soldiers
To the west, you see:
  • an acid blob
This would break down the line-of-sight by cardinal direction. There could then be eleven direction labels, one for the eight cardinal directions, above, below, and around (for when you get swallowed by something).

Above isn't normally used on roguelikes. Below has common meaning when you're levitating over hazardous ground. Each of those should describe your cell only. The cardinal directions, however, cover more than just the usual lines. Each cardinal direction covers a 45 degree arc in that general direction.

The order is sorted first by monster type, and then by proximity to player. Once the list is sorted, it is compressed so that adjacent monsters in the list form a single line. This means that if 4 orcs are all 100 feet from you in the same general direction, they would show as "4 orcs", and if there is a line of 4 orcs coming toward you at 70, 80, 90, and 100 feet from you they would also show as "4 orcs". If there was a bat amist the orcs, though, in the earlier cast it would always continue to bundle the orcs, but in the later case it would likely wind up splitting the orcs in to two groups with a bat in the middle.

You would need to be able to query how close a given monster type is, what monsters are at a given distance, as well as what monsters are in a given attackable direction.

Doors will also need identifiers. I think we can go with letters, so that a room number + door letter unique identifies a door. This would allow us to say:

You enter room 6. It is 30x60. There are four doors here (A, B, C, D).

There appear to be no monsters in the room. The room contains:
  • ...amulets...
  • ...gems...
  • ...wands...
That is, we identify doors solely by the letter. While we could state, "Door A is on the north wall, and 20 feet from the north-east corner." It just starts getting harder to remember, and having less value. Likewise, we can drop the number of steps taken when walking the corridors. When intersections are presented we should state the direction we came from, and the directions now available. When monsters are nearby the behavior should be as earlier described whether in a room or not.

When monsters are not visible in a room, we can do as described in the most recent example, and bundle all objects together. While this doesn't make as much sense on an open-plain map, rooms are small enough that it makes little difference where an object is within the room. They should still be sorted by proximity, so after you take the first object you can always modify your path. (Assuming we don't short-cut that behavior when in a room and monsters aren't around. I wouldn't be against picking up objects as being 1 turn activities -- particularly if we make entering a room a multi-turn activity.)

Yeah, we can see where I suffer from a case of feature-bloat. Particularly for this project.

Saturday, September 13, 2008

Things that slow STEW down...

So, STEW was reasonably documented... in SDF, which I'm no longer using. I'm now favoring RST all-around.

I had ncurses working reasonably well, but... the goal is full Unicode support, and it certainly appears ncurses wasn't the best choice there. Ncurses itself isn't available everywhere. I needed a GUI version to work everywhere.

My first thought was Tkinter. I even started working towards that end. But, of course, Tkinter doesn't reliably ship with Unicode support.

The goal is always rich colors, rich fonts, while still holding onto the heart of the roguelike genre. No graphics, except to enhance the text. I do want to have some things now normally allowed in TTY mode.

Things like, on old-school terminals:
  • 88/256 color mode on an xterm
  • unicode support (widechar in ncurses)
  • separate background/foreground color

Of course, with a GUI-based setup we can make things much better:
  • full true-color support (better than normal, as we can have fore/back colors different than each other, everything becomes more legible)
  • font characteristics (nornal, italic, bold, strike-through, etc.)
  • atypical diacritic marks (etc) (d with a cedilla.)
  • background/foreground color
  • cell boxing lines which do not interfere with primary glyph
  • cell "glow" color -- blob of color smaller than background color in the middle of the cell
  • underline/strikethrough/shadow a different color than foreground
It is possible to take it a little further, and provide the map-grid with a large primary glyph, plus a small subscript/superscript glyph.

But, of course, first I need to get something working in a GUI with some chance of success. I'm currently thinking PyGame. Yeah, I know it seems quite unlike something used by a true Rogue-like. Still, it should provide what I need, and it is portable. The native full-screen support makes it present itself more like a true rogue-like than something designed first for a GUI.

Saturday, August 14, 2004

STEW-pendous news!

I have the first glimmer of multi-level support. This involved more changes than I'd really like to admit. Partly because I opted for a design decision that allows for multiple concurrent map levels to be running.

Basically, I've decided that infinite depth should be handled just like infinite bredth. I have a system of map-based triggers so that I can offload significant amounts of data when areas have become boring. (I don't yet have logic in place to do the off-loading, nor do I have the logic in place to determine the boringness of a location, but...)

Any system allowing for any sort of infinite map height or width (collectively refered to as infinite bredth) must have logic in place for not only off-loading object data, but also for off-loading internal map data.

Convieniantly for me, while the internal map data has a bit of an ordered stack structure, the map the user sees is 2D. That is to say, if an area is boring, the spot can a still be on-screen and I can offload everything about it except the visual glyph. (If it is off-screen, I can even off-load that.)

However, as multiple levels of the dungeon can be loaded and running at the same time, my object registry is truly unified. All objects in the game are in the same list. This leads to several issues in its own right. First off, it is currently a grow-only list. While I could create a 'free-pool' and recycle the old IDs, I'd prefer to reserve that to a formalized 'list compression' where I could remove references to the invalid IDs.

Even assuming 32-bit numbers are big enough that I'll never wrap, most people would end up running out of memory with just the list over-head for empty entries if it is a plain list. If I had a mutlithreaded database with decent transparent caching, it would probably solve most issues. (However, there would likely be a portability issue, so I'd need a decent generic solution as well.)

The design of the UOR (Unified Object Registry) seems very database-friendly, so some form of underlying database may be used. If lists are used, we need to have multilists, with runs of the list either not there (because the object(s) were destroyed) or off-loaded on to disk somewhere.

Anyway, I'm sleepy for now...

Monday, August 9, 2004

Goo for STEW...

So, I've really decided to gut my existing attack-related logic. I'm headed toward the capacity for true creature-specific attack logic.

Now, this really appears outlandish for traditional Rogue-types of games. Namely, the classic BSD Rogue only has one type of attack, and one type of damage. It has special functions which may be done in addition to the attack, but basically one type of attack.

There is one true exception to the rule, and that is fire-breathing dragons. They have a genuine ranged attack. It also has another odd type of attack, in that there is a (stationary) plant with an odd progressive attack. (It does more damage the more times it hits you.)

However, those two oddities are patched in to a structure which is extremely straight-forward. It has only one way to determine if you are hit. It has only one true form of damage. It is very centered on hand-to-hand combat.

Allowing STEW to support true creature-specific attack logic means that I'll be able to deal with things like the progressive attack without splicing logic in places it doesn't belong.

It also means that I'll easily be able to support things like the race-based defense advantages of the D20 system. Additionally, only with the flexability of true per-instance attack logic (where potentially every player and NPC could have their own attack logic) can I handle the sort of customization found in games like Silver Age Sentinals, and BESM.

In any case, this is a change of structure from what I was doing before. The change-over should go smoothly enough. it's pretty straight-forward.

Wednesday, August 4, 2004

Booga...

STEW is doing well. I'm hashing out some changes to the combat logic now. (Yeah, I decided to incorporate some of the new verb logic.) The big thing missing in STEW at this point is multiple levels and stairways. It's just one teeny little thing I've not gotten around to doing. It'll be the last step before saving/restoring can really be worked on. (There are some internal features that are inter-related between these two tasks.)

Internally, there's an issue in that the internal structure needs to be such that multiple levels can be loaded and run simultainiously. This will allow good multicharacter support, as well as provide the basis for multiuser support. (Multicharacter support is simple 'party'-based play, where the player controls a group of characters that have different advantages and disadvantages. Support for this allows for much more interesting class logic.) I have a clear idea of what I want, I just need to impliment it.

Tuesday, July 20, 2004

Sweet, sweet STEW...

It's a stew-pendous update...

I have an initial pass at line-of-sight and weapons/armor. The line-of-sight seems sound, but ranged attacks aren't in yet. (I know how I'm going to do them, though. I had been worried about the lack of modal events in my event-driven archetecture.)

I had an epiphany and I've decided on an approach to handle "objects having arbitrary verbs" which is a long-term goal of STEW, but really one I didn't expect to complete for the Rogue phase. With the help of some utility functions, arbitrary verbs can be placed on objects -- and written in Python. Yes, that's right. I'm ever so pleased.

The new verb logic is causing me to rewrite most (if not all) of the older attack logic. Yes, special attacks will soon be handled as arbitrary verbs placed upon creatures. Due to the crude nature of Rogue-style special attacks, we have a simple list containing the special attack verbs to use.

The existing armor and ring logic will also be rewritten for the new verb logic. In this case, there's a setup/tear-down structure that's only been sketched out in the new system so far.

It should allow things like a "ring of divine flame" which (1) burns every scoll in your possession when you put it on, (2) grants you immunity to fire, (3) gives any weapon you wield additional fire damage, (4) when empty-handed allows you to shoot bolts of fire at your foes, and (5) slowly gives you permanent sensitivity to water attacks. Yeah, such an artifact would be like cheating in most scenarios, but the very nature of the system is that such an artifact could be a third-party addition added specifically for cheating. (Did I mention the only way to disable cheating is for me to start on the network-based play?)

I may go so far as to actually push the normal attack logic in to verbs, but I'm thinking that may be more complicated than I might first imagine, so it may wait out for a bit. In any case, I'll need the ability to impliment removing of some of the ranged attacks so I can do "Wands of Cancellation" properly.

Monday, June 28, 2004

STEW update...

It's my journal so I can pretend someone cares...

Here's what I have so far:

1. The infrastructure seems sound. I like the general design principle.

2. I have a functional visual interface. The design is to eventually allow multiple interfaces, with the capacity to add new interfaces in a piece-meal fashion. That goal isn't quite there yet. What I have now consists of multiple interface APIs and a clear separation of underlying logic and page interface. I have the start of a second interface (a dumb line-mode interface) in addition to my initial curses interface, and the curses interface fully supports the line-mode API. We'll see if any of the interface logic holds water once I start working on Tk support (which will be after my initial release).

3. The design allows for multiple games to be written from the same infrastructure. This works, and has been tested.

4. The first functional game, made primarily to test the visualization logic was Conway's Game of Life. This also brought about the testing of the remappable key logic.

5. The second functional game, a clone of the BSD Robots was also a success. This was the first test of the heightened single-player cheating facilities. It brought in to play some aspects of the system that had been brushed over with Life. With it, I started playing with some of the visual artifacts that would be needed for true rogue-like games. These included message panels and information panels attached to the main map screen.

Currently, I'l working on the third functional game. This one is a clone of the BSD Rogue game.

My monster following logic is very sound, but there appears a bug in it causing to fail to notice that a route is impossible. (At least, that's my guess as to what is going on.) In any case, the whole "follow you anywhere, even if you teleport out of sight" is excessive. Particularly when you keep in mind that some Rogue-like games can't even follow any sort of indirect route to get to you. (IIRC, Moria in particular.)

The initial set of monster was taken straight from BSD Rogue, as were the initial objects. I have sime magic items, but I've not yet implemented equip/wield, so things aren't quite as complete as they should be there.

At this point, I'm working on my line-of-sight logic. This is primarily for ranged weapons and wands and what-not. However, I've gone ahead and started work on actual visual line-of-sight. (Something BSD Rogue doesn't really have.) I may actually implement it for my Rogue, just so I don't have to implement the BSD Rogue's "room-based sight."

In any case, it is time to stop gabbering, as my honey has decided it is time for me to sleep.