Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Alien: The First of None [Devlog] [Video Game]  (Read 1601 times)

SaintofWar

  • Bay Watcher
    • View Profile
Alien: The First of None [Devlog] [Video Game]
« on: August 31, 2015, 06:20:11 pm »

Your Queen is dead. Your brood is no more. You are the first of the last ones. The Nones. Exterminate.

The intro blurb is purposefully short. The subtitle is temporary as I do not want this to be confused for the original movie, or a fanfic for the most recent game in the Alien franchise.

I am an avid fan of the Alien vs Predator universe, the comic books specifically. I am thoroughly disappointed by the recent movies in the franchise and will not follow one bit of the lore portrayed in there, other than the original movie. I am also thoroughly disappointed by Alien: Isolation. But this is not my 'This is how you do Alien' project, it is a testbed for a prototype I wrote a while ago, which was a zero player game. My intent for this game is to use the mechanics and design choices from that project, and make it a single player game.

But before you get your hopes up, I'll come forward and come clean. My track record has zero finished games, or games released in any form. Everything I wrote, I deleted or lost in hard drive crashes (After years of sitting on that drive). I will be happy if I can release a demo for this, and I hope that through coming forward to the community with this idea, that it will give me the extra motivation to go beyond the 'code the tough stuff first' stage of development.

I will begin by explaining the prototype for the earlier game I mentioned, conveniently placed in spoilers:

Spoiler (click to show/hide)

This brings us full circle to Alien. I want to use the design choices from the prototype: Real Time Information Sharing, by-bit stored variables, and sensor modes-- and a plethora of other stuff into a game that even I could enjoy. My idea for this game is to create the Alien on a ship that uses the damage model of my prototype. Which means you could basically intentionally attack the floor to sever electrical wiring, create floods, and similar, and have a world that reacts to this, based on their personality. The inevitable would lead to imperfect information sharing, and lots of things that are still too far off to even consider. I'd like to use this thread also as a help call for anyone interested in possibly drawing electrical systems or similar, for a large space ship or space station. Or at least suggest what kind of systems one could find on the game space, that can be attacked and destroyed. Air vents, for example, atmospherics pipes, water pipes, etc.

The Alien itself will be an intelligent exception of the species and possess the following vision modes: Echolocation and Electrovision. He will be capable of understanding human 'body language' through their electrical signals to 'figure out' what they are saying: "HELP" for example.

I am planning on also randomizing the gaming space. There may be a Predator on the ship. There may be a traitor who helps the alien. There may be many other possibilities.

I will be posting some code snippets in the near future I hope. But my style of coding is such that I rarely have stuff to show immediately, other than output from some of the functions, and I might share that if it seems interesting enough, or a lot of C++ programmers end up frequenting this thread.

I really hope this will be the project that I see through the door in one form or another.
Cheers.
Logged

HavingPhun

  • Bay Watcher
    • View Profile
Re: Alien: The First of None [Devlog] [Video Game]
« Reply #1 on: September 03, 2015, 09:58:30 pm »

Though I have only had limited exposure to the aliens series (First aliens movie, Colonial Marines SS13 server, etc), I greatly enjoyed it. Two questions so far. The player would be the surviving alien, right?

Though the reasoning might be a bit beyond my knowledge of C++. I noticed you were using char's for mech part values rather than integers or floats in the example. Why do that?
Logged

SaintofWar

  • Bay Watcher
    • View Profile
Re: Alien: The First of None [Devlog] [Video Game]
« Reply #2 on: September 04, 2015, 06:38:40 am »

Indeed. The player would play the surviving Alien. There will be random generated 'start scenarios' in which the player plays the 'smartest/best' Alien, and has the option of either meeting up with the other ones, and leading them. Or becoming a Queen. Though the becoming 'Queen' part is still way too far off. But other Aliens and leading them? Entirely doable. Gameplay will also depend on if you start as a Drone or a Praetorian (Or evolve into a Praetorian) since they have the ability to implant chestbursters. Drones do not.

As for your second question. I use two Arrays. One is an int array that stores the Armor locations, with the leftmost bits being reactive armor (You cannot penetrate all the way), and the other 16 bits containing armor. If armor is penetrated, the same location IE [2][3] is checked against the char array that holds the internals. I use chars because they are 1 byte long and have 8 bits. For this game I'll probably use integers, since there's a lot of possible stuff that can be in the tiles. I'll also use the same system for a damage model to simulate something akin to DF's damage system.

I haven't gotten this far yet, I am still learning a bit on procedural generation algorithms to get a nice 3D layout for my station/ship, but I am guessing I'll be using modulo operations and divide by 2 to get good results for damage.

