This page is best viewed with Mozilla Firefox

2009 updates
2008 updates




5 December 2007
Sorry for not posting any updates in a while. The project is NOT dead... It's just going through a short "non-productive" period which happens all the time. There's a new URL for the development Wiki too: http://www.terrorpunksyndicate.org/wiki/index.php5?title=Cyberpunk_ORPG



12 November 2007
Hmm... let's see what's new since last update! I think the most impressing feature is the implementation of a wonderful scripting language called LUA, which has opened up a whole new world of possibilities. Handling all those tiny, tiny details that goes into the content of a game, like, opening a door, talking to somebody, giving an item to somebody, etc etc, can quickly become a programmer's worst nightmare, because the last thing you wanna do is hardcode this stuff. But this is where LUA comes in and saves us! By assigning LUA-scripts to mobs and objects, we can easily customize the behaviour of a character or object. Right now when a player attacks a mob, it will respond by attacking back like a mindless zombie. And every other mob in the game does the exact same thing, because that's the way mobs are programmed. But what if we want a certain mob to run away in fear instead? What if we want him to start crying? Maybe throw fruit at us? As far as I'm concerned, LUA is the definitive solution to this.


Since I implemented scripting so late in the development process, I've decided to use it for custom behaviour of mobs and objects only, and not for EVERYTHING which is common practice today among game developers. I'm also using it for handling missions (quests), because each mission is unique and requires its own script. Oh yeah, that reminds me... I've rewritten the mission system from scratch! It's much more flexible now and open to more interesting objectives rather than just "find X and kill him" which was all that existed first. Now a mission's objective may be to talk to somebody, deliver something, kill somebody, talk to another person, etc etc. This makes it much more interesting, and I can even throw in some story here and there.

