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

Warehouse day 2 - 7DRL 2011 progress

25 views
Skip to first unread message

vsync

unread,
Mar 10, 2011, 2:18:54 AM3/10/11
to
So last night I finally got a chance to sit down for a few hours and
start on my entry.

Basic stuff so far, but I got the basic structure of the game world
modeled and have the ability to look up map contents, as well as move
the player around. Finally I made a rough map printer to show what's
surrounding the player.

I didn't get as much coded as I would have liked but I've done some
thinking as far as data structure and world generation. Given that the
setting consists of storage rooms and corridors set in/under a mountain,
I want most of the generation to center around the corridors, with
access between floors limited to elevators which run up and down the
height of the dungeon. I'll probably make sure to have some rooms have
different height than others which will make generation more challenging
but lead to a more interesting experience.

As far as display, I wasn't even going to worry about it until a little
bit later and then do that entirely through XML-RPC. But I quickly
discovered that seeing the map is going to be important when
developing. Then I realized I should be able to write a Curses
interface and then later have it interact with proxied objects, letting
me code directly to the world now but interact remotely later, and I'll
have 2 clients (console and graphical) for the price of 1.

CLiki tells me that cl-charms is preferable to cl-ncurses, using CFFI
instead of UFFI (not sure exactly the differences between them).
However cl-charms seems to be early in development and I couldn't find
many docs, and additionally trying to just flash the screen caused
memory corruption to my SBCL image. So I got cl-ncurses and that seems
to work perfectly.


Screenshot: <URL:http://quadium.net/~vsync/7drl/2011/warehouse-day-02.png>


--
vsync
http://quadium.net/~vsync/

My whole approach in broadcasting has always been "You are an
important person just the way you are. You can make healthy
decisions." ... I just feel that anything that allows a person to
be more active in the control of his or her life, in a healthy way,
is important.
-- Fred Rogers

vsync

unread,
Mar 12, 2011, 4:19:04 PM3/12/11
to
vsync <vs...@quadium.net> writes:

> As far as display, I wasn't even going to worry about it until a little
> bit later and then do that entirely through XML-RPC. But I quickly
> discovered that seeing the map is going to be important when
> developing. Then I realized I should be able to write a Curses
> interface and then later have it interact with proxied objects, letting
> me code directly to the world now but interact remotely later, and I'll
> have 2 clients (console and graphical) for the price of 1.

So it turns out it wasn't /quite/ as much of a shortcut as I thought
it'd be. SBCL seems to be doing something funny with IO, or NCurses is,
or there's just a gray area that they don't play nicely together in.
Basically you can use raw input and grab input with getch() yourself,
but it will still get through sometimes to the REPL which will get very
confused. It's almost as though they are fighting for control of an
interrupt or callback or something, very strange. Anyway that must have
been what

<URL:
http://roguebasin.roguelikedevelopment.org/index.php?title=Common_Lisp#Can_I_use_Curses_on_Lisp.3F
>

was referring to by "curses and Emacs don't play well together". I had
to dig around a bit for the right SAVE-LISP-AND-DIE recipe (and spent
far too long hoping to avoid having to make a separate image; and
fiddling with the REPL, trying to get it out of the way; and fiddling
with Swank, trying to get it to lock out the REPL) but found it in the
end. Multiprocessing doesn't seem to be working the way I'd like, and I
need to put special-purpose images like this on their own port, but I
have a reliably working UI and I still have access to my debugger,
SLIME-REPL, etc.

The other aspects of my strategy have worked out well. I've got a very
thin service layer which is basically proxying the engine's game
objects, and keymappings and whatnot are very easy to define in terms of
the operations specified there. I'm reasonably confident getting
everything working over XML-RPC won't be a bother, although
schedule-wise it's a bit of a stretch. I was really hoping for the
graphical Java UI by the end of the week, but I may have to settle for
*a* UI and build the rest on later.

Now, I'm in an interesting situation. I have the foundation laid but
that's really all it is: I can move the player around in a formless and
empty universe. On the one hand it seems everything should be
straightforward from here on, but on the other -- having not previously
implemented a roguelike -- I'm sure there are subtleties which will bite
me. I have the rest of the weekend, but I also didn't get any sleep
last night and am about to nap. We'll see.

