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

A Procedural ASCII Universe

57 views
Skip to first unread message

aave

unread,
Aug 24, 2008, 5:11:46 AM8/24/08
to
Hi everyone!
I thought I'd finally get out of shadows and also share my latest
project with you.

It is not strictly a roguelike in the traditional meaning, more like
an exploration game with some collecting and trading maybe, but it
features things you might find interesting. So, I am creating a
procedural universe presented in ascii graphics. It has billions of
stars and planets to explore with different "zoom-levels": galactic
map, starmap, solar system map, planet surface overview, and planet
surface detail. Random seeds are based on features' location in the
upper level, tracing back to a single seed - the world is persistent.

You can find more info, latest screenshots and (currently old)
technology demos from the project website at http://jouluserver.com/~aave/ascii/

I am using Perlin noise to create almost infinite nebulae and planet
surfaces that require practically no memory or loading at all
(generated real-time in a small view buffer). Other, smaller things
such as galaxy overviews and cities are created more traditionally,
but the goal is that there will never be a notable loading time.

The size of the universe is limited by the number of different random
seeds I can get from a 64 bit double data type's integer part, so
practically the biggest map, the starmap with the stars and nebulae,
is around 7*10^13 tiles big (could be expanded with tricks, but I
think that's enough). Other map types are smaller to keep them
interesting.

Back to the game part, I have been thinking of making this an online
multiplayer game where players explore the galaxy with their
spaceships, walk the surfaces collecting riches and trading them,
perhaps building cities and maybe naming places like in Noctis. The
server would keep track of the addresses of places where there are
players and exchange data between them, leaving most of the work to
the clients. Nothing too serious, we'll see what I can cook together.

All that has to wait, however, because I'll build the universe engine
first before adding gaming things. In that I have made some promising
progress as one can already travel the stars and pick one to search
for planets and visit the surfaces. Much remains still to be done
however. I'll post updates to the website and perhaps here too, if
there is any interest... (I have also though of writing some articles
about procedural generation as this is not my first try at creating
stuff with code.)

Cheers.

eyenot

unread,
Aug 24, 2008, 2:22:31 PM8/24/08
to
On Aug 24, 5:11 am, aave <tapiovier...@gmail.com> wrote:
> The size of the universe is limited by the number of different random
> seeds I can get from a 64 bit double data type's integer part, so
> practically the biggest map, the starmap with the stars and nebulae,
> is around 7*10^13 tiles big (could be expanded with tricks, but I
> think that's enough). Other map types are smaller to keep them
> interesting.
>
> Back to the game part, I have been thinking of making this an online
> multiplayer game where players explore the galaxy with their
> spaceships, walk the surfaces collecting riches and trading them,
> perhaps building cities and maybe naming places like in Noctis. The
> server would keep track of the addresses of places where there are
> players and exchange data between them, leaving most of the work to
> the clients. Nothing too serious, we'll see what I can cook together.

I dunno, I guess if there were potentially millions or, well I guess
hopefully billions of people playing, that I could just 'run into' and
we could help each other build a cool ship or city or whatever, that'd
make such a humongous universe worthwhile. And I wouldn't want to be
too inhibited in getting around in it, like, "well I like the way you
think, let's meet at the crab nebula" "oh, alright, i'll check my warp
drive... okay, great, i have warpx100 capability and it will only take
me three minutes to get to the instantaneous wormhole and then two
minutes to the nebula from silver crab house 1" "oh, well okay, i have
warpx10, so... i will be meeting you... well i will be going into
cryosleep and my next login session is slated for three months from
now. so if you're around when i get there, then we will talk." "oh,
never mind, i just received a hyperspace relay communication that some
other player blew up my foundation planet. there goes last year's
lunch breaks. i should have invested in planetary defense level XIV."
"o-- oh... well, um." "let's just plan this for some other time."
"well i don't think it's going to work. i think... i'd rather meet
somebody a little closer" "i understand. let's not make this awkward."
"okay. bye."

spag

unread,
Aug 24, 2008, 3:02:40 PM8/24/08
to
Still weird when I look at shades of colors in ascii screenshots, but
those are some really nice looking nebula.

-spag

aave

unread,
Aug 24, 2008, 3:05:35 PM8/24/08
to
On 24 elo, 21:22, eyenot <eye...@gmail.com> wrote:
> I dunno, I guess if there were potentially millions or, well I guess
> hopefully billions of people playing, that I could just 'run into' and
> we could help each other build a cool ship or city or whatever, that'd
> make such a humongous universe worthwhile. And I wouldn't want to be
> too inhibited in getting around in it, like, "well I like the way you
> think, let's meet at the crab nebula" "oh, alright, i'll check my warp
> drive... okay, great, i have warpx100 capability and it will only take
> me three minutes to get to the instantaneous wormhole and then two
> minutes to the nebula from silver crab house 1" "oh, well okay, i have
> warpx10, so... i will be meeting you... well i will be going into
> cryosleep and my next login session is slated for three months from
> now. so if you're around when i get there, then we will talk." "oh,
> never mind, i just received a hyperspace relay communication that some
> other player blew up my foundation planet. there goes last year's
> lunch breaks. i should have invested in planetary defense level XIV."
> "o-- oh... well, um." "let's just plan this for some other time."
> "well i don't think it's going to work. i think... i'd rather meet
> somebody a little closer" "i understand. let's not make this awkward."
> "okay. bye."

Thanks for the reply, nice little story :)

I try to counter some of the problems you expressed:

* Travelling across galaxy is pretty fast as one can zoom out to view
the whole galaxy at once and then engage the HyperSuperJump-drives to
dive in just about anywhere. There is still quite a few tiles in these
"galaxy sub-areas", but on the other hand, there is room for everyone
and lots of space to explore. I just need to make enough variance,
rarities and profit possibilities to make it worthwile to go just a
bit further.

* Some kind of navigation beacons would be useful to mark a location
for a HyperSuperJumpDriveDevice for a quick re-visit.

* I'm not sure is there going to be much fighting, but I doubt the
risk of someone finding someone else's secret hiding place a few
million tiles to direction X is very likely... The player interaction
would center around one or few hub systems, where the trading and
socialization would take place.

* Actually the whole multiplayer thing is more like an extra spice and
an excercise for me than the center element. I mentioned the game
Noctis, which is old and butt-ugly single player exploration game with
no combat or NPCs at all. Some people are content with that. This aims
to add some more content to exploration. It also serves as a good
excuse to create algorithms for procedurally ganerated worlds. ;)

