Author Topic: RogueGene  (Read 19739 times)

BinaryMan

  • Newcomer
  • Posts: 4
  • Karma: +0/-0
    • View Profile
RogueGene
« on: January 07, 2010, 08:48:09 AM »
I had an interesting idea for a sci-fi roguelike called RogueGene. The idea is inspired in part by Xenocide and its mutations, and NetHack's intrinsic gains from eating monster corpses. Here are some of the features:


Background

The game takes place in the distant future on an unknown world. While exploring a strange energy signature on the planet's surface, a scientist stumbles upon a device that teleports him into the heart of an ancient alien city. With no obvious way to get back, there is no choice but to explore the city and hope to find some way to escape. However, it soon becomes apparent that there is someone – or some thing – still alive in the city.

Persistent, Active, and Fully Connected World

The various floors of the city are persistent; items will stay where you leave them and you can (and should) return to the main control center (starting point) to store items, use the laboratory and other facilities, and learn more about the city. The city and its inhabitants are also active at all times; creatures will reproduce, feed on each other, and evolve on all floors while the player explores the city. As they become smarter and stronger, they may also learn how to move between floors as well and search for food… possibly you! The city floors are connected in a consistent way; the floors are large and stacked like a cube or column, so there is a third dimension to consider when navigating the city. Luckily, there are some teleportation devices within the city to make travel easier, but some will require repairs or a new power source, and traveling to an unexplored area could be dangerous. The main control center is roughly in the center of the city vertically, but the further up or down one travels from it, the less power is able to reach the floors (the remaining power in the core is not sufficient to power the entire city); doors, teleporters, sentry guns, and other things may not function so easily without the right tools or some way to power them; even the lights may not function so be prepared!

Alien Experiments and DNA

An interesting aspect to the game is that gathering equipment and tools, while essential for exploring, is not the main source of a character’s strength. Rather, you will learn that the city has laboratories with technology far beyond anything you have ever seen. With the right knowledge and resources, the lab can create chemical and biological weapons, neural implants, robotics, or even perform genetic manipulation on a living subject. As the character progresses, they will gain expertise that may allow them to gain aspects of creatures encountered in the city using DNA manipulation, or enhance themselves with cybernetic technology. Such drastic changes to human physiology are not without risks - perhaps it was such experiments that were responsible for the current state of the city?

Experience is the Best Teacher

Initially, a character will know nothing about alien technology, although a high aptitude in certain areas such as computers or mechanical repair will provide a limited intuition that increases the chance of success when trying to use new technologies. Skill and knowledge are acquired through using and experimenting with the city’s systems and technologies. Eventually with patience a person can become proficient at using and repairing these systems. Other entities in the city can learn and evolve also – perhaps in unexpected ways.

Creatures

Although the main control center at the heart of the city is well protected, there are places in the city with little or no power to run security systems or sensors. There’s no telling what’s out there. Worse, it would appear that some creatures reproduce or consume other creatures, incorporating DNA and new traits into their own bodies.

DNA Slots/Implant Slots

Basically, you get more abilities by genetic enhancements and/or implants, and as your skill level increases you can install more into yourself. You need to find a genetics lab or robotics bay to add/remove these in most cases, although both can be found near the main control center.

----------------------------

I would be interested in ideas about:

- How to generate the city structure. For example, a 100x100x100 city size would have 50 levels above and below the core with each level a 100x100 area filled with rooms and corridors. The city is underground for the most part, so there may be some offshoots into hidden areas outside the city walls where the walls have cracked and creatures have dug a home. Some areas can only be reached by taking stairs or teleporters up or down some number of levels, so part of a level may be inaccessible from where you are. All areas, however, should be reachable somehow (even if obstacles are in the way). The city layout is less like a cave or dungeon but more like how city streets are laid out in a metropolis; more grid-like, kind of like this: http://mathieuhelie.files.wordpress.com/2009/02/complex-grid-city.jpg .

- Monster DNA and attributes. Mutations and natural selection will play a part in combining creature DNA into unique creatures. All creatures will be active while the player is doing things (perhaps slower time depending on technical feasibility) so they will eat each other, reproduce, and evolve. Creatures farther from the core in either direction will have stronger abilities and more of them. There is an artificial life aspect here which I would like to explore. Creatures will be able to hunt or explore multiple levels so running down stairs isn't going to stop them. Their behaviors may also be based on genetic properties, so two things with the same attributes may have different preferences for using their abilities; one insect creature may spit acid from a distance 90% of the time, while the other runs at you and claws you (even a relatively simple state machine with a random element might work here).

