Sunday, February 22, 2009

Game Funding

HI Gamers,
For Nordic game developers who are interested in applying for this year's development support funding, the time has come to start preparing your application materials.

A total of 6 million Danish crowns (DKK) have been granted for development support to Nordic game companies in 2009, and the available funds will be allocated over two application rounds. The Development Support Expert Group have decided that the application deadline for the first round is

1 April 2009

The projects that are granted funding in the first round will be presented at the Nordic Game 2009 conference in on the 19! -20 May.

Thursday, September 25, 2008

Starting Game Programming-Part5

hi gamers,
Continuing where we left...
4)Painting and drawing is still handles by WM_PAINT

Case WM_PAINT:
{
//opengl command for drawing
RenderScene();

ValidateRect(hWnd , NULL);
}
break;

In order for OpenGL to draw in a window, the window must be created with the
WS_CLIPCHILDREN and WS_CLIPSIBLINGS styles set


5) Pixel Format sets a device context opengl properties such as color depth
and whether the window is double bufefred.You must set the pixel format for a

device context before it can be used to create a rendering context. Here are the

two functions you will need to use:


int ChoosePixelFormat(HDC hDC , PIXELFORMATDESCRIPTOR *ppfd)

BOOL SetPixelFormat(HDC hDC ,int iPixelFormat ,iXELFORMATDESCRIPTOR *ppfd)


setting of pixel format is 3 step process

a) First fill out the PIXELFORMATDESCRIPTOR structure
b)then pass this structure to ChooosePixelFormat function it returns a integer

index to available pixel fromat for specified device context.
c)this index is passed to SetPixelFormat function.

Friday, August 29, 2008

Starting Game Programming -Part 4

hi gamers,
Lets continue from where we left.....

Now taking the windows and opengl

opengl + win32 =wiggle

1) we will create handle for brush for filling and painting

HBRUSH hbluebrush , hredbrush;

then these are created in winmain

hbluebrush = CreateSolidBrush( RGB ( 0, 0 ,255 ) );
hredbrush = CreateSolidBrush( RGB (255, 0 ,0 ) );

eg use of it is to set the window background like:

wc.hbrBackground = hBlueBrush;



2) We used auxInitPosition for console but in windows we use

hWnd = CreateWindow(
lpszAppName,
lpszAppName,
WS_OVERLAPPED,
...
...

);

The actual painting is handled by WM_PAINT in WndProc function

opengl command -> opengl rendering context -> windows rendering context -> opengl output window.

The three most used
functions with regard to the rendering context are

HGLRC wglCreateContext(HDC hDC);
BOOL wglDeleteContext(HGLRC hrc);
BOOL wglMakeCurrent(HDC hDC, HGLRC hrc);


function wglCreateContext(HDC hDc ) takes a handle to a window GDI device context
and returns a handle to opengl rendering context.

function wglDeleteContext( HGLRC hrc ) takes rendering context as parameter

function wglMakeCurrent( HDC hDc , HGLRC hrc ) is used to make the rendering context suitable for that device context.Both device and

rendering context should
have the same characteristics such as pixel format..

3)Two message are involved in creating and destroying of rendering context

WM_CREATE
WM_DESTROY


