Archive

Archive for the ‘Games Programming’ Category

Genetic Algorithms Lab

27/09/2014 Leave a comment

Genetic Lab

 

So a few years ago I did a project for the Genetic Algorithms assignment at college. My idea was to have tiny multi-cell organisms that have a simple goal: travel as far as possible! maybe to find new resources or escape from predators, you pick one ๐Ÿ™‚
So the fitness of a creature is measured by how far it can go during its life span.

The creatures will start with random moving cells and evolve to more organized creatures with organized movements.

Please watch the video before reading. If the video failed to make you interested then I doubt that the text would succeed. You can also download the executable and the source code available at the end of this post.

 

Read more…

OpenGL ES 2 for Android: A Quick-Start Guide

08/08/2013 Leave a comment

So you want to make your first Android game or want to make a live wallpaper or just a simple 3D scene?
On Android, games use OpenGL ES 2 for rendering, which means you’ll have to learn it, even if you want to use a game engine it’s always good to know how stuff works on a low level.

By learning OpenGL ES2, you’ll be also learning WebGL since they both use the same set of functions.

OpenGL ES2 is cross-platform which means once you learn the API on a specific platform you will only need to know some platform-specific details to get your game to the other platforms.

While learning OpenGL ES 2, you will face challenges even if you have a good background in computer graphics! This is where books like OpenGL ES 2 for Android: A Quick-Start Guide shine.

Book cover

Learning OpenGL ES2 starts with a mountain that you have to climb even if you just want to render a single dot in a 3D world, it gets easier after that ๐Ÿ™‚ .

The book has a unique approach which makes it easier to understand the process. Read more…

Simple Spring Physics

02/03/2013 8 comments

A few weeks ago (during exams period ๐Ÿ˜› ) I was playing with spring physics, it turned out to be easy to implement and the results were cool enough for me to write a demo in Android, Microsoft XNA, and Javascript :D.

SpringLab img

Before I talk too much, here see the results for yourself, this is the web version :ย  SpringLab Web Version.

Reminds you of World of Goo ๐Ÿ˜€ ?

I came across this tutorial, from which I learned this lovely vector equation:

 F = -k(|x|-d)(x/|x|) - bv

I applied it to 2D springs and it gave amazing results especially when Read more…

Android Terrain Test 2 : Clouds

26/02/2013 11 comments

So I again went playing with OpenGL ES 2 on Android, this time I added clouds to the terrain:

Clouds_Screenshot

Not only that but I also learned new things about OpenGL ES 2 and fixed some deadly bugs in my previous code and reorganized the code in a better way.

Here are some screenshots showing the results of using different textures and different Read more…

Android terrain test

19/10/2012 18 comments

Hello :), a while ago I decided to learn OpenGL ES 2.0 in Android, so I decided to make a simple terrain, and now I want to share my thoughts about this experience :D.

Edit: after reading this post please take a look at Android Terrain Test 2 : Clouds where the code is better and bugs are fixed (clouds were added too ๐Ÿ˜› ).

Terrain in landscape mode


  1. Difficulties
  2. Video
  3. Download apk and source
  4. WebGL Version!
  5. Helpful tutorials
  6. notes



Read more…

Hex Screen

18/11/2011 5 comments


Intro:

Hello, it’s been more than three months since my last post, it’s also been more than three months since I last opened Visual Studio :(. A few days ago I decided that I should write something with XNA, that’s when I decided to write Hex Screen :D.

Hex Screen?

Hex screen is a 3D screen made up from hexagons, the cool thing about this screen is that hexagons can be animated to give nice effects, hexagons can be rotated, moved and scaled.

Hex Screen

A screen made up of 42*20 Hexagons

Another screenshot ๐Ÿ˜€ :

Read more…

FuchsGUI Update

09/08/2011 Leave a comment

Hello there, sorry for being inactive lately but I don’t feel like programming or learning something new :(.

Anyway, I fixed the issue in FuchsGUI where some text was blurry, the reason was that the text was being rendered with floating point values for position, something like (20.3f,29.4), this meant that spriteBatch should split physical pixels :(.

Anyway, thanks to a guy named Fab who told me how to fix this, the solution was something like this:

position.X = (int)Position.X;
position.Y = (int)Position.Y;
// Render here

So, here’s the fixed version (XNA4 only):

ย ย  FuchsGUI v1.1 Source Bin XNA4 (Blurry Text Fixed)

I hope to see you later :)…

RobotWarz Alpha Release

23/07/2011 9 comments

RobotWarz

Introduction (a boring one maybe ๐Ÿ˜‰ ?)

Good morning\evening or whatever suites your timezone :).
I’ve been waiting for this :D!, I’ve finished programming the alpha release of the game.
The reason I’m publishing it right now is because It might take me some time to have a full game, so by publishing an alpha release I can get opinions & suggestions from people which will encourage me to complete the game.

This release isn’t meant for end-users but rather for fellow programmers.

Unfortunately my laptop doesn’t have a graphics card so Read more…

RobotWarz Demos

15/07/2011 4 comments

Hello there :D, Sorry for the delay but I’m having some really serious internet problems :(.

Here are three videos of my XNA game RobotWarz uploaded on YouTube.

1- RobotWarz Demo:

just me playing against AI robots, I destroy them, they destroy me, it’s full of action :D.


2-RobotWarz Features:

this video demonstrates most of the techniques I used in the game such as Read more…

Stay tuned :P

02/07/2011 Leave a comment

Three videos of my game RobotWarz are coming soon…
One week after that I will publish the game here on the blog ๐Ÿ˜›

Here are two screen shots ๐Ÿ˜‰

RobotWarz, AI Attack

AI opponent attacking the player

 

RobotWarz_AI War

AI robots are fighting each other, player is in Spectator Mode.