Unfortunately last week I had a lot of demanding clients and a product
release, which I knew would cause this week to be busy but didn't
realize the extent of the schedule cascade. Oh well, it's a lesson to
myself about how when I say I'm setting aside time for X (in this case
7DRL) I need to fully reserve it, and on the other hand how I can really
knock things out quickly in whatever blocks of time I am able to really
set aside. Anyway, this event's a lot of fun for me.

Here's the latest screenshot:

<URL: http://quadium.net/~vsync/7drl/2011/warehouse-day-04.png >

--
Tim Howe

vsync

unread,
Mar 12, 2011, 4:45:19 PM3/12/11
to
forgot to mention, i'm having problems getting text to show up in the
"normal" attribute (i.e., completely unstyled plain text in the
terminal). it seems anything which goes through ncurses ends up
brighter.

just curious if anyone's seen that before or had any luck. the ansi
colors all work as do most of the styling attributes (bold, underline,
etc). but for some reason "plain" text is brighter than normal and
setting neither A_NORMAL nor A_DIM seem to help.

Any thoughts? This is with a recent build of plain old xterm.

--
vsync

vsync

unread,
Mar 13, 2011, 1:23:08 PM3/13/11
to
So, for the second time in as many weeks, I managed to nuke all recent
work in a repository. I wanted to see if Darcs worked the way I thought
it would to allow checking out of different modules separately -- and it
did -- but I fumble-fingered and accidentally hit Enter on a blocked tab
complete. Instead of "rm -rf warehouse.client", I ended up typing

rm -rf warehouse

Luckily this time I still had every file open in XEmacs so I just
re-saved them all and re-committed. Push early and push often, kids.
(Last week when this happened I had a day's worth of work ready to
commit, forgot, and did "hg up -C $otherbranch" when I needed to do some
merges... and the editor was _not_ open in that case.)

Having gotten my files back, I set about working on the terrain
generation. Got it creating a random map around the player's start
point, and rendering a map of the player's surroundings. It should be
super straightforward to plug this into the UI so the user can explore,
but that's what I'm about to find out today.

<URL: http://quadium.net/~vsync/7drl/2011/warehouse-day-06.png >

--
vsync

vsync

unread,
Mar 14, 2011, 1:39:23 AM3/14/11
to
Well, it's time to admit that this weekend wasn't enough time to catch
up the time lost during the week.

I have the scrolling viewport working now but that's about the only
user-visible feature. Here are the goals I had for this week:

- [X] basic world initialization
- [X] curses UI
- [X] UI adapter
- [X] keybinding/command architecture
- [X] terrain
- [X] get player surroundings
- [ ] map generation
- [X] see surroundings
- [ ] movement rules
- [ ] enemy placement
- [ ] combat
- [ ] enemy movement
- [ ] goals
- [ ] networked play
- [ ] multiple users
- [ ] Java client
- [ ] graphics
- [ ] music
- [ ] sound
- [ ] story
- [ ] Web site

Screenshot:

<URL: http://quadium.net/~vsync/7drl/2011/warehouse-day-07.png >

So all in all challenge-wise I'd have to say it's a failure, but from a
personal standpoint I'm really happy though. I played around with a lot
of technologies new to me, saw other genuinely new techniques as the
rest of you posted your updates, got back in touch with old-school
gaming and some technologies I'd used but not in a while.

This is the first time I've tried writing a full game on my own in
probably 10 years or so and the creative juices are flowing. I'm going
to keep working on it and I'll post here as development progresses.
Realistically, given what I want for the game and my rate of progress so
far, I'm guessing it will be about a month before I have something I'd
consider playable.

Thanks for the inspiration everyone. Congratulations to everyone who
finished the challenge, and I hope you all had as much fun as I did!

edenicholas

unread,
Mar 14, 2011, 2:20:09 AM3/14/11
to
It's not a failure, it's a foundation to build on for next time. :)
0 new messages