Warrior and Wizard Game Test update4 – Scrolling, Switching

w00t! the W&W game has advanced a little since the last post. Good news for the Warrior, he will not be taken away from the game. Instead, I added a feature: switching between the Wizard and the Warrior. The advances that have been made are as follows:


  • Switch between the Warrior and the Wizard by pressing TAB
  • The Warrior moves with the arrow keys and hits with his sword by pressing ‘X’
  • The level is larger now, 2024 pixels wide
  • The screen has been cut to 416×660, the player can advance and scroll through the level.

Also, I made the Warrior faster than the Wizard. This makes sense since: 1) The Warrior is built on pure strenght and 2) He does close-combat damage, which means he needs to run faster to kill enemies. The Wizard doesn’t have this problem, since he fires from a distance.

(try watching in fullscreen)

Improvements to be made:

Vitality/Mana: Add HP to both and MP to the Wizard. The Warrior will not have MP, but I guess he could use other mechanics, such as switching between weapons. Balance: the Warrior is fast, but he does melee damage. Since he’s based on strenght, he should have more armor and more HP. The Wizard should deal more AoE damage, and more damage to enemies, but have less armor and HP than the Warrior. Makes sense. Experience: add XP to get more skills or strenght.

In the future, I would like to add a counter to the number of switches you have made through the level, or count the enemies you kill, or the time you spent with each character. This could count as masteries for any skill or attack. For instance: the Wizard’s 1st level fireball could go through the screen and not stop at hitting an enemy. The Warrior could also use a special skill every number of enemies he kills, etc.

Finally, I would like to recommend a nice website full of sprites: http://charas-project.net/ really cool if you are interested in game development but aren’t quite a great graphic designer.

See ya next time


Warrior and Wizard Networking Game Test v3

Some posts ago, I was working on a Wizard and Warrior game. In the last one, I showed a networking game featuring a warrior and the wizard. In this post, I will show some advances on the wizard’s side with the addition of spells.

Before I continue, you should check out the video:

(try watching in fullscreen)

Enemies are randomly generated skeletons that walk from right to left, moving slowly, so that they give the player some time to do something. The player moves the wizard with the commonly used AWSD key setup, and can select the spells that he/she wants to cast by pressing 1,2,3…,etc. In this case, the player can use the spell number “1”, which is the fireball spell. At level 1, it is a simple fireball that hits one enemy at the time, but it has a relatively slow casting time. At level 2, the wizard calls a rain of fireballs that hit around the spot where the player clicked. As spells level up, casting time increases but firepower does too. The player may always go back to previous spell levels if he/she hits the spell button several times (sequence goes 1,2,3,1,2,3 and so on).

I have been thinking about the next step. I am not sure whether I should keep the warrior or add another type of wizard. I was thinking about adding a summoner. That would be awesome. The warrior is great but looks like the wizard is stealing most of the action. I guess I should add some restrictions to the wizard, such as mana and mana costs. Still, I need to create the third fireball level and add other elements. I was hoping to create 3 different, maybe earth and electric or dark/light (but not water, water is for hipsters).

See ya next time.

Cross Traffic – Avoid crashing! game

I recently made a car game. The real deal is that I wanted to make a simpler and sightly different version of one game that I got on my iPod called Traffic Panic. Basically, you have to control the lights of a street so that cars that go from the bottom to the top have to wait before some of the others going from one side to another pass by. The challenge comes when the traffic increases as the time goes by.

Traffic Panic
Traffic Panic for iPod/iPad/iWhatever

So I programmed Cross Traffic, which works on the same concept, except for the fact that there are two lanes on cars going sideways and two different streets for the cars going straight up, with different lights, of course. The essence of the game remains intact: avoid crashing the cars.

The part that was the hardest was probably making cars stop before the lights, including the cars that came behind the car stopped at the lights. Even though, it took around 3 hours to complete it, including the most time-consuming task, which is setting up the sprites and the background.

Here’s a video of the gameplay. You control the right and left lights with the x and y buttons, respectively. If a car successfully reaches the top, you win 200 points if you didn’t have to make it stop at the lights, otherwise you win 10 points. I hope you like it.

(try watching in fullscreen)

Adding (some) Security to Network Games

Lately I have been busy and I haven’t had time to work on my last post’s game. I’ve also been reading and learning about security in WLANs and then I thought it would be fun to add some level of security to the game.

