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

X-Com Roguelike: new project

57 views
Skip to first unread message

russ...@hotmail.com

unread,
Apr 7, 2009, 2:07:53 PM4/7/09
to
So, a little bit about myself:

1. I'm a senior at Eastern Michigan University in the CS program,
though I was previously an art major before I changed my mind
2. I'm quite new to programming, though I've though about ever since
writing out BASIC programs on lined paper in junior high, before I had
my first computer.
3. The first computer games I ever played were Doom, Wolfenstein-3d,
Dune 2 and X-Com UFO
4. The first rogue-like I ever played was Jamoria-pre, on a Macintosh
in the early '90s... I was hooked

Now, to my project:
As you may have guessed based on my subject title, I have started an X-
com rogue-like game. I'm programming using Java, so it will
theoretically be portable. I'm doing this because I like rogue-likes,
X-com, and because I need to force myself to work on a larger project
of sorts to keep my mind nimble, and learn (from my mistakes) how to
work on larger projects; something that I'm not exposed to very much
in my CS courses. That and I suppose it could be a lame attempt at
'networking.'

As it is now, I have a VERY rudimentary tactical environment with
multiple PC characters that can be moved around; Yes, I said multiple.
It currently uses (more-or-less) the X-com style of Time Units, etc,
and is turn based... For those who haven't played X-com, (and I pity
them) this means that each unit has Time Units that allow them to do a
certain number of actions each round... and you get to move all of
your guys... then you end the turn and the enemy moves all of it's
guys. This is a large project, but it is one that I'm committed to. I
hope to have a very primitive Alpha version released in about a month,
which will probably offer no game play, other than being able to move
units around the environment to pick up and drop equipment; I could
probably code the methods to allow for units to shoot at other units,
but I highly doubt I'll have an AI, other than perhaps a "shoot at
nearest enemy and/or move in a random direction" kind of thing.

For those of you that are interested in this project, I don't need
help on the programming side of things (at least for now), but feel
free to check out my developer's blog if you want to watch me slog
through the programming.

Also, if there are aspects of any of the X-Com franchise games that
you really enjoy (or loathe), feel free to post them here.

-Russ Jensen

http://orangescribblepad.blogspot.com/

jellisday

unread,
Apr 7, 2009, 2:36:20 PM4/7/09
to
Russ Jansen wrote:

> It currently uses (more-or-less) the X-com style of Time Units, etc,
> and is turn based...

Marvelous! I have a project I've been working on and keeping quite
mum about that approaches an X-COM-like-roguelike from quite the
opposite direction; mine eschews time units for a real-time game world
that the player perceives discretely, with a queue of commands for
each soldier. It's in c and ncurses, and I'm trying to make something
playable over a connection with nearly one-second latency, so it makes
heavy use of vi-style commands. It's a heavy experiment in
alternative c coding conventions, so it's taken me a while to make
progress.

The more tactical roguelikes we can get, the better, I say. It gives
the genre a natural way to expand. I'm looking forward to seeing
progress on yours -- I'll race you to see which of our soldiers are
killing things sooner! And if that's not enough, Andrew Doull is
waiting, too: http://roguelikedeveloper.blogspot.com/2008/01/x-com-remakes.html

- Joshua Day

russ...@hotmail.com

unread,
Apr 7, 2009, 2:45:40 PM4/7/09
to

Actually, I came across Andrew Doull's post last semester, and I think
it's part of what pushed me over the edge and got me to write that
crucial first line of code. Command queues seems interesting.

I may end up using something like jCurses or one of the other display
libraries for Java, but I'm not sure. As it is now, I'm basically just
using a TextPane, but I could easily pull that out and drop something
else in. I have a preliminary POC where I actually have formatted text
in java (color text on a colored background), but it got to be Very
inefficient. I may return to that idea, but for now, I'm just doing
stuff in black and white, with the goal of actually having the
mechanics of everything work.

-Russ Jensen

Mingos

unread,
Apr 7, 2009, 2:57:51 PM4/7/09
to

Geez! I was doing an XCOMRL as well... It was my hidden project for
over a year!

Mingos

jellisday

unread,
Apr 7, 2009, 3:30:40 PM4/7/09
to
Mingos wrote:
> Geez! I was doing an XCOMRL as well... It was my hidden project for
> over a year!

You "have been", I hope, not "were". I won't mind having three
variants to play and bounce ideas between. And you'r coming at it as
an established rogueliker, so you have certain advantages and a
different (and useful) perspective.