LRESULT CALLBACK WndProc(HWND hWnd ,..)
{
static HGLRC hRC;
static HDRC hDC;

switch(msg)
{
case WM_CREATE:
hDeviceContext = GetWnd(hWnd);
hRenderContext =wglCreateContext(hDC);
wglMakeCurrrent = wglMakeCurrent(hDC ,hRC );

break;

case WM_DESTROY:

wglMakeCurrent(hDc,NULL);
wglDeleteContext(hRC);

PostQuitMessage(0);

break;

}

Wednesday, August 20, 2008

Starting The Game Programming -Part3

hi gamers,
The opengl basic concept continues...

In order to resize the drawing according to the size of the window opengl
uses glortho(left, right, bottom, top , near, far) function...

void glViewport(GLint x, GLint y, GLsizei width, GLsizei height)
x,y is the lower right corner of the screen
Usually x and y will both be zero, but you can use viewports to render more than one drawing in different areas of a window. The viewport defines the area within the window in actual screen coordinates that OpenGL can use to draw in

NOTE:
OpenGL’s default method for counting the x coordinate is the same; however, it counts the y coordinate from bottom to top—just the opposite of Windows

its like eg:

here the function Changesize( w, h) w=width and h = height is the updated height
when the window gets resized
void CALLBACK ChangeSize( GLsizei w , GLsizei h)
{
if ( h ==0 )
{
h = 1;
}

glViewport (0 , 0 ,w ,h);
glLoadIdentity();

//when the window gets resized vertically then the top portion is updated
if( w <>
glOrtho( 0.0f , 250.0f,0.0f ,250.0f * h/w ,1.0f ,-1.0f);
else
//when the window gets resized horizontally the the right portion is updated
glOrtho( 0.0f , 250.0f * w/h ,0.0f ,250.0f ,1.0f ,-1.0f);

}

Monday, August 18, 2008

Starting The Game Programming -Part2

Hi gamers,
Lets continue from where we left..we will be concentrating mainly on opengl way of
programming for now...

opengl function naming convention :

glcolor3f implies :-

gl =library name , color = root command , 3 = number of arguments ,
f = argument type.

OpenGL has not a single function or command relating to window or screen management

AUX = Platform I/O, the Easy Way


Before drawing anything we specify :-
Type of window = eg buffered window = means all drawing commands are performed on
the window displayed.

eg:double buffered = it is used in animation...where drawing command are actually
executed to create a scene off screen , then quickly swapped into view on the window.


glInitWindow( " " ) , glinitdisplaymode ( GL_SINGLE | GL_RGBA )

glinitposition( x, y , width ,height )


CALLBACK = we’re going to tell the AUX library to call this function whenever the window needs updating.

glFlush = the glFlush() function simply tells OpenGL that it
should proceed with the drawing instructions supplied thus far before waiting for any more drawing commands.OpenGL commands and statements often are queued up until the OpenGL server processes several “requests” at once. This improves performance, especially when constructing complex objects. Drawing is accelerated because the slower graphics hardware is accessed less often for a given set of drawing instructions.


glMainLoop( FunctionName )
FunctioName = Its the function that is used for drawing.....
function simply keeps the program going until it’s terminated by closing the window. This function’s single argument is a pointer to another function it should call whenever the window needs updating.This callback function will be called when the window is first displayed, when the window is moved or resized, and when the window is uncovered by some other window.

Thursday, August 14, 2008

Starting The Gaming Programming-Part1

Hi gamers,
Let me start gaming programming with knowing some game terminology .its the starting thing we should know...

some Basic stuffs for game terminology:

When we talk about 3D its actually combination of 2D and perspective projection.
3D = 2D + perspective.

Perspective projection is like we what we see in real world:
1) Objects closer to eyes appears larger
2)Objects far away from viewer appears smaller.

Whatever we want to draw in screen which is having only two dimension but using perspective color changes,lighting,textures,shading add together to the perception
of three dimensional image.So..
perpepective + colors + shading + lighting +texture ~= 3D image


Clipping area = the area in co-ordinate system which occupies in screen co-ordinates is known as clipping area..Its basically a translation from one to another.

ViewPort = Rarely It happens that the clipping areas width and height matches with the height and width of windows area.Therefore it has to be mapped from logical co-ordinate system to screen pixel.This is called ViewPort...its basically clients window area for drawing.

SOme time the viewport can be larger or smaller when compared to clipping area.


Primitives = these are basically two dimensional ojects such lines,points and polygons..These primitives are assembled to create 3d objects in 3d space.


In 3d dimension we (x,y, z)
Z can we pointing outwards or pointing inwards...depending upon convention taken
like right hand or left hand system.
Right hand system = thumb is x, index in y and middle finger is Z and is pointing
outward.

left hand system = thumb is x, index in y and middle finger is Z and is pointing
inward.

Far Clipping Plane = It indiactes how far we can see....

Viewinf Plane = It basically refer to the screen....


Viewing volume = Space between the near clipping plane and far clipping plane
is known as viewing volume..

Sunday, July 6, 2008

Game Event

hi gamers,
Nordic Game will once again be participating Europe’s largest games event, Games Convention in Leipzig, Germany on 20-24 August, this year with a group of 13 participating Nordic companies.

The Nordic Game booth is located in the GC Developers' Village, Hall 2, #F20, and will feature a business lounge, meeting rooms and private demo stations. As usual, the organisers have prepared a special networking event during the convention as well.

The following Nordic companies are ready to represent the region at the Nordic Game booth: Frecle (DK), Futuremark Games Studio (FI), Guppyworks (DK), Hansoft (SE), HaptX (SE), Housemarque (FI), Nordic Softsales (SE), Pan Vision (SE), Pixolane (FI), Press Play (DK), Redlynx (FI), The! Game Incubator (SE) and Unity 3D (DK).