I'd like to have more comments and thoughts. Ideas are also
welcome! :)

Gelatinous Mutant Coconut

unread,
Aug 24, 2008, 4:22:10 PM8/24/08
to
> Back to the game part, I have been thinking of making this an online
> multiplayer game where players explore the galaxy with their
> spaceships, walk the surfaces collecting riches and trading them,
> perhaps building cities and maybe naming places like in Noctis. The
> server would keep track of the addresses of places where there are
> players and exchange data between them, leaving most of the work to
> the clients. Nothing too serious, we'll see what I can cook together.

Do you intend to have sites players have visited and modified (by
mining minerals or building cities or whatever) stored on a central
server for everyone, or just locally for a player? If you do plan to
have a server keep track of everyone's deviations from the
procedurally generated universe, you should probably put up some
reasonable limits; you don't want your server bursting into flames the
first time someone decides to write a script that gives a random name
to every feature it encounters. You would also have to figure out how
you would want to deal with two players making different changes to
the same site at the same time, and other issues of concurrency that
are likely to show up. (You probably don't want to take the MMO
approach of doing the entire simulation on one of your own machines.)

Maybe there is a clever way to handle those issues that I am not
thinking of?

aave

unread,
Aug 24, 2008, 5:52:58 PM8/24/08
to
On 24 elo, 23:22, Gelatinous Mutant Coconut

