Backup plan

right,
I have spent too much time on trying to figure out 3D Picking and meshes.

I need to prepare backup plan – only 6weeks left till deadline.

here it is:

2D –  Top down – survival.

the idea is pretty the same as in 3D version – but I am considering get rid of building and as a production supplies – I mean we will have a farmers family that want to survive on their farm, yes sheep will be there.. here is scenario.

player controls 4 people team in where every unit has special skills – range, male dps, meal tank, healer – pretty standard rpg group.

I am considering as well game play ideally that would be multi player with server and clients but as far as now player will be able to control on of units and the rest will have some sort of AI. RPG elements will allow leveling for a team, and some perks will drop from zombies, wave time based play stays the same.

I have started developing engine from scratch.. again.. well this time I will base on university engine that we are developing at practicals by end of this week I should have:

  • Working framework
  • Tailed base map
  • Entity manager
  • Collision detection
  • Messaging system
  • Basic.. really basic AI
  • loads of small things like sprite renderer, game clock, animation engine, etc

Oh one big change.. I have decided to use DirectX9 instead on 10/11.. we are covering this one at university.. and I really do not have time to learn this one on my own.. probably later on I will do anyway.. but.. I am really tight with my time frames.

Day 11: Well I have done the textures

I cannot admit.. I wanted to finish couple more things..
well so now we have space to render divided to quads.. increase performance, texture, lighting, info about graphic card and memory left on card.

Now I am ready to do game logic.

what should I start with?
random placing objects on a map?
word!

I need to think of a build name for this project.. any suggestions?

Day 10: Height Map

I am satisfied with that height map – no multi textures, blending, water or even trees.. I need to concentrate on logic now, polishing details will be last thing.

plan for today/tomorrow.

picking + adding objects on the map..

good luck Luke..

thanks Luke.

edit:
ok 2 more thing left before I ll be ready to go with picking and objects,

1. need to set up camera in 45 degree
2. I need to think of optimisation.. some sort of quad tree or so..

Day 9: Motivation Kick

I need to figured out what I want/have to do with University and work.. need to find a balance,

Today after chat with my Program Leader I have decided to start going forward and developing stuff that I actually will need and polish small things at the end, that’s why today I have managed to create 1024 by 1024 grid map which will be base for my 3D hight map based strategy game, decisions has been made. nothing else left than developing..

Element Covered Tonight:

  • movement class
  • terrain class
  • grid helper

Tomorrow – Height map.

Day7: Quick overview

Just quick overview for end of day 7.

  • Input handler gets mouse position and escape button
  • Drawing 3D maya objects
  • Sound player
  • drawing 2D over 3d object
  • Font engine – well subsystem but..
  • High precision timing
  • FPS
  • CPU usage
  • Lighting

Still loads left to do but as for one week it is fairly enough!

Maya Converter Created v 0.1

I made this!

I have developed simple file that converts .obj file format exported from Maya to format that can be in easy way imported to my framework, processed and displayed! current version allows to import whole object with texture! This simple but really flexible script allows me to import any model exported to .Obj to the framework/engine.. how cool is that?!

some code below:

loading file and counts
[cc lang=”cpp”]
ifstream fin;
char input;

// counts.
vertexCount = 0;
textureCount = 0;
normalCount = 0;
faceCount = 0;

// open the file.
fin.open(filename);

// was successful in opening the file?
if(fin.fail() == true)
{
return false;
}

// beginning of the vertices section.
fin.get(input);
while(input != ‘v’)
{
// remainder of the line.
while(input != ‘\n’)
{
fin.get(input);
}

// start reading next line.
fin.get(input);
}

// vertices, texture coord, and normals counts
while(input == ‘v’)
{
fin.get(input);

if(input == ‘ ‘) { vertexCount++; }
if(input == ‘t’) { textureCount++; }
if(input == ‘n’) { normalCount++; }

// the line.
while(input != ‘\n’)
{
fin.get(input);
}

fin.get(input);
}