Russ Jansen wrote:
> ... but for now, I'm just doing


> stuff in black and white, with the goal of actually having the
> mechanics of everything work.

I've wasted my share of time trying to assign ncurses colors to
everything, and your black-and-white display actually looks pretty
good. I hope that the prospect of having another programmer or two to
talk to about writing this kind of game will encourage you to take
your game farther than you initially meant to.

It's certainly encouraging to me. I thought I would prefer the thrill
of secretively springing a complete game on the community, but this
seems altogether better. And we can gain a lot by borrowing each
others' ideas and spurring each other on -- just like any open
development process.

To my mind, the ultimate goal (besides having neat new games) will be
to establish new tropes for roguelike tactics -- tropes that can be
borrowed into larger wargames or into traditional single-character
roguelikes. Three games stand a better chance of doing this than two
or only one.

- Joshua Day

russ...@hotmail.com

unread,
Apr 7, 2009, 4:23:23 PM4/7/09
to

Well, I'm definitely not assigning any colors to anything, though I do
plan to implement various keys to toggle between different types of
display... for example, pressing one key might change all friendly
units from an @ to a single digit number, representing how much health
they have left, or which direction they're facing, or how they are
standing, etc. Another might toggle the visual display to turn off
everything but equipment that's sitting around, you get the idea. So,
I don't plan to do color soon, but implementing this sort of toggling
won't take much more code that I already have, as anything in the
environment, including agents, gets its char 'symbol' through a
'whatShouldIDisplay()' method... so, if I just switch it to
whatShouldIDisplay(1), where one means, "return a symbol referring to
the % of health..." you get the idea.

Yes, I do have some other programming friends that I can bounce ideas
off of; and some of them are rogue-like fans. One of the guys that I
went to high school with has been adding stuff to the Angband Borg and
compiling it, for example.

Also, the 7drl contest seems interesting, and some day I'll read the
reviews and perhaps try out a few of them... not to play them
extensively, but to see what they've done. Before my first alpha
release, I intend to consolidate my windows and try to emulate the
look of the angband interface, or at least something that's easy to
read. I've just got a place-holder H.U.D. so that I can see that
various aspects are working correctly without having to trace through
the debugger to verify that variables are correct.

Being able to cycle through 12 agents and see their (more or less)
unique names change in the HUD is kind of nice.

Mingos

unread,
Apr 7, 2009, 4:43:52 PM4/7/09
to
On 7 Kwi, 21:30, jellisday <josh....@gmail.com> wrote:
> You "have been", I hope, not "were".

Regretfully, "was", since I stopped the development months ago to
concentrate on UR. I'll get back to my XCOMRL at some point.

> I won't mind having three
> variants to play and bounce ideas between.  And you'r coming at it as
> an established rogueliker, so you have certain advantages and a
> different (and useful) perspective.

"Established rogueliker", wow! Thanks for calling me that, but I still
feel quite green in this field :P.

Mingos

Slash

unread,
Apr 8, 2009, 12:43:14 AM4/8/09
to
On Apr 7, 1:45 pm, "russj...@hotmail.com" <russj...@hotmail.com>
wrote:

> On Apr 7, 2:36 pm, jellisday <josh....@gmail.com> wrote:
>
>
SNIP

> I may end up using something like jCurses or one of the other display
> libraries for Java, but I'm not sure. As it is now, I'm basically just
> using a TextPane, but I could easily pull that out and drop something
> else in. I have a preliminary POC where I actually have formatted text
> in java (color text on a colored background), but it got to be Very
> inefficient. I may return to that idea, but for now, I'm just doing
> stuff in black and white, with the goal of actually having the
> mechanics of everything work.

I recommend using my own library for output, namely libjcsi (http://
slashie.net/libjcsi)