<GelatinousMutantCoco...@gmail.com> wrote:
> Do you intend to have sites players have visited and modified (by
> mining minerals or building cities or whatever) stored on a central
> server for everyone, or just locally for a player? If you do plan to
> have a server keep track of everyone's deviations from the
> procedurally generated universe, you should probably put up some
> reasonable limits; you don't want your server bursting into flames the
> first time someone decides to write a script that gives a random name
> to every feature it encounters. You would also have to figure out how
> you would want to deal with two players making different changes to
> the same site at the same time, and other issues of concurrency that
> are likely to show up. (You probably don't want to take the MMO
> approach of doing the entire simulation on one of your own machines.)
>
> Maybe there is a clever way to handle those issues that I am not
> thinking of?


Hmm, the problem with procedural generation is that although you can
store an entire universe in a single random seed, all changes
player(s) make to the world must be kept track and that starts to eat
memory. I could probably cheat in some small things like not save
every chopped tree (it'll probably have time to grow back between
visits from a few lightyears away ;) ), but I'm really planing on
adding some kind of house-building feature - and that requires
storage.

The core universe and some simulation (like determining if there is
mineral in a spot) are calculated by the client software, leaving the
server to keep up with the changes in the world and telling them to
the players in a corresponding area (together with the other players'
movements). However - as you said - restrictions are in order to avoid
unnecessary smoke from the poor server machine ;) They can be detailed
when I reach the point when they become relevant. If the changes start
to eat too much memory, the oldest or least visited features could be
erased ("a volcano erased this city completely"). As for the
simultaneous edits on the world, the one who's action reaches the
server first gets to do it, the other gets an error message or
something.

I have made a MUD before (actually more than one, but none of them
were really completed as I lost interest to add more content and
finish them after I got them to work... :( ) so multiplayer coding
isn't new to me, although this thing requires a bit more complex work.
I haven't, however, yet reached the step in development where I would
start to actually implement the network code so some problems are
likely to pop up. Nevertheless, I think this will never be a close
competitor to games like WoW in terms of player count, so I won't be
having to come up with a server code that can handle a several
thousand simultaneous requests for status updates. And I can always
revert to single player if too high obstacles rise in the way.

Darren Grey

unread,
Aug 24, 2008, 7:30:27 PM8/24/08
to
On Aug 24, 10:11 am, aave <tapiovier...@gmail.com> wrote:
> Hi everyone!
> I thought I'd finally get out of shadows and also share my latest
> project with you.

Damn, those are some beautiful screenshots - the nebulae look great.
Seems to me like an ASCII Frontier, which would be quite amazing. The
multiplayer element wouldn't interest me much, but single-player
exploration of such a huge universe looks very exciting.

--
Darren Grey

Christian Knudsen

unread,
Aug 24, 2008, 8:47:39 PM8/24/08
to
Yay! Another space roguelike! Excellent! :)

Those screenshots are beautiful and the test programs seem to work ok,
though when pressing space on the galaxy map, the screen first goes
completely black, and then when pressing space again, you're on the
ground map (and you can then continue to press space to continue on to
more black screens).

aave

unread,
Aug 25, 2008, 2:55:46 AM8/25/08
to
On 25 elo, 03:47, Christian Knudsen <webmas...@asciisector.net> wrote:
> Those screenshots are beautiful and the test programs seem to work ok,
> though when pressing space on the galaxy map, the screen first goes
> completely black, and then when pressing space again, you're on the
> ground map (and you can then continue to press space to continue on to
> more black screens).

You found a secret. :D The spacebar is used to enter places in that
test program, as there wasn't other generators made than the surface
(which itself is a horrible torso), there is black screens (and no
check for going too far). I originally though to erase that function
from the demo, but at that moment I had dramatically changed the
program structure, nebulae needed work and I didn't have older sources
backed up so I left the function there, hoping no one would find it :)

Thanks for the feedback, everyone, keep 'em coming.

aave

unread,
Aug 26, 2008, 4:22:01 AM8/26/08
to
Yesterday I got tired of tweaking the generators, so I decided to try
something else. I made a simple server program and added some client
features to the main code and suddenly I had simple multiplayer where
players could see each other moving in the galaxy map. It is just a
test really, much more work has to be done before I can say the
network part is truly implemented, but it's a start!