- Play styles. What will you focus on? Mutate your DNA to become stronger, install cybernetic implants to interface with the city directly, create drones to explore and robots to fight for you, make a new type of organism to serve your purpose, create biological or chemical weapons? You are free to do some or all of the activities, with no race or class (unless you count mutations as race-defining). What else would someone want to do?

- Living city. The creatures are doing their thing, certainly. But, the city itself is running in the background. Remember that lab you powered up a few levels ago? It might be running it's own experiments. Damaged security systems? They might shoot you, creatures, both, or none; release toxic gas or change the environmental conditions; try to lock you out of rooms, terminals, or teleporters.


Other ideas are welcome. It can be outside the box, if it makes things more interesting/fun.

ido

  • Rogueliker
  • ***
  • Posts: 618
  • Karma: +0/-0
    • View Profile
    • Tame Tick
Re: RogueGene
« Reply #1 on: January 07, 2010, 10:29:04 AM »
Not directly answering your questions, but this sounds like a very large game.

I would suggest you simplify it considerably, especially if this is your first roguelike.

Ask yourself: what is the main mechanic of this game, what is the core idea that is driving it?

Then implement the simplest possible game that explores that idea.

-Ido.

IsharaComix

  • Newcomer
  • Posts: 5
  • Karma: +0/-0
  • Future Ph.D.
    • View Profile
    • IsharaComix Grad Blog
Re: RogueGene
« Reply #2 on: January 07, 2010, 03:09:50 PM »
Sounds like a colossal project!

I definitely like the city-based map style as opposed to the traditional dungeon style (something I've wanted to play around with in the past). Maybe there could also be some sort of winding subway network under the city too. Automated trains would be a pretty nifty way of getting from place to place, and there could be random encounters while you ride.

It would be cool if, since the world is alive anyway, to be able to install security cameras or trap monsters in rooms and watch them on monitors to observe their behavior and such things.

Another nifty thing would be 'day-night' cycles. Aliens and scientists both need to sleep. If you can figure out what monsters generally feed at what times, you can avoid them and catch up on your beauty rest a the same time. Inline with the security camera idea, it would be neat to watch a security recording showing how dangerous that night was for you. Furthermore, collecting the DNA of monsters with different sleep cycles may affect the way your character gets tired in the game.

It looks like there're basically two ways to win. Either scavenge the city and obtain enough material to get back home (spaceship or some such thing), or conquer the world for yourself. I already want to play it. Looks like a deep and complex game. Not to mention, a 'bones file' for a game with this much simulated growth and evolution would increase the depth of the game in unbelievable ways.

george

  • Rogueliker
  • ***
  • Posts: 201
  • Karma: +1/-1
    • View Profile
    • Email
Re: RogueGene
« Reply #3 on: January 08, 2010, 03:26:19 AM »
Yes, this sounds like a huge project...of course, that makes it perfect for the typical 10+ year roguelike development cycle  ;)...

I really like the idea of a character's abilities determined by things they only can make by using the apparatus found around the city.

pat

  • Rogueliker
  • ***
  • Posts: 193
  • Karma: +0/-0
    • View Profile
Re: RogueGene
« Reply #4 on: January 08, 2010, 06:04:28 AM »
I'm really interested in city generation algorithm's at the moment and attempting to layout streets in a random yet structured manner and then somehow trying to procedurally generate buildings along the streets to use the space as efficiently as a real city would.

Most of my thinking and experiments are more along the line of a smallish village/town rather than the metropolis you're talking about, but I would think a variant of cellular automata would give you a map-filled with random streets to work with - the challenge then is how to populate the spaces with realistic buildings:



Check out the mazectric version as well which gives longer streets to play around with. The trick really is how to harness that kind of structure and make it useable in your particular gameworld.

I'd be interested in hearing how you go with a sophisticated city generator and what route you go down in terms of putting it all together.


BinaryMan

  • Newcomer
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Re: RogueGene
« Reply #5 on: January 09, 2010, 08:49:12 PM »
Having sensors/cameras is something I would like to do because from a control center you may discover parts of the map or detect things that are out there; that's a benefit of having the skills to use the system. It's sort of like being able to read Ancient in Stargate: Atlantis vs. by trial and error you can open doors because you memorized what worked.

