Pages

Saturday, May 3, 2014

Just a random update

I decided to log in today and was poking around at my traffic statistics for this blog. In the past month, there have been 300 page views. It's not a lot, but it's also a non-zero value. It's interesting to see that I still get hits from my RogueBasin profile and random Google searches.

In case anyone was wondering, CyberpunkRL is no longer maintained. I'd release the source, but it's really not something I'm proud of. In the nearly 4 years since CPRL originally appeared here, a lot has happened. I finished my computer science degree in 2012 and I'm approaching 2 years of professional experience in software engineering. In career terms, that's nothing, but in just that short period of time, I have felt an immense improvement in my overall skill level.

Nearly everything I did on CPRL was self-taught. I would blow off homework assignments to stay up late reading articles on roguelike development and C# programming. Looking back, my work on CPRL was cute in its naivety. I would just open up my IDE and hack away until things worked while scratching off tasks on a very messy paper todo list. If I broke something, it meant a late night of debugging. I didn't design things. I didn't use version control. It was frustrating, but it was also very fun and rewarding

These days, I find it difficult to get back into hobby game development. I work on enterprise software all day and there's a lot of process involved in getting something into the code base. There are so many aspects to development I didn't even know existed when I worked on CPRL. I love what I do, but it's changed me. It almost hurts me to start writing code without a JIRA issue, a design, a class diagram, and unit tests. This adds a lot of overhead.

I haven't given up on game development as a hobby, but I have a lot less time, energy, and motivation. CPRL will forever be one of my dream projects, and it has been reincarnated in so many different forms, I have lost track of how many times I've restarted it with a fresh take on the concept.
One of the more recent, and more radical spiritual successors of CPRL
Nothing would make me happier than to eventually release a solid, fun cyberpunk themed roguelike game, but sometimes my perfectionism, work life, and personal life get in the way. Just know that at any give time, I probably am working on some re-imagining of it so maybe some day you will get to play CyberpunkRL. Who knows?

Thursday, June 28, 2012

SuperSerial

I apparently have some sort of obsession with writing parsers, as I've already written like 5 different variations for CPRL alone. After many iterations, I've designed a data file solution that will hopefully be good enough to use for the game as well as other projects. It is an open source serialization library called SuperSerial, that will hopefully make my life much easier when I finally get around to working on game stuff again. It's not quite finished yet, but I don't expect it to take much longer to get into a usable state.

My next order of business will probably be to work on the graphical engine some more in order to optimize it and add features. After that, I'll get back to game stuff.

I haven't been working on personal projects much lately because I have an internship this summer. After spending 8 hours looking at Java, I don't have much desire left to program at the end of the day. Fear not. I will never abandon CPRL. It may take a decade or two, but this damn game WILL get finished.

Monday, April 30, 2012

Character sprite

After putting it off for as long as possible, I finally decided to try my hand at a character sprite.

Here's a mockup of what it might look like in-game. Each piece of equipment is a separate sprite so it can be layered in-game based on what a character has equipped.
Roy Batty (right) faces off against a Tyrell Corporation executive and his two hired guns.

I'm not a great artist, but I think it will do for now. Some of the details are hard to make out, but as long as the sprites are varied enough, I don't think it should matter too much.

I've also been doing some work on a configuration file parser that will allow for pretty flexible data files and may be used for save files as well.

Edit:
I changed the floor tile to make it easier to see characters.
 

Sunday, April 22, 2012

Today I learned the garbage collector and OpenGL do not cooperate

So I thought I'd be clever and write a finalizer for my Texture class so that it would call GL.DeleteTexture when the object was collected. Apparently I can't do that. CyberpunkRL has been a good source for learning new things about using unmanaged libraries in C#... except for the fact that I waste hours of my time trying to figure out these things.

In other news, I switched over to the new renderer with little trouble. All traces of SDL have been eliminated. Here it is in action, looking pretty much exactly the same as before.
Doors!
I also got an infinite world implemented, but I'll eventually limit it to a finite sized city, like in the original releases. Unlike in the original version of the game, you move seamlessly between sub-maps, so no more running from cops by moving off the edge of a map.

I also made a few weapon icons.

Edit:
 