// number faces.
while(!fin.eof())
{
if(input == ‘f’) { faceCount++; }

// the line.
while(input != ‘\n’)
{
fin.get(input);
}

fin.get(input);
}

// Close the file.
fin.close();
[/cc]

now file processor:
[cc lang=”cpp”]
VertexType *vertices, *texcoords, *normals;
FaceType *faces;
ifstream fin;
int vertexIndex, texcoordIndex, normalIndex, faceIndex, vIndex, tIndex, nIndex;
char input, input2;
ofstream fout;

// Init the data structures.
vertices = new VertexType[vertexCount];
if(!vertices)
{
return false;
}

texcoords = new VertexType[textureCount];
if(!texcoords)
{
return false;
}

normals = new VertexType[normalCount];
if(!normals)
{
return false;
}

faces = new FaceType[faceCount];
if(!faces)
{
return false;
}

// the indexes.
vertexIndex = 0;
texcoordIndex = 0;
normalIndex = 0;
faceIndex = 0;

// open the file.
fin.open(filename);

// opened?
if(fin.fail() == true)
{
return false;
}

// parse of the vertices section.
fin.get(input);
while(input != ‘v’)
{
// the line.
while(input != ‘\n’)
{
fin.get(input);
}

// read the next line.
fin.get(input);
}

// Read vertices, texture coordinates, and normals into the data structures.
// + convert to left hand coordinate system.
while(input == ‘v’)
{
fin.get(input);

// read in the vertices.
if(input == ‘ ‘)
{
fin >> vertices[vertexIndex].x >> vertices[vertexIndex].y >> vertices[vertexIndex].z;

// Invert the Z vertex to left hand system.
vertices[vertexIndex].z = vertices[vertexIndex].z * -1.0f;

vertexIndex++;
}

// Read texture coords.
if(input == ‘t’)
{
fin >> texcoords[texcoordIndex].x >> texcoords[texcoordIndex].y;

// change the V texture coordinates to left hand system.
texcoords[texcoordIndex].y = 1.0f – texcoords[texcoordIndex].y;

texcoordIndex++;
}

// read normals.
if(input == ‘n’)
{
fin >> normals[normalIndex].x >> normals[normalIndex].y >> normals[normalIndex].z;

// normal to left hand system.
normals[normalIndex].z = normals[normalIndex].z * -1.0f;

normalIndex++;
}

// read line.
while(input != ‘\n’)
{
fin.get(input);
}

// next line.
fin.get(input);
}

//number of face indexes.
while(!fin.eof())
{
if(input == ‘f’)
{
// Read backwards – to a left hand system.
fin >> faces[faceIndex].vIndex3 >> input2 >> faces[faceIndex].tIndex3 >> input2 >> faces[faceIndex].nIndex3
>> faces[faceIndex].vIndex2 >> input2 >> faces[faceIndex].tIndex2 >> input2 >> faces[faceIndex].nIndex2
>> faces[faceIndex].vIndex1 >> input2 >> faces[faceIndex].tIndex1 >> input2 >> faces[faceIndex].nIndex1;
faceIndex++;
}

// the line.
while(input != ‘\n’)
{
fin.get(input);
}

// next line.
fin.get(input);
}

// close.
fin.close();

// output file.
fout.open(“model.txt”);

// header.
fout << "Vertex Count: " << (faceCount * 3) << endl; fout << endl; fout << "Data:" << endl; fout << endl; for(int i=0; i

Vortex Terrain Model

First of all: My class that loads objects from file is working now! v0.6 is able to load vertexes and put them into buffer! Great success!

I was thinking about topic for Games Engineering module. There are plenty ideas in my head of what I can create,

but last idea seems to be a challenge – Simple Vortex Terrain model (little bit similar to the one in minecraft) that will allow player to have ultimate power to change things on it – not sure what that will be exactly but, I am pretty sure player will be able to make “holes” in a ground, caves, flood, destroy object and create craters,

well I see the future for that kind of map for RTS games..

I need to make research and design data structure for vortex terrain – but I am sure that’s “doable”