I wanted to make it so that while items are useful to a play style that uses them, it's the player's self-modification that determines how they handle creatures. For instance, you're not going to find guns laying around. You need DNA or implants to give you abilities for ranged combat; however, you can also use the city to do some things for you. The idea is that strategy is more important than what you randomly find; heavy equipment dependence is something I would like to avoid. Trapping creatures is also a valid tactic since unless you want their DNA you don't need to clear out the level of creatures. Of course, you may want to explore all the rooms too.

The city generation I'm thinking of is more like: http://jice.nospam.googlepages.com/dungeon_bsp3.png/dungeon_bsp3-medium.jpg by splitting large rooms into smaller rooms until a certain ratio and maxsize occur. Room size may have some effect on room type. I am considering having the outer edge always be a corridor; some areas require a teleport from another floor so you can't reach all areas directly on all floors. With a smart algorithm, whole room clusters can be seperated (BSP/quadtree by its nature ensures that adjacent room groups are accessible if one of them is) so you have to get there from somewhere else.

The example below splits at a random (x,y) location 100 times (it could also be set to generate N rooms and stop). The first is just the corridors, while the second shows corridors, walls, and rooms. Verticle or horizontal split is based on the room dimensions; a room 2x as wide as tall is 2x as likely to be split on the x-axis. The minimum room size is 5x5, and the room must be 11 size in the correct axis to split, so with enough iterations all rooms will be between 5x5 to 10x10 (including walls); less iterations tends to preserve larger rooms. A larger room can have certain features like robotics bay which are large, while smaller rooms have less possibilities and perhaps a terminal or residential room. The elevator/stairs can be put in any room as long as the levels it goes to have a room in the same location. If multiple levels have a room, there can be multi-level stairs there. One method is to take a small room and turn one wall tile into stairs, and make the rest of the room into walls. This keeps the stairs tile out of the way of the corridors.
« Last Edit: January 10, 2010, 08:10:47 AM by BinaryMan »

BinaryMan

  • Newcomer
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Re: RogueGene
« Reply #6 on: January 10, 2010, 05:34:56 AM »
Here is the VB6 code for generating a level as seen above. 1 indicates corridor space, 0 non-corridor (room), I render spaces next to a corridor in red but their value is 0 actually. Edge squares are set to 1 and for each of 100 iterations of SplitGrid a random rx, ry is chosen from within the level. The average number of rooms created is 70 +/- 5 with grid size 100x100.

Code: [Select]
Public Function SplitGrid(rx, ry, Vert As Boolean) As Boolean
    If Grid(rx, ry) = 0 Then ' empty space
        For dx = rx To 0 Step -1
            If Grid(dx, ry) = 1 Then
                startx = dx + 1
                Exit For
            End If
        Next
    
        For dx = rx To 100 Step 1
            If Grid(dx, ry) = 1 Then
                endx = dx - 1
                Exit For
            End If
        Next
    
        For dy = ry To 0 Step -1
            If Grid(rx, dy) = 1 Then
                starty = dy + 1
                Exit For
            End If
        Next
    
        For dy = ry To 100 Step 1
            If Grid(rx, dy) = 1 Then
                endy = dy - 1
                Exit For
            End If
        Next
        
        sizex = Abs(endx - startx) + 1
        sizey = Abs(endy - starty) + 1
        
        ' 5x5 is smallest
        ' split room
        
        r = RandomNumber(1, sizex + sizey)
        If r > sizex Then
            Vert = False
        Else
            Vert = True
        End If
                
        If Vert = True Then
            ' splitx
            If (sizex >= 11) Then
                SplitX = RandomNumber(startx + 5, endx - 5)
                For dy = starty To endy
                    Grid(SplitX, dy) = 1
                Next
                SplitGrid = True
            Else
                SplitGrid = False
            End If
        Else
            ' splity
            If (sizey >= 11) Then
                SplitY = RandomNumber(starty + 5, endy - 5)
                For dx = startx To endx
                    Grid(dx, SplitY) = 1
                Next
                SplitGrid = True
            Else
                SplitGrid = False
            End If
        End If
    Else
        SplitGrid = False
    End If
End Function
« Last Edit: January 10, 2010, 05:44:45 AM by BinaryMan »

BinaryMan

  • Newcomer
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Re: RogueGene
« Reply #7 on: January 10, 2010, 07:47:20 AM »
The next step is to add doors to each room. A random non-corner wall segment is chosen in each room for this. A certain number of rooms can have no door but rather a teleport pad in them to be linked later with another one. I have a video with a level with a creature test: http://www.youtube.com/watch?v=7_HfawBoA4w
« Last Edit: January 10, 2010, 10:25:22 AM by BinaryMan »