Thursday, April 19, 2012

Graphics engine

I started this iteration of CPRL using a .NET SDL wrapper for the graphics, which I quickly discovered to have one huge flaw that would make it very problematic to do what I want to do. It was pretty much impossible to render sprites with shading or tinting in real time, which would be necessary for the lighting engine I hope to do. Even if I had decided to drop lighting I would still need it for drawing explored terrain outside of the current field of view. Rather than limit my options, I decided to write up my own hardware accelerated 2D framework using OpenTK. Being not very experienced with OpenGL, I was intimidated by the thought, but it ended up only taking me a day to get the core functionality I wanted.
Don't worry. The final game shouldn't look like this.
As you can see, it supports rotation, scaling, and tinting and is also relatively fast. The screenshot is just a sample I did to test as I worked on it. It's not quite finished, so I haven't yet integrated it with the existing game engine. On that note, I did throw together a few new graphics.
Fans of the Sega Genesis Shadowrun game may appreciate this screenshot.
My art really isn't that great, but it's easy for users to swap out tiles with their own, so custom tilesets can easily be a thing if the game ends up being good enough to have a fan base.

2:30 AM Edit:
I wasn't quite ready to call it quits after this blog post, but I did change gears a bit and do something that I've been meaning to do for a very, very long time.
I finally put that level generator to use!

Tuesday, April 17, 2012

Hmm...

Maybe this time?
What is this? The 5th restart? I'm really trying to stick with it this time. There are going to be some big changes in terms of setting and overall style this time around. More details inbound if this project actually holds together for any length of time. In the meantime, is this too dark?

Tuesday, January 4, 2011

I've had no desire to work on anything for the past few weeks...

But I think it's coming back to me. Today I dusted off CPRL and started on the dialogue system.

It's not much, but I think you get the idea... I also did some more map stuff, like making entities work. I still need to save them to the map files when each map is unloaded. Otherwise, they'll basically become a memory leak. At the moment, a map is a single 40x40 chunk of tiles with a small square building in the center. I really need to finish up that building generator I was working on...

Monday, November 22, 2010

what i've been doing

I guess I'll go ahead and tell you what I was working on that was so important. Well, I had it in my head that I was going to get rich by making an Xbox Live Indie Game. I got quite a lot of work done, but ultimately I decided to scrap the project because the XBLIG service doesn't really look that profitable. There are too many junk games on it smothering the few decent ones and I don't think there's a very huge target audience anyway.
Here's a screenshot of what I had so far. As you can see, I drew my inspiration from many sources. It was a turn based strategy game somewhat influenced by XCOM with elements from games like FFT and Disgaea. The story was a ripoff of Aliens and the alien designs were inspired by Half-Life 2, Warhammer 40k, and Alien.

I made a lot of progress, but in the end I decided it wasn't worth it so I came by to my true love, roguelikes! At first I toyed around with a new game about surviving in a post-nuclear war wasteland. Before you go shouting "FALLOUTRL!?", no. I decided to explore the nuclear winter idea because I haven't seen that done often. As a result, I spent a bit of time implementing an interesting heat generation and propagation system, which you can see in this screenshot.
I also worked on a simple electricity system which turned out pretty interesting...
I learned a few things while working on this game and it gave me a few ideas. It's still something I'd like to go back and work on eventually, but in the end I can't stay away from CPRL!

The screenshot I posted yesterday was to show off my new scrolling, seamless map system. Now you'll be able to walk from one end of the world to the other with no notable map transitions!

i'm back :>

  
What's this!?

Tuesday, October 19, 2010

lack of updates

I guess I should tell you all that I'm taking a little break from CPRL. I didn't want to post anything for fear that everyone would give up on it and call it dead. I guess not posting anything isn't helping either... It's not a lack of motivation. I've just got another big non-roguelike project right now that I'm trying really hard to finish before the end of the year. As soon as that's done I'm getting back to CyberpunkRL. So once again, this game is not dead! I apologize for the further delays and hope to see you guys again once I resume work!

Friday, September 24, 2010

level generation progress, finally!