For example, take the number 8 (1000). Divide by 2 and you get 0100. So in a sense, I could use it like this. If the bit in the 4th position is turned off, divide by 2 and check again. If it is on, turn it off. There are a lot of tricks I can do to simulate damage like this. Kind of like Aurora has different damage models for different weapons, I can divide by 4 if a modulo operation has a leftover 1, and then hit the left and right bits.

For example: 9 % 2 = 1, 9 / 4 = 2 (rounding it, since it's a int). Then check the following bits 2 * 1 (0010), 2 * 2 (0100) and 2 / 2 (0001); turn them off. (Note I am writing just the first 4 bits. There will be 32, 16 or 8, I have not decided yet.)

Why exactly am I using a system like this? Well, a lot of games today do not check for damage properly. The games that do have some sort of critical damage systems, choose from an array at random, based on the hit location. With this system, where you hit, is where you damage something.

So to recap, I am using chars for internals because they are 8 bits long instead of integers. I was originally using integers, but hitting empty locations in succession became somewhat bothersome, and was complicating the whole thing, because it was based on 'angle' of impact. You could hit something from a 45 degree angle, and hit empty slots until you hit something that was on the 5 degree angle. If you think about that, it doesn't make sense. It should just transfer to the next array at that point, but I never finished the code as I was still working on the squad communication system at that time. When I did get to it, I changed the array to char.
Logged

SaintofWar

  • Bay Watcher
    • View Profile
Re: Alien: The First of None [Devlog] [Video Game]
« Reply #3 on: January 25, 2016, 01:01:23 pm »

I am still working on this, albeit on and off. I ran into some trouble with the maps in general, the layouts have not been pleasing, and I mostly left the project to collect dust, waiting for some flash of insight on how I could procedurally generate the ship/station.

However, I have not been completely idle- I was looking at various mechanics in board games, and implementing any and all ideas I got into the game. I was really impressed with Phoenix Command and Renegade Legion: Centurion and Interceptor. The combat and damage mechanics gave me some good ideas.

Right now, the characters of the world, mechanically, are finished. I just had to complete an abomination of math that took me for quite a mental ride. For a while I had no idea what it was doing, except that it was giving me the numbers I wanted, until I decided to focus and try to follow the code and what it was doing. Who needs comments anyway, right?

Spoiler (click to show/hide)

It basically simulates a 30*200 table with only a few keys, by finding the index of the closest denominator with an actual value, returns it and then I can use it to find the value- reducing the table to an array of 20 or so elements.

Reminded me of that programmer joke where a son asks his programmer father why the sun rises in the east, and sets in the west. To which the father says, "Don't touch. It works."

I am looking into finishing the combat system in the meantime, but I don't have an ETA. The first prototype will most likely only feature colonial marines, as the hit locations are getting extremely complex, and I have not even started on the alien or predator ones. In the case of the alien, I still have to figure out where to put all the critical systems, and what the biology of an alien is actually like.

Stay tuned. Or... you know.. forget about it until a new post appears!
« Last Edit: January 25, 2016, 01:48:02 pm by SaintofWar »
Logged

cerapa

  • Bay Watcher
  • It wont bite....unless you are the sun.
    • View Profile
Re: Alien: The First of None [Devlog] [Video Game]
« Reply #4 on: January 25, 2016, 01:13:22 pm »

Why are you using naked arrays?

I do not particularly understand how the damage system works. Could you explain it again?
Logged

Tick, tick, tick the time goes by,
tick, tick, tick the clock blows up.

SaintofWar

  • Bay Watcher
    • View Profile
Re: Alien: The First of None [Devlog] [Video Game]
« Reply #5 on: January 25, 2016, 06:47:51 pm »

I don't need vectors for that part of the code, or any of the other std containers. C-Arrays do the job just fine. I have vectors in other places, but not that part of the code.

As for the damage system, perhaps it is easier to visualize. Imagine an array of 8 elements.

X X X X X X X X

That's basically armor/exoskeleton, or what have you. To make things simple, imagine next a single char, sitting 'behind' those arrays. A char is one byte, or 8 bits, so basically, you can represent them as 8 1s. Each of the 1s represents some critical system. Vision, speech, thought-- or less important systems, or systems necessary to for other systems to function, like major blood vessels.

The diagram becomes so:

1 1 1 1 1 1 1 1
X X X X X X X X

Now when a bullet penetrates through the armor, it can disable any of the systems behind that location; of course, I make it all work mathematically, as it's not really that simple, and I try to represent the body in a series of armor-like arrays, with critical systems all around it, from different angles and elevations.

I have not finished it yet, I did start work on it however, but that is currently the idea I am going for. The example before is just a huge simplification of the general mechanics, but in actuality it's a lot deeper. It's easier to imagine it as similar to how Aurora works.
Logged

SaintofWar

  • Bay Watcher
    • View Profile
Re: Alien: The First of None [Devlog] [Video Game]
« Reply #6 on: February 22, 2016, 10:58:55 am »

Progress continues at a sluggish but steady pace. I add about 200 to 500 lines of code every week. This may seem on the low side, but do note that I am not doing anything with the interface, or how the game is represented, neither am I counting the debugging strings. Which means it's pure 200 to 500 lines of algorithms, game logic, binary compressors/encryptors, etc.

I also have around 60 pages of diagrams, specification, flow charts, and other stuff. I think I do more work on paper than on the electronic medium. I resolved, mostly, the issue with station generation by using cellular automata. More specifically, L-Systems, as I found out later, cause it turns out I reinvented the wheel. I have no pictures to show, it is only in pure data format. I am not satisfied with the result, but I do acknowledge that the system is still very basic, and handles only the floor and the hull, with a major caveat: It actually lays them down like you'd imagine a station is laid out. There's a magical logic to it, and it is quite mesmerizing to see how a bunch of 0 and 1s with some simple rules can make something so organized.

The combat system is still a work in progress. I was using Phoenix Command and Renegade Legion mechanics to try and get a feel for what kind of combat I want. I went a bit overboard and I actually coded the entire Phoenix Command advanced rules into the game to play around with it. I gotta say, the huge tables have been a pain in the rear, but the result is quite overwhelming. I look forward to designing my own combat system mechanics, in the next month.

I've recently switched from Eclipse to Visual Studio, and honestly, I am not happy with msvc. I have had a lot of problems with forward<> and initializer_list. I am just thankful that I did enough work on paper to avoid major issues, and ended up simply overloading functions.

Stay tuned.

EDIT: A bit more detail on the binary writing method I use right now. Since my designated playtester is a hardcore cheater who can't finish or start a game without cheating the hell out of it, my only option is to encrypt the binaries I am writing. I had to write the binaries in the first place, because the combat mechanics I was testing had a lot of tables and quite frankly, I don't want to see another 3D container in my code again, or write it by hand, so I wrote a short program that works like a front-end interface for the heavy lifting and writes out binary files.

When writing the binary, I take the element I am about to write, and perform this operation in pseudo code:

Code: [Select]
byte Element;
Element = Element bitshift left by (8 - log2(Element)) / 2;
Element = complement of Element;

These are bitwise operations. In layman's terms, what it does is, it basically takes a byte, and bitshifts it to the left by half of the power of 2 needed to raise it to it's current value, then it flips all the bits. The log2 basically finds the most significant bit. Consider the following:

A byte is like this:
128 64 32 16 8 4 2 1
_____________________
 0    0   0  1  0 0 0 0

By using the log2 operation, we get the most significant bit, IE, it's position from the right. Log2(16) is 4. We divide this by 2, and bitshift the byte to the left by that amount. Our byte now becomes:

128  64  32  16  8  4  2  1
______________________
  0    1   0    0   0  0  0  0

Next we flip the bits:

128 64 32 16  8  4  2  1
______________________
 1    0   1  1   1  1  1  1

I commit it to a binary file, move on to the next byte and say 'Good luck hex-editing that'.

Don't get me wrong, it's a fairly simple encryption that I chose mostly because in unsigned ints, with 4 bytes, I can perform compression operations because most of the time, the other 3 bytes will all be set to the 1 position, and I can easily compress them. With the Compression and the Encryption, it becomes not worth the trouble to even try messing with it.

Finally, please note that I am self-taught, and follow the school of 'code to learn' not 'learn to code'. Which means most of the time I make this stuff up as I go along, and it applies to all the subjects my coding touches on, and reading technical manuals about it later. For this reason I never really learned anything about encryption or compression. Note my comment about reinventing the wheel when it comes to L-Systems. If you know cool, and simple, algorithms for encrypting binaries, please let me know, I have become very interested in the subject.

Cheers.
« Last Edit: February 22, 2016, 11:25:30 am by SaintofWar »
Logged

Arx

  • Bay Watcher
  • Iron within, iron without.
    • View Profile
    • Art!
Re: Alien: The First of None [Devlog] [Video Game]
« Reply #7 on: February 22, 2016, 11:13:51 am »

That's actually a pretty impressive rate, if you ask me. This sounds like you're loading a lot of depth into it, so I guess I'll be keeping an eye on it (even though I've never been an Alien fan).
Logged

I am on Discord as Arx#2415.
Hail to the mind of man! / Fire in the sky
I've been waiting for you / On this day we die.