Imagine the worst case scenario (ever ever ever), where you’ve got two or more Computers inside a network, which could be a WLAN, LAN or WAN. The game could exchange important data such as character facing and coordinates. Then, someone injects packets spoofing any of the Players and sending incorrect data. Anyone (including the players) could even try to send scores on their own benefit. The (conspiracy) list is huge. I’d rather use it as a fun way to protect important data such as character’s coordinates for now.

So, how do you protect the data? If the game will be played within a VPN or a secured 802.11 network (WPA/WPA2 or even 802.1X+EAP, which I really doubt) you are fine, because data will be encrypted at lower layers. But if the game is going to be played in open networks, you may need to add: encryption. It is actually better to prepare the game for the worst-case scenario.

Next question would be: What type of encryption can you use? There are lots of methods you can use, I prefer AES and RC4.

Next: How to encrypt data with the encryption algorithm I want? That depends on the programming language you are using. There’s an implementation of each encryption method for each programming language, you just have to search carefully.

What do you need to do? Encrypt the data before sending it out. Here is a list of encryption algorithms’ source code on three+ basic languages (encryption and decryption included):

A really neat encryption algorithm. Used by TKIP and Microsoft’s PPTP Tunneling protocol.
In C
In x86 Assembly… Lol Just kidding, chances are that you won’t make games using this one 🙂

It’s one of the strongest. James Bond and Chuck Norris use this one. It’s also used by 802.11 RSNs (in conjunction with CCMP) and the US Government.
In C

If you think I may be missing your favorite or any important language for game programming, please comment and suggest. I have posted those languages that I have worked with and that I like.

Updated: Warrior and Wizard Networking Game Test v2

In the last post I showed a very basic one-way communication game between two different screens (that are supposed to run on two different PCs): one controlling a wizard (left) and the other controlling a warrior (right). If the warrior player moved his character around the screen, it would also move on other player’s screen.

I just updated the little game adding a two-way TCP stream communication so that both players can interact with each other. Now any movement made by the wizard player will also be reflected on the warrior’s screen. Watch the new video:

(try watching in fullscreen)

The next thing would be to add some spells and enemies. I was considering to use a skeleton as a possible enemy. I was also thinking about zombies and/or trolls (not the ones you find on the internet… well maybe)

mesa not scary?

Well, that would be the networking stuff. On the next game adv I will stop using net for a bit and focus more on gameplay.

Warrior and Wizard Networking Game Test

I have been working on this wizard game concept lately. Wizads have played an important role in videogames since, like… always, so I thought about using wizards to use spells and that. Then one of those “what if?” questions popped up: What if I try adding a little networking fun first?.

Since I’ve worked with both high and low level network injection and sniffing in my research projects, I thought it could be a nice idea to apply the concepts to gaming. Watch the video of the networking game test:

(try watching in fullscreen)

What’s this game about, then? It doesn’t really have a backstory right now, it will, I promise. But it basically consists of two screens (on two different PCs):

Left Screen: Player 1, controlling the wizard
Right Screen: Player 2, controlling the warrior

The main idea is that they must defend something like an artifact or a sacred toilet form skeletons. For now (and for this post), any movement that the warrior does on the right screen is reflected on the left screen. The wizard is not moving yet as I must apply the same mechanics to Player 1.

There is always room for debate on what type of transmission should be used in this type of games. In this case I used a TCP stream. I guess that the challenge of using an UDP stream would be dealing with the packet loss. I kinda prefer retransmissions in this case.

As I move into a more complicated concept, I know I should stop using the peer-to-peer concept and move on to a centralized server that would handle all the events. For now, I’ll just move the character until I get bored :).

dev-working-time: around 5 hours.

First Game! Mario Beat’em up Mayhem

So I just finished creating my very first (simplistic) game. I went through some game developing learning process on python. Here are some results:

It is basically a beat’em up game featuring Mario. You have to kill some shyguys with a hammer or shells. The reason why Mario is throwing shells is because I started with a koopa-shell-shooting concept, but then I wanted to use a sword-like weapon and I found some Mario Hammer sprites, so I used them instead.

It took me around 30 hours or a litle more. Since it was for learning purposes, I guess it’s ok.

I hope you like it, I’ll work on a new concept soon 🙂