At least three developers are using it now. You can check expedition
to see how it looks in action (http://slashie.net/page.php?27)

>
> -Russ Jensen

--
Slashie

russ...@hotmail.com

unread,
Apr 8, 2009, 7:23:00 AM4/8/09
to

Hmm, that looks interesting. I'm just on my way to class for the day,
could you sort of summarize how your library works? Does it have built-
in support for scrolling around in an environment that is larger than
the viewport? What sort of data structure is your colored/formatted
text stored in? The pitfall of my previous colored display was that I
was formatting each character in the text pane and had to do a
setcontent(getcontent()+new(element)) or something... so it looked
nice, but for larger displays became very slow...

But, your page is bookmarked.

-Russ Jensen

Slash

unread,
Apr 8, 2009, 10:56:22 AM4/8/09
to
On Apr 8, 6:23 am, "russj...@hotmail.com" <russj...@hotmail.com>

wrote:
> On Apr 8, 12:43 am, Slash <java.ko...@gmail.com> wrote:
>
>
>
> > On Apr 7, 1:45 pm, "russj...@hotmail.com" <russj...@hotmail.com>
> > wrote:> On Apr 7, 2:36 pm, jellisday <josh....@gmail.com> wrote:
>
> > SNIP
>
> > > I may end up using something like jCurses or one of the other display
> > > libraries for Java, but I'm not sure. As it is now, I'm basically just
> > > using a TextPane, but I could easily pull that out and drop something
> > > else in. I have a preliminary POC where I actually have formatted text
> > > in java (color text on a colored background), but it got to be Very
> > > inefficient. I may return to that idea, but for now, I'm just doing
> > > stuff in black and white, with the goal of actually having the
> > > mechanics of everything work.
>
> > I recommend using my own library for output, namely libjcsi (http://
> > slashie.net/libjcsi)
>
> > At least three developers are using it now. You can check expedition
> > to see how it looks in action (http://slashie.net/page.php?27)
>
> > > -Russ Jensen
>
> > --
> > Slashie
>
> Hmm, that looks interesting. I'm just on my way to class for the day,
> could you sort of summarize how your library works?

Yeah, you just initialize a ConsoleSystemInterface object, and then
you can use its methods.

Following some of the most important methods (from
http://code.google.com/p/libjcsi/source/browse/trunk/src/net/slashie/libjcsi/ConsoleSystemInterface.java)

/**
* Prints a character on the console
* @param x horizontal position
* @param y vertical position
* @param what The character to be printed
* @param color The color, one of the ConsoleSystemInterface
constants
*/
public void print(int x, int y, char what, int color);

/**
* Waits until a key is pressed and returns it
* @return The key that was pressed
*/
public CharKey inkey();

/**
* Reads a string from the keyboard with a maximum length
* @return The String that was read after pressing enter,
truncated at specified length
*/
public String input(int length);

/**
* Clears the screen
*
*/
public void cls();

/**
* Saves the screen contents to a backup buffer
*
*/
public void saveBuffer();

/**
* Restores the contents of the backup buffer to screen
*
*/
public void restore();

> Does it have built-
> in support for scrolling around in an environment that is larger than
> the viewport?

That responsability doesn't belong to an IO library such as
libjcsi...

Such kind of things would rather go into my other project, the Serf
roguelike engine, (which makes use of libjcsi for output). (http://
code.google.com/p/serf-engine/) However, it is not yet implemented.

> What sort of data structure is your colored/formatted
> text stored in? The pitfall of my previous colored display was that I
> was formatting each character in the text pane and had to do a
> setcontent(getcontent()+new(element)) or something... so it looked
> nice, but for larger displays became very slow...

Such data structure is hidden from the developer, you don't want to
care about it, you rather use the interface methods such as print
(x,y,String,color), and let the library store and display them. You
can set up a color as a pair of foreground/background, using the
constants provided or specifying RGB values, some implementations are
unable to display all colors and will instead approximate to the
nearest one.

But, if you want to know, the data structure is implementation
dependant (there are currently 2 output implementations, one uses
JCurses and another one built on top of Swing), both use a pair of two
dimensional arrays, one for the characters and another for the color
objects,

We are doing a tutorial, someday we will finish it :)


>
> But, your page is bookmarked.

Nice, hope to see another project using it, we are constantly
enhancing it!

>
> -Russ Jensen

--
Slashie
http://slashie.net

russ...@hotmail.com

unread,
Apr 8, 2009, 1:39:16 PM4/8/09
to
> Following some of the most important methods (fromhttp://code.google.com/p/libjcsi/source/browse/trunk/src/net/slashie/...)

Thank you, that does seem very promising. I only asked about scrolling
ability, because I wasn't sure how extensive the library was. I've
seen one or two other Java libraries, for RL games, that included a
bunch of stuff including FOV, pathfinding, etc. It appears that it
will be easier to implement color than I feared; though what someone
else said will still hold true; that it's just one more kind of data
that I'll need to include in all of my functions. But still, your
library has been right-clicked-save-as. I think I'll try to
incorporate it into my design for use with my first alpha release,
whenever that is, and just not worry about actually using the color
functionality until a later date; (but allowing for its eventual use
in all applicable methods.)

0 new messages