I also got some nice ideas, like making gas giant planets, where you
can fly above the surface (scooping fuel maybe?) but cannot enter the
detail level (as there really is no ground). Today I implemented a
more suitable moving style for a space ship, where you control the
angle and speed of the ship (direction is represented by a crosshair
some ten tiles away from the ship). The ship still respects tiles, but
now it can go faster and pick a direction more accurately. I think
walking in the detail level is still done traditionally.

Speaking of which, I also started working on the closest view level.
It isn't much yet, as it only interpolates between five nearby upper
level textures adding some noise, but I'm happy that there is now no
black screens in any view level.

My focus will remain on tweaking and adding features and variance to
the three lowest view levels, but every time that starts to irritate I
can start adding gameplay things or improving the server program.
Possible near future things would be a nav-beacon system, fuel system
and a better player management system for the server program.

Gamer_2k4

unread,
Aug 26, 2008, 2:22:31 PM8/26/08
to
On Aug 24, 6:30 pm, Darren Grey <darrenjohng...@gmail.com> wrote:
> Damn, those are some beautiful screenshots - the nebulae look great.

My thoughts exactly. Did you by any chance use Jice's library to
render everything?

--
Gamer_2k4

aave

unread,
Aug 26, 2008, 3:27:51 PM8/26/08
to
On 26 elo, 21:22, Gamer_2k4 <gamer...@gmail.com> wrote:
> > Damn, those are some beautiful screenshots - the nebulae look great.
>
> My thoughts exactly.  Did you by any chance use Jice's library to
> render everything?
>
> --
> Gamer_2k4
No, I actually found that library only a couple of days ago. It seems
to be quite astonishing, but so far I have everything I need. I'm
using FreeBASIC, which can render text in 32bit colors, and I had a
good implementation of Perlin noise at hand, so there hasn't been a
need for an external library to produce those. I have to take a closer
look someday, though, because it seemed to have really cool effects.

jot...@hotmail.com

unread,
Aug 27, 2008, 11:01:15 AM8/27/08
to

Jice's lib seems to be all the rage these days! Someone should start a
thread asking how many people are using it, just out of curiosity?

Jotaf

jice

unread,
Aug 28, 2008, 5:21:51 PM8/28/08
to
On 27 août, 17:01, jota...@hotmail.com wrote:
>
> Jice's lib seems to be all the rage these days! Someone should start a
> thread asking how many people are using it, just out of curiosity?
>
> Jotaf

All I can say is that there are 35 registered members on roguecentral
forums and I've tracked 7 in-dev projects so long (including projects
using libtcod.net). You can probably add a few developers working in
the shadow.

--
jice

Scautura

unread,
Aug 29, 2008, 10:26:28 AM8/29/08
to
jice wrote:

I'd stick my head out of the shadows and say I'd try it - but the python
port has a fatal bug (reported), and my C/C++/C# is not good enough to
give it a go there.

It does look very interesting, and I'll probably take a deeper look once
I can get my head round using it (either pythonised or improving my C-fu)

Scautura

jice

unread,
Sep 1, 2008, 4:22:03 AM9/1/08
to
On 29 août, 16:26, Scautura <n...@scautura.co.uk> wrote:
> jice wrote:

Mmh too bad the python port is broken. It's a great language. If I
could, I would spend some time on the port myself. I don't know if
Kyle is still actively working on it. Maybe he will answer here... ;)

--
jice

Altefcat

unread,
Sep 1, 2008, 4:45:47 AM9/1/08
to
> Mmh too bad the python port is broken. It's a great language. If I
> could, I would spend some time on the port myself. I don't know if
> Kyle is still actively working on it. Maybe he will answer here... ;)
>
> --
> jice

I wait for the answer too; that would be nice to have an update with
the upcoming 1.4 version, any chance for that ? I would happily
contribute for this, even if I have few spare time :-).

jice

unread,
Sep 1, 2008, 8:00:21 AM9/1/08
to

I tried to contact Kyle a few weeks ago to see if a synchronized
release was possible, but I didn't get any answer. He may be busy in
the real world for some time... So I don't think a 1.4 python version
will happen soon.

--
jice

0 new messages