Go here

The new place for the Indie Game Journal
Don't forget to update your bookmarks (if you had it)!

Job application break

I am currently busy in applying for my articleship.
So, pause again in game development.

Note for OpenGL

The easiest way to use OpenGL is through OpenGL Utility Toolkit (GLUT), which is "a window system independent toolkit for writing OpenGL programs."

Before using OpenGL on Windows, you will need to do what this page explains:
http://www.cs.csustan.edu/%7ersc/SDSU/GLUTinstall.html

Basically, it tells what files you need to put where to let Microsoft Visual C++ detect and use OpenGL libraries. For those who don't want to go there to read it, here is what it says:
With thanks to Kamil Saykali of the EdCenter:
This part will show how to install the glut libraries and dll's (to download it go to http://reality.sgi.com/opengl/glut3/glut3.html ) (Note: this link seemed to be broken at the time I checked. Get the files from here instead: http://www.opengl.org/resources/libraries/glut/glutdlls36.zip)

1. After you have downloaded the glut.zip file (you should get the latest ver 3.7) unzip it into a folder
2. Inside the folder you should have:
glut.dll
glut32.dll
glut.h
glut.lib
glut32.lib
3. Copy both glut.dll and glut32.dll into your windows directory (windows or winnt, depends on if you are using Windows95/98 or Windows NT)
4. Copy your glut.h to:
:\\include\GL\glut.h
*** put the drive where you installed VC++ instead of the ***
*** put the directory where you installed VC++ instead of the
5. Copy your glut.lib and glut32.lib to:
:\\lib\glut.lib
:\\lib\glut32.lib
*** put the drive where you installed VC++ instead of the ***
*** put the directory where you installed VC++ instead of the
6. That should be it for installed the glut libraries. The rest of this letter shows you how to setup VC++ so that you can use the glut libraries.
It also state some other steps but I found them unnecessary and work without performing them.
What you will get after all this are the pre-compiled libraries of OpenGL (GLUT v3.6).

For other operating systems, see the GLUT home page.

RGB gradient

Adding a for loop to the last piece of code, I made a series of gradients:

The code hasn't been edited much. Just added one for loop to draw scan lines of the same color (that gives another idea). However, the coordinates are set to 200 x 150 where as the window size is set to 400 x 300. This makes the code to draw like this:














This is not correct. If you click on the image, it will show it full size, where every other line is left totally blank. So, I edited the window size to be 200 x 150 too. Although, I could have changed the coordinates range too.
Another note, for this wrong example, I edited the background to white, like the previous code, instead of keeping it black in the correct versions.

Here's the code:
#include <GL/glut.h>

void init (void) {
    glClearColor (1.0, 1.0 ,1.0, 0.0);

    glMatrixMode (GL_PROJECTION);
    gluOrtho2D (0., 200.0, 0.0, 150.0);    // the coordinate range
}

void lineSegment (void) {

    int count;
    float col = 0.0;

    glClear (GL_COLOR_BUFFER_BIT);
    glBegin (GL_LINES);
        for (count = 0; count < 201; count += 1){
            glColor3f (col, 0.0, 0.0);
            glVertex2i (1, count);
            glVertex2i (200, count);
            col = col + 0.005;
        }
    glEnd();

    glFlush();
}

void main (int argc, char** argv) {
    glutInit(&argc, argv);
    glutInitDisplayMode (GLUT_SINGLE | GLUT_RGB);
    glutInitWindowPosition (50, 100);    // top-left window position
    glutInitWindowSize(200, 150);    // window size
    glutCreateWindow ("Red");

    init();
    glutDisplayFunc (lineSegment);
    glutMainLoop ();
}

First OpenGL program

Today I created my first ever OpenGL program. I had this book for ages but haven't been able to understand even the basics. But, today (night, actually), thanks to Allah, I have been able to make a program. And it does an amazing thing, which no other program has ever done before. Thats right. It prints my nick on the screen. :D

Screenshot:




Here is the source code:
#include <GL\glut.h>

void init (void) {
    glClearColor (1.0, 1.0 ,1.0, 0.0);  // set display window color to white

    glMatrixMode (GL_PROJECTION);       // set projection parameters
    gluOrtho2D (0., 200.0, 0.0, 150.0);
}

void draw1Line (int x1, int y1, int x2, int y2) {
    glBegin (GL_LINES);
        glVertex2i (x1, y1);
        glVertex2i (x2, y2);
    glEnd();
}

void lineSegment (void) {
    glClear (GL_COLOR_BUFFER_BIT);      // clear display window

    glColor3f (1.0, 0.0, 0.0);          // set line segment color to red
    
    // specify line segment geometry
    draw1Line (10,90,35,90);
    draw1Line (10,90,10,65);
    draw1Line (10,65,35,65);
    draw1Line (35,65,35,40);
    draw1Line (10,40,35,40);
    draw1Line (45,40,45,90);
    draw1Line (45,90,69,90);
    draw1Line (69,90,69,65);
    draw1Line (69,65,45,65);
    draw1Line (45,65,70,40);
    draw1Line (80,40,80,90);
    draw1Line (80,90,92,65);
    draw1Line (92,65,104,90);
    draw1Line (104,90,104,40);

    glFlush();           // Process all OpenGL routines as quickly as possible
}

void main (int argc, char** argv) {
    glutInit(&argc, argv);          // initialize glut
    glutInitDisplayMode (GLUT_SINGLE | GLUT_RGB);    // set display mode
    glutInitWindowPosition (50, 100);   // set top-left display window position
    glutInitWindowSize(400, 300);       // set display window size
    glutCreateWindow ("SRMROX!");       // create display windows

    init();                             // initialize procedure
    glutDisplayFunc (lineSegment);      // send graphics to display window
    glutMainLoop ();
}
Note: All code pasted here is free to be used in any way.

The game engine

 A game's engine is the core of the game's code. It provides the programmer with all of the features that he can use in developing the game. These include memory management, file input/output, rendering techniques, among other things.

There are a lot of engines available, some free, some commercial. Some of them simplify development by adding abstraction from code, for example Adventure Game Studio and Game Maker. Some give full power but are more complex to learn, like Open Dynamics Engine and the very popular Unreal Engine.

A custom engine can be designed too with sufficient knowledge of a programming language. Most commonly used are C++ and Python, with Java being the sole language for browser based games.

1213

Date of Release:
Developer:
Genre:
Platforms:
Mode:
Engine:
Languages:
Price:
December 2005
Yahtzee
Platformer
Windows
Singleplayer
Adventure Game Studio
English
Freeware
1213 tells the story of a prisoner with no recollection of who or where he is, who tries to discover the meaning of his own existence.
Its split into 3 episodes. All of which carry the same story line. They include a commentary mode too where the developer tells about all of the noticeable or not so noticeable interesting things.




Here is a link to the whole of the gameplay video - special thanks to phillipe113:
http://www.youtube.com/view_play_list?p=245CA73BF5C6F3B9&search_query=1213