I've been putting off the level generator for a long time. Every now and then I'd pick it up, get discouraged and push it aside for awhile. But it's been constantly bothering me because if I never get it done, I'll never be able to release anything and I know that I'm a bit overdue for a release now. It's still quite a way off, but now it's one step closer as I think I've almost got something I might be satisfied with.

I started off generating a few intersecting rectangles and creating a grid based on that:


After some more splitting, I started to combine rooms. Hallways will always combine as long as they are connected on a short side. Larger rooms combine if they can form a room under a certain size. I came up with something like this:




Still not good enough, so I added some more random variation...
It was starting to look pretty good, so I added doors!

It's still not complete. I need to work on the door placement and then I need to integrate it with the actual game map, but I think I'm done with the hard part at least.


I know I haven't released anything in a very long time (that's what rewrites do, sorry), but don't give up hope. I am constantly working, and tons of other stuff has been worked on that I haven't posted about. I'm just trying to do things right this time around and school is also getting in the way.

Monday, September 13, 2010

vision modes

I just spent a little while implementing some visual effects for night vision and thermal vision. Right now they only affect coloring and sight radius, but obviously I'll need to give them some in-game advantages and disadvantages. I'm thinking the thermal will allow you to see any hidden enemies within LOS, but at a reduced distance. Conversely, nightvision will increase your sight range, while only giving a small bonus to spotting hidden enemies. Those are just my thoughts. If you have a better idea, let me hear it.

Monday, September 6, 2010

dual wielding, interface improvements

Today and yesterday I worked on adding dual weapon wielding. Now you can hold any weapon in either hand, but weapons in the left hand get penalties. Also, two-handed weapons that don't have another free hand get penalties. So you could dual wield heavy machine guns if you really wanted to, but without some crazy bionics and high skill levels, you won't really be hitting much.

In addition to that, I made some interface improvements. I gave it some color and made the message window smaller.

equipment

I told myself I'd work on map generation this weekend, but I'm still stuck on that so I decided to give it a break and work on other stuff. I started working on the equipment stuff and pretty much got it mostly done in an hour or two.
Don't worry. The item names are only temporary. If you've got any cool sounding item names, feel free to suggest them by the way. As you can see, each body part can have its own piece of equipment and an additional item, like a weapon. I will make the equipment screen ignore items that can't have actual equipment (like internal organs).

Progress in the level generation department isn't going so well. Coming up with a good, interesting building layout generator is very hard, so I may just resort to using pre-built templates. But I'll still give procedural generation a shot. It's not pretty, but here's what I've got so far.
It constructs the building from several random rectangles and then subdivides it into a number of smaller sectors. Each of those sectors will not be an individual room. Instead I'm hoping to come up with a way to combine them in an interesting manner. I'll also throw in some random divisions to break up large spaces. The final result may not be the best looking building in the world, but I think it will be better than what you've seen in previous releases.

As always, your comments and suggestions are welcome.

Tuesday, August 31, 2010

new health system details

Today, instead of doing homework/reading, I had a long talk with Whales at #rgrd who is working an awesome zombie roguelike, Cataclysm. That got me thinking about my own game, and we threw around ideas until I came up with one that I'm pretty satisfied with. I decided that not only am I sticking with the body part based system, but I am expanding it further. Previously, it consisted of a list of 6 body parts, and a lot of stuff was basically hardcoded in to work with those 6 parts. The new system instead uses a tree system. Each bodypart has the capacity to contain children bodyparts, and each bodypart has a weight for random selection. What this means is I can group together the bodyparts like this:
One of the awesome things about this system is it's a lot more flexible than the old one. I can easily add other parts, such as internal organs. It will also bring about some major gameplay changes. Armor and augmentations will now be assigned on an individual basis to each body part, meaning you can mix and match armor parts (shoulder pads, leg armor, boots, etc).  I'm also going to make left and right play a prominent role for arms. Your right arm will be your primary arm (right handedness is assumed for simplicity's sake). Your left arm will be your gear or blocking arm. This means you will be able to equip each hand separately (dual pistols, pistol/motion scanner, riot shield?). Two handed weapons will receive a big penalty if your left hand is not empty or if the weapon is held in the left hand because of a wounded right hand/arm. The left arm will also automatically attempt to block some melee attacks (either by a skill check or by an increased random weight; I haven't decided yet). This, combined with the customizable armor, should make for some interesting situations. I can see a heavily armored left arm and an unarmored right arm being a viable option for characters who plan on getting in close during combat.

