Deadline games has just released their first game so download it now while its free
http://homepages.cs.ncl.ac.uk/2010-11/games/Deadline/index.html
shambles game engineering
This blog is created to keep track of the MSc in Computer Game Engineering in Newcastle university that im doing.
Thursday, 31 March 2011
Tuesday, 29 March 2011
Finding memory leaks!
This is a really usefull way to locate memory leaks by adding it to your program any remaining memory that has been deleted is printed out might help to locate the problem.
thanks goes to ben for telling me about it :)
#define _CRTDBG_MAP_ALLOC
#include
#include
int main()
{
// Turn on memory leak checking
_CrtSetDbgFlag(_CrtSetDbgFlag(_CRTDBG_REPORT_FLAG)|_CRTDBG_LEAK_CHECK_DF);
// do news / deletes etc...as you normally would...rest of game code
// Optional - any time check whats still being used
_CrtDumpMemoryLeaks();
}
thanks goes to ben for telling me about it :)
#define _CRTDBG_MAP_ALLOC
#include
#include
int main()
{
// Turn on memory leak checking
_CrtSetDbgFlag(_CrtSetDbgFlag(_CRTDBG_REPORT_FLAG)|_CRTDBG_LEAK_CHECK_DF);
// do news / deletes etc...as you normally would...rest of game code
// Optional - any time check whats still being used
_CrtDumpMemoryLeaks();
}
Thursday, 10 February 2011
space taxi by deadline games
showing off bump mapping on the planets
initial testing of the team project as part of the MSc in Newcastle university.
Saturday, 15 January 2011
recursive tree function
draws a tree recursively nothing special.
exam 09/10 answer
void drawTree(Position top, Position bottom, float branches)
{
if(branches >0)
{
/*
glBegin(GL_LINES);
glVertex3f(top.x,top.y,top.z);
glVertex3f(bottom.x,bottom.y,bottom.z);
glEnd();
*/
drawQuad(top,bottom);
Position halfLength = Position(top.x/2,top.y/2,top.z/2);
//draw top branch
glPushMatrix();
glColor3f(1.0,0.0,0.0);
glTranslatef(top.x,top.y,top.z);
glScalef(0.5,1.0,1.0);
drawTree(halfLength,bottom,branches-1);
glPopMatrix();
//draw left Branch
glPushMatrix();
glColor3f(0.0,1.0,0.0);
glTranslatef(halfLength.x,halfLength.y,halfLength.z);
glRotatef(30,0,0,1);
glScalef(0.5,1.0,1.0);
drawTree(halfLength,bottom,branches-1);
glPopMatrix();
//draw right Branch
glPushMatrix();
glColor3f(0.0,0.0,1.0);
glTranslatef(halfLength.x,halfLength.y,halfLength.z);
glRotatef(-30,0,0,1);
glScalef(0.5,1.0,1.0);
drawTree(halfLength,bottom,branches-1);
glPopMatrix();
}
}
exam 09/10 answer
void drawTree(Position top, Position bottom, float branches)
{
if(branches >0)
{
/*
glBegin(GL_LINES);
glVertex3f(top.x,top.y,top.z);
glVertex3f(bottom.x,bottom.y,bottom.z);
glEnd();
*/
drawQuad(top,bottom);
Position halfLength = Position(top.x/2,top.y/2,top.z/2);
//draw top branch
glPushMatrix();
glColor3f(1.0,0.0,0.0);
glTranslatef(top.x,top.y,top.z);
glScalef(0.5,1.0,1.0);
drawTree(halfLength,bottom,branches-1);
glPopMatrix();
//draw left Branch
glPushMatrix();
glColor3f(0.0,1.0,0.0);
glTranslatef(halfLength.x,halfLength.y,halfLength.z);
glRotatef(30,0,0,1);
glScalef(0.5,1.0,1.0);
drawTree(halfLength,bottom,branches-1);
glPopMatrix();
//draw right Branch
glPushMatrix();
glColor3f(0.0,0.0,1.0);
glTranslatef(halfLength.x,halfLength.y,halfLength.z);
glRotatef(-30,0,0,1);
glScalef(0.5,1.0,1.0);
drawTree(halfLength,bottom,branches-1);
glPopMatrix();
}
}
Tuesday, 11 January 2011
Wednesday, 17 November 2010
NPC's feelings
just got a lend of MOGWORLD a book written by yahtzee croshaw the hat wearing speed talking game reviewer for the escapist magazine if you haven't seen any of his reviews check them out.
only started reading the book but it makes you think of all those completely forgettable NPC's you've wasted countless times maybe they did others things on there spare time, like walk off to eat rice off the ground and not the poisoned variety that i feed them in tenchu 2 like some kind of bizarre hobby.
I've always wondered what kind of samurai guard actually does that to walk out into the rain after seeing some rice fall on the ground and doesn't find it remotely suspicious but instead decides to take out his travelling chopsticks and tuck in right there and then. Maybe he had a eating disorder? where he must eat everything he see's or maybe he was on day 6 of a 7 day fast for charity and just couldn't take it any more either way he was an easy stealth kill and helped me achieve grandmaster in every level of tenchu 2 so thank you NPC for your lack of good hygiene.
only started reading the book but it makes you think of all those completely forgettable NPC's you've wasted countless times maybe they did others things on there spare time, like walk off to eat rice off the ground and not the poisoned variety that i feed them in tenchu 2 like some kind of bizarre hobby.
I've always wondered what kind of samurai guard actually does that to walk out into the rain after seeing some rice fall on the ground and doesn't find it remotely suspicious but instead decides to take out his travelling chopsticks and tuck in right there and then. Maybe he had a eating disorder? where he must eat everything he see's or maybe he was on day 6 of a 7 day fast for charity and just couldn't take it any more either way he was an easy stealth kill and helped me achieve grandmaster in every level of tenchu 2 so thank you NPC for your lack of good hygiene.
Subscribe to:
Posts (Atom)