Some other new features since last update:

  • Random name generation for mobs. This was suggested by Jayecifer who also wrote a big list of male/female firstnames and lastnames. Everytime a mob spawns or respawns, he/she is given a randomly generated name from the list. This is fun, because you will almost never see the "same" mob twice! When you kill Emily Connor, she may come back as Chloe Thorne instead.
  • /tell and /msg commands (they are the same) for sending private messages to other players on the server.
  • Tiles on the map can be set to RADIOACTIVE which means that they are... well, radioactive! When a character stands on the tile, he will slowly lose health every tick (second) until he's dead. Radiation is shown by small green particles which sort of flicker in the air around the radioactive area. A radiation suit can be worn to protect a character against radiation, but it loses durability much faster instead.
  • ..... + the usual tweaking, bug fixing, testing, etc etc...


  • (radiation)



    26 October 2007
    Long time no update, sorry! Don't let this lead you to believe I haven't worked on the game though. Oh no! I'm working on it every single day for several hours, and now I finally got some additional help to, which is GREAT! Jayecifer who I mentioned in my previous post has been helping out with both graphics and ideas, and I'm very grateful for that. I also got a small team of testers who has given me lots of suggestions for improving the game, so it's great. Jayecifer has drawn what I've missed for a long time now: female character sprites! They look pretty sexy too, hehehehe. He's also given me graphics for new items, clothes and hair styles. And for cute sewer rats which are now running loose on the streets in the game world. On the list of other new improvements are:
  • International keyboard support -- the keyboard is no longer hard-coded for Swedish layout but will instead automatically adjust to local settings which includes ÅÄÖ for Swedes, Ü for Germans, etc etc.
  • The client interface is a bit nicer plus it's easier to control the player character. Instead of moving one tile at a time, both the server and client now use pathfinding for moving characters. It works like this: the client sends a packet with the data "I want to go destination X,Y". The server checks if the destination is okay (by pathfnding), and then responds "yes, you go to X,Y". This is also sent to the other clients. The client now uses pathfinding to move the character to X,Y, while the server does the same. The thing that's so great about this method is that only ONE request packet, and ONE confirmation packet is needed to move from, say, the bottom of the map to the top. Previously the server would send one packet per tile, move one tile, send a new packet, move one tile, send a new packet, etc... Plus it was possible for the client to speedhack, which is now impossible. So, although there's a short lag between clicking on a destination and the character starting to move, this is the best and most secure method I can come up with for now.
  • Items that lose durability completely by getting damaged in combat are now sent to the inventory and can't be equipped until repaired.
  • It's now possible to buy more than one item at once from shops. Previously, when you wanted to buy 100 bullets, you had to click "buy" 100 times (urghh....). This has now been fixed, finally. You select the quantity you want, for example 10. Then you only have to click 10 times to buy 100 bullets. It sure saves a lot of clicking.
  • I've begun reworking the system for skills and psionics (spells), which I discovered wasn't so flexible as I thought it was. You can now also score a CRITICAL HIT when you attack somebody, which deals double the damage.
  • Some new tile graphics, like these amazing neon signs below here... :-))




  • 19 October 2007
    Jayecifer who is one of the volunteering testers of the game has set up a discussion page for the game at his Wiki, available here: http://www.gamersarcade.net/wiki/index.php?title=Cyberpunk_ORPG. I haven't had the time or energy to fix any real discussion forum yet, so for those who are interested in talking about the game, feel free to add your comment(s) on the Wiki page! All suggestions, questions, complaints, etc etc are welcome!



    10 October 2007
    Update time again! Everything is going really smooth right now. It feels great because about a month ago I felt nothing but stuck. So I made a big list of features I wanted in the game, and now I've started implementing atleast one every day, sometimes even more. New features since last week are:

  • Ammo for ranged weapons. All kinds of guns, rifles, submachine guns, etc, now require you to have ammunition in your inventory. Handguns (pistols, revolvers) and submachine guns use bullet-type ammo, rifles and assault rifles use shell-type ammo and launchers (not yet implemented) use rockets. There will also be some kind of plasma weapons or electricity weapons with their own ammo types later on.
  • Alignment for characters. This can range from -1000 to 1000, where 0 is Neutral, 1000 is Supremely Good and -1000 is Supremely Evil. Alignment changes as you kill mobs in the game world. Some mobs are of good alignment, while some are of more evil. Killing good mobs will make your character slightly more evil, and vice versa. Alignment doesn't have any impact on the game yet, but this will definitely be added soon. I'm toying with the idea of maybe having police patrols attack players with negative alignment (evil/criminal), and have evil mobs attack only good players, and so on. Maybe alignment could have an impact on mission rewards too, like for example if the mission coordinator NPC is of good alignment, he won't pay evil players as much money as if they were good.
  • New object type OBJECT_TELEPORTER for objects (items). This can be set up to teleport characters around the game world. I haven't yet decided where to put this yet, but it could be a useful feature later on. Teleporters aren't very realistic, so I'm having some second thoughts about this.
  • Object type OBJECT_DRINK was added too (why didn't I add it earlier??). Drinks are basically the same as food, except they satisfy thirst instead of hunger. And just like foods, drinks can be set up to give players time-limited buffs too.
  • Groups! Now this is where the fun begins! By typing /group <name> it is now possible to form groups (parties) with up to 4 other players (so a total of 5 members). Experience is split equally among all group members when somebody in the group kills a mob. The group leader can invite more people to the group or /kick members from it. And a member may /leave the group if he/she feels like it. Grouping is an essential feature in every online RPG game and hopefully it should motivate players to be more social and help each other take on more difficult enemies.
  • A new psionic called "Paralyze" is now available but will require a rewrite soon. Paralyze can be used for, well, paralyzing enemies in combat. When cast, the opponent will be unable to move or attack for 5 seconds until the psionic wears off.
  • Fatigue now has a very important impact on combat. Fatigue slowly increases as you attack or get hit in combat. It can be restored again by resting (typing /rest). As fatigue rises, your performance in combat slowly decreases. At 100% fatigue, you only deal 25% of your maximum damage in combat. So the new formula I use for calculating damage looks something like this: damage = maximum_damage - (0.75 * (fatigue / 100)).

  • Yesterday I posted this thread on the Gamedev HELP WANTED forum to look for game testers and people with ideas for the game. Are you interested? What I'm looking for are some people who are into old-school computer RPGs and MUDs - hopefully cyberpunk and science fiction too - that would be interested in talking to me on MSN, playtesting the game every now and then, help me balance the items (weapons, armors), mobs, suggest changes, find bugs, etc etc. In other words, just play the game and have fun! It's very difficult for me as a developer to be "objective" about the game, so I would appreciate some input from others. But I don't want to make the game publically available just yet. That's why I'm announcing this. If you would like to help out, please contact me on david(at)terrorpunksyndicate(dot)org now!

    And last but not least... Here are three new screenshots of the game client:




    1 October 2007
    Even more features went into the game engine since last week:

    Food buffs! It's now possible to boost str/dex/int/vit by eating certain foods which will give you extra power for a limited ammount of time. To eat food, you must first be hungry though. This is to prevent players from eating unlimited food buffs and getting insane powers. And to increase realism too, ofcourse. For this to work, I had to write some code for handling item modifiers (a modifier is, say, +5 strength), but it was relatively painless. Modifiers can now also be applied to weapons and armor.

    A new TARGET window was added to the game interface. This comes in handy when targeting players/mobs/NPC's. The target window displays some useful information on the current target, and the options to examine or attack. Clicking "examine" is equal to typing "look at" in a standard MUD, and it displays a short description of the current target. This is something that's new as well! For example, examining Rickey who owns the motorcycle store displays:


    I love these kind of details in a game, and I think it's great for the purpose of exploration. My goal is to have every mob and object carry a short description or background about itself, so that the player can walk around and just explore things and learn more about the game world.

    Durability on items! This was added for the sole purpose of annoying people. Nah, just kidding... My opinion is that it adds more excitement to the game. The worst thing that could happen in a battle - except for dying - is when your equipment breaks down. Durability slowly decreases as you engage in combat, by taking damage or dealing damage. If durability reaches 0, the equipment basically becomes worthless. If it's armor, the defense rating is ignored, and if it has any modifiers (like +5 strength and +2 intelligence or something), they are ignored as well. It is currently not possible to repair any broken equipment, but this is ofcourse something I'm planning on adding very soon. Either by using some kind of repair kit, or by giving the item to a simple "repair" NPC.


    (...and what's this you ask? It's a pretty nice fan animation, don't you think? :-) I had to display it here, because I'm quite proud of it actually. The game is starting to look really nice, and I'm responsible for most of the graphics. Compare some of the later screenshots to the first ones from just a few months ago. It's amazing how much I've learned in the process of programming this game.)



    23 September 2007
    Ok, for this update I prepared myself by writing down all the stuff I added to the game since last time I wrote here. In no particular order, some of the new stuff are:

  • Damage Over Time spells, also called DOT spells. The first spell (and only one so far) that went into the game is a psionic called Poison Burn. Oh yeah, spells are called psionics in my game, by the way. We're in the future, remember! When casting Poison Burn on an enemy, it will deal damage to the target OVER TIME, hence the name Damage Over Time. Poison Burn will deal a random ammount of damage once every second, for 7 seconds. This is fun, because the victim will feel stressed when he sees his Health meter go down slowly every second. At the same time, he will have the benefit of continously healing himself to keep the Health meter up, as opposed to dying on the first hit. Fun, yeah?
  • The motorcycle is now activated by using a Motorcycle Key, which is a special item. The key sits in the player's inventory, and when you click it the player will jump on his motorcycle. Click the key again to put the bike away. There are two different keys for differently coloured bikes - red and blue (more will come).
  • A motorcycle key can now be bought at Rickey's Bike Heaven which is a new place I created. You get to select if you want a red key (red motorcycle) or blue key (blue motorcycle). There are no differences except for the colours.
  • MISSIONS! Yes! You can now talk to a Mission Coordinator who will hook you up with a mission to assassinate a randomly selected mob in your own level range. After accepting the mission, you have 5 minutes to locate the mob, kill him and return to the Mission Coordinator. When doing so, you receive some money and experience. You must then wait 2 minutes before you can accept a new mission. NOTE: These are very basic missions and I intend to make them more advanced later on.
  • Tiles (on the map) can now be 4 different heights - 32 pixels, 64 pixels, 96 pixels or 128 pixels. This is because 64 pixels (which was the standard before I added different heights) is supposed to represent one meter. But for a hospital bed, for example, one meter would be too high. So for the sake of realism, the height of a tile can now be set with the map editor.

  • And for this month's screenshot we have Rickey's Bike Heaven, with owner Rickey Mourke who sells motorcycles in red and blue colours:




    26 August 2007
    Ugh... long time no update, again!

    Well, I guess I can say I'm "done" working on the network code now. Apart from a potential security hole when players move, the client->server communication is pretty solid and bugfree and the game is now fully playable online. I have succeeded in converting the single player prototype into a multiplayer client and game server. Wohoo!

    I've been working on improving the graphics and the environment (the "cyberpunk" world environment, that is!) by adding content, drawing tiles, updating sprites, adding objects, etc etc. There are three different skin colours - white, black and a weird sort of death-like pale colour, and there are four different haircuts. I haven't managed to draw a satisfactory female character sprite yet, but that's on its way as well. It would feel a little weird to walk around in an all-male world, wouldn't it? :-)

    So what else is new? Damn, I'm really bad at updating this website. Although I did state that I would keep the updates down a little bit, I seem to forget to write down what I'm actually doing, so now that I'm supposed to report it, I have already forgotten it. Well, I've been fixing a lot of bugs, both in the client and the server. I have really focused on making everything as stable as possible, so that nothing will crash and nothing can be hacked. I've "designed" quite a few new areas to be explored, such as the HyperMall, a fancy nightclub, some blocks, a church, a park area, etc etc... Here are some screenshots:

    Here we are on the dance floor inside the nightclub. The disco lights are simple lightmaps moving around in circles. The effect is extremely simply programmed, but looks really good in motion (imho). The dance floor tiles are animated as well, and sort of lights up between frames. The place is grooooooovy!
    This is outside the nightclub. The bouncers look a bit weird, because they're both faced north. This is the initial position all mobs are loaded at. It's simple to solve, but I haven't bothered to do it yet. And, yeah, I'm riding a motorcycle with my test character! Cool, huh?
    Standing outside The Church of Jesus Christ (yes, I will have to come up with a better name for this). Outside the church is a huge cross with TV screens displaying the message "jesus is here". Those are simply animated tiles but look very cool.
    Here we are, spilling blood in the house of God! And cursing too, oh my... More TV-screens, crosses made of neon light (again, animated tiles), an altar which looks a bit weird... I might have to change that. The benches are not the best either. They look more like big wooden planks that have been laid across the floor. The 3D engine doesn't do interiors very good yet... I may have to redo the map format and the way things are rendered if things get worse than this. I'm not entirely satisfied.
    This is the park, which is named after a Skinny Puppy album - "Too Dark Park". This is supposed to be the newbie zone, where all new players can level up kill things like dogs and rats without worrying about the difficulty too much. I might make it really big, so that higher level players can have some fun in here as well.
    Here I'm on the motorcycle again on my way out of the park. The water under the bridge is animated by blending a "water" tile with the "ground" tile, and then constantly moving the water tile horizontally in a looping manor (hmm... didn't I mention this in an earlier post? :-)). The trees are flat tiles drawn a bit above the ground. It's probably not the most realistic trees ever seen, but that's the only way I can figure out how to do it with the 3D engine's limitations and all.

    Oh, and before I forget... I have implemented simple vehicles into the game engine as well. Right now there's only a motorcycle that can be driven. I haven't yet decided if I should add more vehicles. I have to remind everyone who reads this though, that this is NOT a GTA clone. The vehicles are only used for moving around quicker, because it can be tedious to walk by foot all the time, especially when carrying many items (the character walks even slower when he/she is overburden). When driving a vehicle, most basic functions like attack, take, drop, etc are disabled too.



    13 August 2007
    Just a random screenshot... This one is from inside the Hypermarket/Megamall (under construction). I just love the particle-based bloodstains. Nice little massacre, eh? :-)


    And oh! I almost forgot. I spent the entire last night implementing different looks for different clothes, so that characters will change appearance depending on what armor/clothes they're wearing. Displayed in this screenshot, the player is wearing a black leather jacket with yellow stripes. And YES... it IS possible to walk around naked too, but you will only see the torso of a character when doing so. :-)



    12 August 2007
    The skill & spells system has now been implemented on both the server and in the client, and it's now possible to train both skills and spells, and cast "psionics" (spells) on enemies, yourself or other players! The only psionics that exist at the moment are Fireball and Quick Heal which were used for testing, but adding new psionics are really, really simple. It's just a matter of adding it to a list, assigning it to a function and then writing that function (the behaviour of the spell). This is just a few lines of code.

    Added two new flags to characters, which are skin_colour and haircut. This should had been done a long time ago, but since graphics weren't my priority back then, I decided to wait for a while. But now it's possible to set the skin colour and haircut for a character, and this did a LOT to the style of the game! All the possible variations makes it much, much more interesting and it just looks so much better. "Well ofcourse", I hear your thinking, but I can't describe the feeling a programmer gets when he sees something like this "come alive" as much as this did. LOL!



    2 August 2007
    I'm getting a little worried concerning the speed of my game, and the time it takes for OpenGL to render all the stuff on the screen. It's not really a problem for me myself since I'm getting about 150 FPS in 1024x768, but two friends of mine both report they get about 30 FPS. That is not an acceptable framerate, and I'm trying to figure out what to do about it. And here comes another annoying issue... I wrote a function to call glBindTexture() less often, avoiding it when not needed. This brought down the ammount of calls from 2000+ to 21. But the increase in FPS was only 5 FPS here on my computer. I then tried using a display list to draw the 3D map. Instead of re-drawing the map every frame, I built a display list of the map ONCE, and called this list every frame instead. There was no (none, zero, zip...) difference in FPS.

    So now I'm getting a bit puzzled... I don't really know how to optimize this any further. I am ofcourse in the middle of researching about this at the time of writing this, but if you have any ideas, feel free to contact me! My e-mail is at the bottom of the blue table on the right.

    Here is by the way a YouTube-version of the video I mentioned in my previous post. I decided to put it online so people could access it quickly. However, the quality is way below "OK" and I really do recommend downloading the original video and watch it offline instead. Here's the link for that (again).


    And, oh yeah.... I'm still working on the network code... :-)



    27 July 2007
    Get your popcorn and drinks, because it's VIDEO TIME! I've been wanting to use the ever so popular Fraps video capturer to record my game for demonstration purposes, but unfortunately my computer doesn't seem to like Fraps very much. I thought that looking at a game that runs at 15 FPS isn't particularly fun, so instead I found this program called HyperCam which worked a lot better, except for the sound being out of sync and choppy. Soooo..... I had to cut out the sound, which is a damn shame... But you get to listen to some nice futuristic music by excellent band Bigod 20 instead. :-)

    Download the Demonstration Video (15 mb XviD) and watch it offline. If you need a codec, download this package.

    Please remember that this is far from any finished game and you will probably find that it's very rough... Also, some things doesn't look entirely right in this video, like the GUI for example, because I had to run it in 800x600 (for speed purposes), and I haven't gotten a chance to tune things to look OK in other resolutions than 1024x768 yet. But hopefully you should be able to get atleast some "feel" for the game and how it plays!



    22 July 2007
    I've been away from home and haven't been able to work on the game for a few days. I've implemented "socials" in the game now, though. Socials are a bunch of pre-defined commands which makes a character display a text and play a sound effect. This can be used for a lot of fun! Typing, for example, /fart will tell all players in the same room as you that you just farted, and will also play the sound of a nasty fart at the same time (yeah, yeah, childish I know...). I borrowed this idea and some code from CircleMUD, but also added the option to play a sound effect too.

    Socials are defined in a textfile which is loaded at server startup, and an entry in the file looks something like this:
    #slap
    You slap yourself in the face.
    $n slaps $mself in the face. Weird...
    You slap $N in the face. Biotch!
    $n slaps you in the face. Biotch!
    $n slaps $N in the face. Biotch!
    17
    ~
    This sets up the command "slap" which gives you as the player the option to "slap" somebody. The five different lines of text are used for the five different ways of seeing the slap (you see it, the victim sees it, everyone else sees it, etc...). 17 means that sound sample #17 should be played with the text, or 0 for no sound at all. Adding new social commands are as simple as just adding new entries to this textfile!



    18 July 2007
    Just adding this little screenshot here, for keepers... :-)

    The server is becoming quite robust. As you can see here in the screenshot, I'm trying to "hack" the server by sending illegal packet headers. This is ofcourse detected, and I get a warning. After three warnings the server disconnects me. The reason why I've choosed to give each client warnings before disconnecting them is because the client (or the server) may contain bugs which may be identified as hack attempts. Instead of rudely disconnecting a player and accusing him of hacking, he is given a warning that something wrong has happened. I am hoping this will make tracking bugs easier!

    The server is - unlike the client - written in pure C and doesn't use any external libraries. The reason for this is very simple: it will compile much easier on other systems. I'm using gcc under Cygwin (so, Windows) as my compiler, but I uploaded the server code to a friend's Linux box and attempted to compile it, and it worked like a charm. The target platform for the server will be Linux or any UNIX-environment, but hey... we all know Windows isn't very "nice" for running servers, right? :-)



    17 July 2007
    Still writing network code! The server now does pixel-perfect collision detection even though it handles all characters and objects as "tiles". This is done by calculating some seriously confusing numbers: take the player's current tile location, compare it to the previous tile (the one he/she came from), and multiply this with the time it takes for a character to move between two tiles, while looking up how much of THAT time that has passed (*phew*). Well, basically you get the current position in pixels by doing this, which makes collision detection more precise.

    Today I also wrote a very simple "3D"-sound effect system for the client! Well, it's not exactly 3D but it makes sound a bit more realistic. The client can now "place" sounds anywhere on the map, and while the sound is playing the volume and stereo panoration of the sound effect is adjusted according to the local player's position. If that sounded confusing, here's an example: Let's say you're standing somewhere on the map, and another player or mob is walking around on your right side a few meters away from you. The sound of his feet will be panned to the right in your speakers/headphones, and the further away he gets, the lower the sound volume will be. This did a LOT for the general "feeling" of the game world. I must admit that I probably underestimated the power of this little feature.

    ...and I finally, FINALLY managed to get everything looking okay in other screen resolutions than 1024x768. While this might seem like a trivial problem, it was giving me quite a headache actually. The thing is that I don't want the "3D" on the screen to scale to the new resolution (as is common with OpenGL games), but instead I wanted everything to be bigger, like when you change resolution in a 2D game. To accomplish this, I had to:
  • Calculate the size of a tile (on the map) in GLfloat unit(s). This is done with: 1.0f / (screen_width / TILE_SIZE). For a 1024x768 screen, this will mean: 1.0f / 16 which is 0.0625f. This is the size of a tile in 3D space.
  • Draw everything according to the size we got from the above calculation. This will make sure a sprite or 3D object will always be 64 pixels (TILE_SIZE), no matter what the screen resolution is.
  • glTranslatef() which is used for zooming out wants -14.5f for the Z-translation for things to look right in 1024x768. Forgive me, but I have no idea where -14.5f came from. I found this magic number through trial and error. Remember, I'm very, very, very bad with maths! But I found that this zoom, -14.5f, only looks allright for screen resolutions with an aspect ratio of 4:3, like 1024x768, 800x600, etc. 1280x1024 however, is 5:4. So, like all this stuff wasn't enough, I also had to:
  • Do (4.0f / 3.0f) - (screen_width / screen_height) (assuming the screen is 1280x1024) to get the difference between the two aspect ratios. Then I had to get how many percent of a 4:3 ratio this difference is. And then, FINALLY, I had to add this many percent of -14.5f to the zoom and VOILA - we can now use any screen resolution we'd like!

  • So while 640x480 is virtually unplayable due to the GUI taking up the entire screen, it looks really cute in low-res, don't you think? ;-))




    12 July 2007
    I've still been working on the network code for five days straight now... phew! So far players are able to login with a username and password, walk around, chat, take and drop objects, equip objects and logout again. Player accounts and their items are stored on the server, ready to be loaded when they come back. I use two files for this: a player file which uses a format of static-sized data for each player, and an inventory file which stores dynamic-sized data (because of how many items each player has). I don't know why it's been taking a whole five days just to convert these very basic actions into network events... I guess I've just been very careful about it, making sure I don't leave any security holes in my code which could be exploited by hackers.

    I forgot to mention that I implemented slopes into the map format about a week ago! What's a slope? Well, if you're a non-english speaking person like me, think of it as a "hill". In this case, it's a tile on the map which is sloping, like for example a staircase, roof tops, etc etc. I actually got my hands on a document describing the GTA map format, and the format I use for my game resembles the GTA format quite a lot. Here's a screenshot of a pretty nice fire-exit staircase on the side of a building, using slopes:





    10 July 2007
    Things are really starting to get exciting now! I am now on my third day of programming the network code, and I have started splitting the single-player game code into a server program and a client program. The server basically handles all the game logic (like moving characters around, updating fights, calculating things, etc etc), while the client is really just a "dumb" terminal displaying things.

    I am really, really, really happy that I started programming the game as a single-player game, BEFORE I started to convert it to multiplayer (which is the goal). It makes everything so much easier, because now I have most of the functions finished already, and I only need to make minor changes to them. Plus, I know what the game is supposed to look like, and that kind of visualization is really important. It would not have been the same thing if I had started writing both the server and the client at the same time.



    7 July 2007
    Yikes! Almost two weeks and no update here. I don't know if anybody is even reading this, but rest assured that development is constantly ongoing!

    Hmm... so what have I been up to lately?
  • Optimized the map format even more to save on diskspace. The smallest map/room is now 12 kb with a tile depth of 1, and 196 kb with a tile depth of 16 which is maximum and shouldn't be used. This means I can now specify how "deep" a map/room is going to be, and save on unused tile space.
  • Added lots of passive skills for weapons which are taken in consideration when fighting. Having a maximum of 75% skill in Submachine Guns means the character will hit 75% of the time when attacking with Submachine Guns. If the skill is 0% (unlearned) he will miss every time.
  • Improved combat A LOT. There are now two types of combat - melee and ranged. Melee fighters need to be really close to their opponent in order to hit. Both melee and ranged fighters cannot fight while moving. Different weapon types have different attack range. For example, an assault rifle can hit it's target from a much longer distance than a pistol or submachine gun.
  • Mobs can now be equipped with weapons and armour.
  • While engaged in combat with a mob, the mob will follow the player around to get within attack range! If the mob is using a melee weapon, he will try to walk up close to the player. If he's using a ranged weapon, he will walk and stop just close enough to get within range to use the weapon.
  • Took some time to improve walking between rooms. There's now a nice fade in/out effect between the rooms, and leaving a room will abort all combat.
  • Added hunger, thirst and fatigue values to characters. This has no impact on the gameplay yet, but a character will get hungry and thirsty and require food to stop the annoying "You are hungry"-message. :-))
  • Mobs can now be set to aggressive which means they will attack players when they are in range. The range can also be set.
  • Started experimenting with shadows using the OpenGL stencil buffer.
  • Improved the GUI even more. It's now possible to scroll windows using the mouse scroll-wheel which is REALLY nice.
  • ....lots and lots of other small changes and improvements which I can't remember right now.

  • And here are two nice screenshots from a desert/wasteland-kind of area outside the city:




    25 June 2007
    I added a pretty nice-looking fog effect (again by using particles) which simulates a fog slowly floating above the streets, adding a LOT of atmosphere to the game. Oh man! I can't stop programming special effects! Somebody stop me! :)




    23 June 2007
    I've been working on the skills/spells system and I'm to improve it to be as good as possible. It's a bit tricky to handle though, as every skill and spell is unique and requires to be hardcoded into the game. While all skills and spells behave in their own unique ways, it's still neccessary to have a few generic functions to handle training skills, using/casting them, accessing them from the GUI, etc etc. For the past few days I've been working on a skill trainer mob which the player can talk to and train his skills/spells:




    21 June 2007
    Wow! I'm almost forgetting to update this website now! The project is far, far, faaaaaaar from dead though. I'm so caught up in it that I simply forgot to update here. In the past 5 days I've programmed so much that I can't even remember what new features I've added. Hmm.... let me think......

  • Added weight values to items and removed the "max 64 inventory slots" system. A character can now carry an infinite ammount of items as long as they have the strength to do so! I wasn't very happy with the limited inventory system I had before, so I went for a much more dynamic and realistic one instead.
  • Added an OBJECT_SIGN type to objects, which means that it's now possible to place signs in the game. What's a sign then? Well, basically it's an item which you right-click to bring up the text it displays. It's as simple as that, hehehe. Signs can be used for welcoming players here and there, and to display helpful information, warnings, etc.
  • When a character is talking I previously had the said text just printed above the character's head. It didn't look very nice... so I added chatbubbles! This made dialogues a lot easier to read (and see), and it gave the game a more comic book-like feeling:

  • Wrote an entirely new GUI from scratch! I quickly discovered that it was going to be a pain to handle all the windows and requesters that can pop up anytime the player interacts with something (opens inventory/equipment, reads a sign, talks to a shop NPC, talks to the trainer, etc etc). So I took some time to read this pretty good article and I also read up on C function pointers, which are EXTREMELY useful when programming a GUI (even a simple one). My GUI is very basic, but it does just the things I want it to: you can drag the windows around, minimize/close them, scroll their contents and click on buttons in them. I'm gonna add text input as well, but I haven't gotten to that yet.

  • It's also time for some new screenshots!
    Here we have the GUI in full effect! In the trainer window, for example, the "+" buttons can be pressed to call the function Train(), telling the game what we want to train. Functions are assigned to buttons by using function pointers, which are just awesome! To add a new button to a window, I just do something like this:
    GUIAddButtonWidget(WINDOW_ID, xpos, ypos, "Name", Train, parameter);
    That would call the function void Train(int parameter) automatically when the button is clicked. It's just amazing!
    On a killing spree in a dark alley somewhere. The mobs drop items randomly as they're killed. You can also see the nice gunfire effect made from particles. I'm very proud of it. :) The big white thing below the player is a mob respawning. I'd like to change it for some kind of lighting effect later, so that mobs will appear like in the arrival scenes from the Terminator movies. :)
    This is just a nice screenshot. My two test-spells are cooling down in the upper left corner of the screen, particle rain is coming down "from the sky" into the screen, and Really Tough Guy (a mob) is hit by a fireball explosion. The spotlights on the sidewalk are not coming from the boxes in the air above, but are instead lightmaps drawn below the boxes, making it look like they're coming from above. I like that effect very much! I think it gives the street a gloomy atmosphere.




    16 June 2007
    I'm beginning to wonder if it's such a good idea to update this website practically everyday and everytime I'm adding or changing something in the game. Perhaps it's better to just do a quick report every now and then instead, and make a major update when there's been a major improvement to the game. Hmmm.... yeah, I think that probably is a good idea. :-)

    So the report for today:
    * Replaced the inventory and equipment system with a much more better one
    * Also redid the format for objects so that it's now possible to add in new object types (like potions, scrolls, weapons, etc) without too much trouble. I'm using a format very similar to the one in CircleMUD
    * Added descriptions to objects. This is unique, I think! One of the absolute funniest moments when playing a MUD is when you find some really crazy item and examine it. This also gives a better "feel" of the game world. This is not common in modern MMORPGS, where everything are just icons in an inventory, so in my game there'll be unique descriptions of every item!
    * Improved the indoors "effect"
    * Changed the map format
    * Added a rain effect (particles)
    * Improved shops a little, especially mobs assigned to shops
    * Optimized graphics drawing by throwing in a BindTexture() function which checks if the previous bound texture is getting bound again (and prevents it, why bind the same texture again?)
    * Optimized drawing even more by using triangle strips for everything (3D objects were still drawn as quads until now)
    * Replaced the gunfire sprite with a particle gunfire (looks awesome)

    This is something I've been thinking about: I've always wanted to use a system where the server sends each map (room) to the client "on the fly" as he/she enter it, instead of having all the maps pre-stored on the client side. "Why?" you might think. The main reason is ofcourse so that I can change maps around anytime I feel like it, and the clients update them in real-time. The biggest problem is ofcourse bandwidth. Not that small 2D maps take up much diskspace/bandwidth, but since I also got 12 depth planes in my maps, the size for each room suddenly increases 12 times. One single room is now approx 288 kilobytes in size. That's pretty much, and for a player on a 56k modem connection each room will take (at fastest possible speed) around 5 seconds to download. So what to do? Do I write some kind of optimizing save function for my map editor, or do I use compression? The answer is..... *drumroll* compression! When compressing the 288 KB map file with WinRAR it ended up becoming an amazing 832 bytes!! And this was a fully detailed room and not just a "clean" one where every tile is set to -1. So, when the time comes to start writing the network code, I'll have the server prepare compressed versions of each room and store them in memory (or disk), so that maps/rooms can be distributed to clients in real-time faster than lightning. Hooray!

    Another idea I have for the game is vehicles. I don't want to put too much emphasy on it though, because the game is already looking like GTA a bit too much. Vehicles would serve as a tool to travel across maps quickly, and to serve as better protection for the player while doing so. I haven't figured out yet how vehicles would work, though. Do the player just right-click his car keys in his inventory to "summon" the car? That would be pretty lame I think. I'm thinking of maybe having the car parked outside in the street when the player isn't using it. The car remanis there while the player is online. When he leaves the server, the car disappears. Otherwise there'd be cars parked everywhere!



    11 June 2007
    I made it possible to walk inside buildings, although I'm gonna have to improve this a little later. It works like this: the map editor can now flag certain tiles as EFFECT_INDOORS, which means the game should handle that tile as being inside something (a building, for example). When the player steps onto a tile that has been flagged as indoors, only that tile and other indoors-flagged tiles are drawn, giving the impression of standing in a room inside somewhere. Did that make any sense? Basically, what happens is that when you walk inside a room, you only "see" that room and everything outdoors is black. Maybe the screenshot on the right explains it better!
    (click for bigger)
    And here's a screenshot displaying the fireball spell in action! Well, it's not exactly a fireball.... more like a fiery explosion. But it looks awesome! And it's made up of just 90 particles which shoot out in a 360 degrees radius forming a circle of fire.




    10 June 2007
    Made it possible to place mobs and objects at specified locations during startup, so that a vending machine is always located at the same place, and certain types of mobs are always walking around the same areas. When right-clicking an object that is assigned to a shop, the player "uses" the shop instead of trying to take the object. The same is supposed to be true for mobs as well, but the right mouse button is also used for starting an attack on a mob/player. So... should it be possible to attack "shop mobs" ?

    Also started working on a spell/skill system where I'm currently experimenting with the two skills "kick" and "cast fireball". These skills are used during combat for an extra attack on the opponent. The skill is used by clicking the icon that's assigned to the skill, and the player then has a max 75% chance of performing it. A cooldown timer activates which prevents the player from performing the skill again until it has "cooled down". I'm trying to set up a nice, dynamic spell/skill system which can add and remove new skills to the game without too much trouble. Learned skills should be saved (to disk) with the player when he/she exits the game world, and it would be nice if the player files didn't become corrupted everytime a new skill is added to the game.

    Since I just can't resist the great fun of experimenting with OpenGL blending and colouring, I did a little water effect by taking this texture and blending it with a ground tile while having it scroll slowly. The result was very nice and it looks like the water in old 2.5D-games like Shadow Warrior. I also redid the shadows for characters by stretching a black silhouette on the ground next to them. The result looks something like this:




    8 June 2007
    Today:
    I experimented further with particles and managed to make a really cool-looking fire effect. I'm having problems making it look good when it's burning upwards the Z-plane though ("towards" the screen), because of the blending acting strange... I think. But in 2D it looks awesome. It uses "only" 256 particles too, and looks good even with less. I also attempted to make a rain effect but it turned into a pretty nice snow effect instead, with snow flakes (particles) falling from the sky down into the screen. I don't really have any use for it though, because I didn't exactly plan to have snow in the game (snow?? in cyberpunk??).

    All this eyecandy is really fun to program and it looks really nice and adds a lot of atmosphere to the game, but I feel that I need to focus more on the game mechanics instead! I will leave the graphics part for now, and come back to that later.

    I also improved and made character animation much easier. Before today's change, I had to prepare the animation of a character walking on the screen like this:
    As you can see, the character's animation consisted of just 5 frames. There isn't really any big difference in the frames either, except that the shoulders are moving up and down (by rotating the shoulders in the first frame). Since it was just 5 frames, it also made the animation pretty jerky. I have no idea why I hadn't thought of it earlier, but today I suddenly realized that I could draw just one frame with shoulders, and have OpenGL rotate them instead of having to prepare them manually! So instead I prepare a character like this:

    As you can see, the head is separated from the body. I then draw the shoulders BEFORE I draw the head on top of the body. This is also a good thing, because now a character can have different bodies and different heads. This could be used for customization when creating a player's character, and for displaying different "clothes" when a character is changing armor, helmets, etc etc.

    So here we have our hawaii shirt-wearing test character, fully animated (by rotating the shoulders) using OpenGL!




    7 June 2007
    Today:
    I worked on the shops even more, adding values (in credits) to items and checking them against the player's money when attempting to buy an item from a shop. Also, when the player sells an item to a shop, the shop stores the item for 30 minutes before it decays. A shop also has two floats called profit_buy and profit_sell which is multiplied with an item's value when buying or selling at the shop. If profit_sell is 1.5 and the Newbie Pistol has a value of 200 credits, the shop will sell it for 200 * 1.5 = 300 credits. This could be used to create, for example, a really greedy pawn shop owner, or a generous nomad out in the wasteland who pays quite a big sum for items.
    Here's a screenshot of a shop in action. In this example I'm accessing the shop by right-clicking the floppy disk in my inventory, which I have assigned to the test shop. As I mentioned yesterday, anything can be a shop (both objects and mobs).

    I also started experimenting with a simple particle engine and a lightmap after reading about those techniques last night. This is really fun right now, because I'm learning something new everyday! I tried to create a smoke effect using a particle system, but it ended up looking like really intense fire instead. I'll put that on hold for now. But I added lightmaps to the game (which I by the way found here), and I made it possible to place "lights" with the map editor. Looks pretty cool, especially with a futuristic blue tone!




    6 June 2007
    Today:
    I wrote an OptimizeMap() function for the map editor which goes through the map and removes all "unnecessary" tiles/walls when pressing F9. While this doesn't save any diskspace yet, it does save a LOT of GPU usage, because less tiles means less quads to draw. Unnecessary tiles are two walls/sides facing each other, like for example inside buildings. A building is created by placing cubes on top of each other, but a cube has 6 sides. This means that for a pretty large building there are going to be a lot of cubes "inside" it, and that isn't really necessary as we only need to draw the outer walls of the building. After running the optimizer on my test map, the quads for a building dropped from 8745 to 729, and the FPS increased from 55 to 295. That's a pretty good optimization, no? :-)

    Also started working on shops using a file format similar to the shops in CircleMUD. I did however add one feature over CircleMUD in that shops can be assigned to objects too, and not just mobs. This means that anything in the game can be a shop/vendor! It can be a stationary mob, a mob walking around the map or an object, like a Coca Cola machine or whatever. Very nice!

    Yesterday:
    Added level requirements to items which can be specified in the object editor. I also changed DropRandomObject() to take this in consideration so that mobs only drop items that are in their own level range. For example, a level 15 mob should only drop items that are level 5 - 20.

    I also discovered that DrawMap() was drawing polygons for the ENTIRE map, even places that weren't even visible on the screen. I quickly fixed this to only draw what we can "see", and this made the FPS increase with over 100 frames per second. Yes, yes, that was a pretty stupid miss, but hey.... I never claimed I was John Carmack either. :-)

    And as promised yesterday, here are some more screenshots of the game:
    This is the earliest screenshot I could find, and it's from when I had worked on the game for just a few days. The graphics were still entirely 2D and I felt the map looked really "flat" since the view is top-down. The reason why I choosed to go top-down was simply because I can't draw graphics. It's easier to draw everything from the top. For characters, I just have to draw the head and the shoulders. For animation, I just rotate the shoulders a little bit to make it look like they're moving.
    This is the same version as in the previous screenshot, only with somewhat improved graphics and a dialogue function added. The mobs didn't say much though, except for "bring it on bitch" and "aaaaaaargh!". I'm toying with idea of making mobs communicate with some kind of AI, to make the world come alive more.
    This is from when I added a 3D perspective to the game, and had to make the 2D maps tilemaps use a Z dimension too, and not just X and Y. I borrowed, or *AHERM* stole this idea from the first two GTA games. While this screenshot doesn't look like much, adding 3D to the game improved it a lot. But it also made map-creation a lot more difficult since the editor I've written is still 2D. There's a lot of guessing and trial and error involved in making maps at the moment.
    This is from when I added items (objects) to the game. You can also see that GL fog and lighting is available now too, although it doesn't look entirely right. The first item I added was a floppy disc that is flagged as "consumable". Yes, you can eat the floppy disks. Fun, right?? :-) In this screenshot there are 2083 active objects in the game world. I just wanted to test how many I could add before it crashed. As a matter of fact, it didn't crash at all. It can handle an infinite ammount of objects! The only limit is the computer's memory.
    This is from the map editor, here in "free float mode" which activates when pressing SPACE. This is just a preview mode though, but when in this mode I can zoom in, out, go up, down, left, right and rotate around all three axises to see what the map looks like from every angle. This helps a lot when I'm trying to make a map, as the editor is limited to just a top-down 2D view for the time being.
    And for the final screenshot for today is my attempt at making a small street with buildings using the map editor. Pretty amazing what can be done with just 8 tiles of graphics, no? The tiles are (1)grass, (2)concrete, (3)bricks, (4)window, and (5-8)street lines. The windows are placed and drawn as a second layer upon the "main" layer. I call the second layer the "decorative" layer. It can be used for placing flowers on the ground, hanging a sign on a wall, etc etc.




    5 June 2007
    Well, since I didn't create this website until today we're going to have to dive right into the development process! To avoid making things too complicated, I have decided to make the game fully functioning as a SINGLE player game, before I start working on the network code. By doing so, I can test that everything works and looks like it should without having to go through those frustrating hours of debugging which I always seem to stumble upon when I'm programming network applications. Right now, I'm doing a quick'n'dirty (but not too dirty) singleplayer prototype of the game which I will then take and either rewrite entirely (copy & paste OK code), or just insert network code into it.

    At the moment, the following functions of the game are completed:

    * Load maps (created with my map editor) from disk
    * Load mobs (created with my character editor) from disk, place them in the game world
    * Load items (created with my object editor) from disk, -""-
    * Draw the map, player, mobs, items and interface
    * Frame rate independent movement
    * Some basic lighting and fog (looks like crap though, will have to use shaders instead)
    * Pathfinding for the player which will go anywhere we click on the screen
    * Basic stats for the player and mobs (str, dex, int, vit)
    * The player can attack mobs which are walking around (very, very primitive AI... like zombies)
    * Mobs drop items randomly when they are killed
    * Inventory screen
    * The player can take, drop and equip items which affects damage and defense
    * The player gains experience and levels when killing mobs
    * The player can train his stats when he levels (by typing "/train <str|dex|int|vit>" in the console)

    And ofcourse, here's a recent screenshot of the game. The game uses a GTA-style 2D map which renders into a 3D map using only quads (cubes), and all characters and items are 2D flat quads. I will add more screenshots in the next days that will show this better. A map is 32 tiles high and wide, and 12 tiles deep. Tiles are 64 x 64 pixels or one GL unit (1.0f) when in perspective mode. The style of the sprites are 2D topdown like in Alien Breed, Gauntlet, Gauntlet II, etc etc.


    (click for bigger)

    Today I added a % chance to drop variable to items (objects) which is used by DropRandomObject() when a mob is killed, to make it drop a random item on the ground so the player can loot it! I made a thread about this on Gamedev yesterday. While I'm not entirely satisfied, I have a somewhat allright random drop system up and running now. It works like this:

    1) When a mob is killed, I use rand() to get a value between 1 - 100. I call this the "drop chance roll".
    2) I go through the list of all available items in the game to see what their drop chances are. If an item has 50% chance to drop, rand() must have returned 50 or less. If an item has 75% chance to drop, rand() must have returned 75 or less. Basically, the % chance to drop variable on an item is the chance the item will be included in step (3).
    3) All items that correspond to the drop chance roll are added to a separate list.
    4) I randomly pick one item on this list that will drop on the ground in the game.

    As I mentioned, I'm not entirely satisfied with this system. I realize that there is no such thing as "100% drop chance", because what happens if there are TWO items that both have 100% chance to drop? Which one do we select? For the time being, this is the best solution I can come up with. Thank you to the guys who responded in my thread on Gamedev. I am looking at your alternative methods and might very well go for those instead.

    That's it for today!

    (C)+(P) Studio Stök 2007-2009