Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - BinaryMan

Pages: [1]
1
Programming / Re: RogueGene
« 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

2
Programming / Re: RogueGene
« 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

3
Programming / Re: RogueGene
« 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.

4
Programming / 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.

Pages: [1]