Explaining Hexadecimal numbering system

Disclaimer:
This post is actually from quite a long time ago but I never got around to update it and I don’t remember what I wanted to convey with this blog post.

 

In the past I had quite some difficulty with the different number systems. You will definitely get in touch with Binary and Hexadecimal systems if you continue along the road of programming therefore I really wanted to make a simple blog post about how exactly the Hexadecimal number numer system works.

First up let’s look at the meaning of the name: Decimal is the word we use for our regular number system which goes up to 10. Hex might sound familair from Hexagon which is a shape with 6 equal sides. So if you put these parts together you have a number system that goes up to 16.

The first 10 numbers are the same as our regular number system e.g. (0-9) and after it reaches 10 it continues with letters e.g. (a – 10, b – 11, c – 12, d – 13, e – 14, f – 15).

A common usage of hexadecimal numbers is in color codes because 16 times 16 = 256 and simple color systems use 3 sets of 256 shades(red, green & blue).

Therefore the Hexadecimal system might look confusing because it uses letters but in the end it is not that difficult!

Bitwise Tilemaps

Here is a technique that I have been wanting to use in my projects for a while: Bitwise Tile Generation. It’s usefull to add some flavor to your world/level.

Basically you use a full tileset for the grass or platformer tiles in your game and you calculate if there are similair tiles next to each other to change the sprites. If you don’t have to calculate corners you just have to check 4 tiles each time for 16 different combinations.

Bitwise 1

Bitwise Tile Generation

If  you only have a tile on top you will use sprite 1 in the middle. But it you have a tile to the right and on the bottom you would use sprite 6. There are 16 different combinations from no tiles (0) to all tiles(15).
The reason why this technique is called Bitwise is because you’re basically using bits to check if there is a tile or not. 0000 translates to 0 or no tiles. And 0001 would be a tile on the top and so on.

But what if you would like to check the corner tiles as well?

Bitwise 2

Bitwise Tiles with Corners

Wel you just need to use more bits to check every possible combination. With corners you will have a full byte with 256 possible combinations from 00000000 to 11111111.

It’s a very usefull technique to use and it saves you a lot of time compared to building the world manually!

Source/Extra links:
Saltgames blog: http://www.saltgames.com/2010/a-bitwise-method-for-applying-tilemaps/Flashpunk Forum post: http://developers.useflashpunk.net/t/flixel-compatible-tilemap-autoset/1736

Magic Counter App

Lately I have been looking at interesting apps in the Google Play store. Among the subjects I was looking at there were a few apps for the Trading Card Game: “Magic the Gathering”.  There were a few alternatives however I decided to focus on the app that had the highest rating since the app with the highest amount of downloads had a lot of negative reviews.

The most important feature people look for in a Magic the Gathering app is of course to keep track of their Life. However it can be annoying to keep increasing and decreasing health by 1. The reason why this is a problem is because of decks that focus on gaining life such as lifesteal. On the other hand there may also be turns in which a lot of damage needs to be subtracted at once. Therefore you need to include a way to change the health totals with bigger increments. I added this in the mockup with the possibility to add or remove 5 health with each tap.

Poison Counters:
Another important statistic people want to keep track of is the amount of poison counters on a player. Because a player with 10 poison counters will lose the game. I need to make another mockup with a better layout to add in poison counters.

Where is my save file?

Ever since software like Steam and Desura has been gaining users the PC-Gaming Market has been growing once again. Even though we have a lot of users and a growing variety of things available there are a few things we don’t have. And one of those is a standard for save files.

On my own PC there are a few examples of different locations:
– Its own folder in My Documents (Reus)
– Its own folder in My Documents inside a folder named after the developer (Dungeons of Dreadmor)
– The folder “Saved Games” in My Documents (JamesTown)
– The folder “SavedGames” in My Documents (Rogue Legacy, DLC Quest, DustAET)
– The folder “my games” in My Documents (Terraria, Gnomoria, Darksiders)

In my opinion one specific folder needs to be used and it might even be useful to create a new Documents location within Windows 7/8 for this so the My Documents folder won’t be cluttered. The SavedGames folder seems like a good location to store all your save files because its name clearly communicates the location.

Another good option is “my games”, its name isn’t as clear but it has been used as a save file location for games since at least the early 00’s. Age of Mythology was released in 2002 and it uses the “my games” folder as a save file location.

On the other hand Age of Empires II HD edition has its save files in its installation location so it is safe to say that the same save file location will be used for the upcoming Age of Mythology extended edition will store its save files in the same manner.

Mining and Crafting

Realism vs. Logical progression

A staple of games with crafting as a major focus these days is mining. Mining is often done by finding a location with specific metal ores and gathering them. After that you smelt them into bars and you can further refine those bars into a variety of equipment, weapons or accessories.

Stone as a material

Stone tools are older than the human race as we know it. But using stone as a material in tools like they’re presented in games is still a bit unrealistic. Because of the small contact area on a pickaxe you will apply a lot of force on stone which causes it to break. But stone is not a material which can easily be shaped in such a way and it’s very likely to break if used as a material for a modern tool.
For a more realistic experience in games it might be interesting to present stone tools as their logical counterpart the prehistoric tools.

From copper to iron to silver

A logical progression for metal materials is needed because the materials will have the same progression as the equipment made from the materials. But this isn’t always realistic since some metals like silver and gold are a lot softer which makes it easier for them to be processed into detailed accessories.
Instead of a progression system going from iron to silver it would be better to add a way to make alloys early one so bronze could be introduced. Bronze is an Alloy from copper and iron which would add extra uses to those basic materials. Copper and Iron are normally easy to find as well because they are low tier materials so adding extra uses should make it more interesting to find a metal vein.

Came back from Xiamen

An amazing half year passed by in the blink of an eye, but alas I am back in the Netherlands once again.

This past half year I spent my days doing a project for Check-IT together with Chinese students from Xiamen University. My group worked on a game called Garden Escape. Garden Escape is a game developed for the Kinect, where players have to use their body to match certain poses.

It was amazing to see Xiamen University her campus and to spend my days with Dutch and Chinese students.

My certificate:

Check out the project

Going to China

On the 21th of February I will throw myself in the deep, and take the plane to Xiamen! Xiamen is a small place near the sea in China’s Fujian province. From then on I will spend a whole semester doing a project with students from Xiamen University.

At the information days we got a few examples of projects that we could be working on. Currently I still have no idea what kind of project I will work on. As a Game Development student I would of course love to work on a game! However the most important thing is learning to work together with Chinese students, and of course experiencing life in China.