Because of its tree structure, I can easily pick a random hit location given a part using recursion. Non-aimed attacks will simply go on the Body and it will choose one of its children, who will in turn choose from their children, and so on. I'll also be able to easily add targeted attacks which will give the option to aim for either the head, torso, or legs.

Each of the parts still has an individual health level and they'll still behave a lot like the parts in the old version. There are a couple key changes, however. There will now be an additional total health, which will reflect the sum of damage to all body parts. For instance, if your total health is 80 and your limbs are each 20, then having all 4 limbs severed would kill you. The trade-off, is that I'm ditching the bleeding out. It will be replaced with Pain, which will be increased when damage is taken and decrease over time or by using drugs. Pain will have a few negative effects, such as a negative modifier to speed.

Sorry for the long post!

Saturday, August 21, 2010

improved projectile system

Today I worked on rewriting targeting and shooting. It's not completely done, but I ended up with what I feel is a greatly improved system.
This is a picture of the new target selection. It looks the same as the old one, except with a line of asterisks. Why the asterisks? In the new system, bullets don't magically teleport exactly where you're aiming. The follow a trajectory. This trajectory isn't realistically modeled or anything, but it does mean that bullets have a path that they follow to a target and beyond if they miss. Anything along that path has a chance of being hit, although the targeted tile gets a bonus. This opens the door to new combat possibilities. You'll be able to take cover behind furniture or in a group of people. You'll also need to watch your shots more carefully and firing into a group of enemies will increase your chances of hitting one. The final addition is that I've added a primitive animation when you shoot that shows the bullet traveling and then its impact location.
As you can see the NPCs still stand there in the same exact place. I really need to start fleshing out my Actor classes, but I'm having a little trouble deciding what I want to do about certain gameplay elements. The most important one that I'm not sure about is the health system. I really liked the locational damage from the old version, but I feel like it had a tendency to be a little too random, resulting in too many random unlucky deaths. I'm stuck trying to figure out a good system to use that still allows me to have lots of gore and injuries requiring bionics to fix while not being frustrating. If you've got any ideas, please feel free to post them!

Monday, August 16, 2010

deja vu

It feels like I've done this all before...

Oh wait, I have! Work continues on reimplementing all the basic features. Today I added field of view, map items, music, lighting, and key configurations. The music is new; I'm using FMOD. There is a noticeable load time and the game for some reason uses 90mb more memory now, but I'll look into that at a later date.

NPCs still sit around doing nothing.
CyberpunkRL: Now with mohawks!

Sunday, August 15, 2010

productive day

Today I did a lot of work on the Map class. I also laid down the foundations for my Actor classes and map entities. In addition, I played around with some graphics, and I think I'm going to keep them. Most of the graphics can be remapped in the configuration files, so it will still be possible to play a text-only version of the game with a little work.

obviously a work in progress

gzip!

I spent a couple of hours today implementing the basics of map saving/loading. It was clear from the beginning that I would have to come up with a better system for saving map data. Even though each tile in the map array just needed a byte, in order to save them I needed to use 2-4 bytes. Simply saving each byte as the corresponding character in the text file was out of the question, because a lot of those characters were special ones that screwed up the file, so I had to save them as 1-3 digit numbers separated by semicolons. (e.g. 128:24:1:35) As you can see, that takes up a lot of extra space, and resulted in 63x38 maps taking up over 9 kb for their arrays alone.

After several frustrating hours today, I managed to implement a system that compresses the raw map arrays using gzip. Then it takes that data and applies 64 bit encoding so that it won't mess up the save file or require a lot of extra space. As a result, the compressed map data will still fit nicely in the text-based save files, but editing actual map layout data will be near impossible (not that it was very easy to do in the old version anyway).

Was this extra work worth it? Well, I'm able to store the arrays for a 120x80 sized map in around 2 kb now as opposed to the 9 kb it took before (for smaller maps too)! When you have thousands of potential map files, that really makes a difference.

Let me know if I'm posting too much boring stuff...