• Advertisement
Sign in to follow this  
  • entries
    11
  • comments
    26
  • views
    5844

Entries in this blog

 

WooHoo

The first milestones I've set for myself about a month ago have been met. As of yesterday I got text working in my engine [smile]. The milestones were

2D Rendering Device
Audio Player
Graphic Object class
Derived Graphic Window class (holds other graphics)
Text rendering to the screen
Text rendering to windows
Basic Input

I've still got some debugging to do as my framerate has dropped a bit. I did a little optimizing yesterday but I need to figure out whether the slowdown is caused by the audio player or the font handling.



I'm starting to feel like this guy:

Rhaal

 

Newest Song

So, I like to write songs as well as code. Sometimes the code gets too crazy and I need the music to restore order in my soul (because the code causes turmoil [lol]).

The latest song I've drafted up is called "Seclusion", and like I said, it's a draft. My Keyboard/Recording Equipment are also not top notch.

I gotta use my GameDev webspace for something!

Download Seclusion_GD.mp3 5MB

Rhaal

 

A little bugger

This one got me for a little while. My renderer has a list of entities that get rendered when a Draw function is called on the renderer.

void lxRender::RenderScene()
{
std::list::iterator elI = mElementList.begin();
while(!(elI == mElementList.end()))
{
(*elI)->Draw(mScreen);
elI++;
}
SDL_Flip(mScreen);
}



In an effort to program better I decided to change the way visibility works. Before, I was having the graphic element handle visibility by just exiting the Draw function right away if the flag wasn't set. Moving it to the renderer, I simply added a condition to see if the element was visible.

void lxRender::RenderScene()
{
std::list::iterator elI = mElementList.begin();
while(!(elI == mElementList.end()))
{
if((*elI)->Visible)
{
(*elI)->Draw(mScreen);
elI++;
}
}
SDL_Flip(mScreen);
}



Everything worked until I made an element invisible. The program froze. This one got me for a bit then I felt so dumb. Can you see the problem?

Rhaal

 

Entry

6:25 AM - Google Local
I got this ad when searching for the nearest Dell Taco through google local.


Screw the game industry. I want $90/hour to eat tacos!

Rhaal

 

Entry

5:55 PM - Stupid Optimization Tricks

I discovered a solution to a little problem I was having with tehtris. Input was slightly laggy, and I thought that I had some major resource issues going on! I passed it off as exactly that and decided that I didn't want to deal with it.

Well I was breaking up some code since main.cpp was getting too large, and it just jumped out at me!

void gsMainMenu()
{
// See if it's time to render a new frame.
if((SDL_GetTicks() - gTimer) >= FRAME_RATE)
{
// Handle user input.
InputMainMenu();

// Get rid of the last frame.
ClearScreen();

// Draw background image.
Renderer.Blit(*sfTitle, *sfScreen, 0, 0);

// Show the main menu text.
DisplayText(ftForgotLg, "Press any key.", 310, 300, 255, 255, 255);

// Display the backbuffer.
SDL_Flip(sfScreen);

// Set the timer.
gTimer = SDL_GetTicks();
}
}


My intentions were to have the frame rendered if the time was right. However, including the input handling into that if statement was causing input to only be read if it was time to render! Thus...

void gsMainMenu()
{
// Handle user input.
InputMainMenu();

// See if it's time to render a new frame.
if((SDL_GetTicks() - gTimer) >= FRAME_RATE)
{
// Get rid of the last frame.
ClearScreen();

// Draw background image.
Renderer.Blit(*sfTitle, *sfScreen, 0, 0);

// Show the main menu text.
DisplayText(ftForgotLg, "Press any key.", 310, 300, 255, 255, 255);

// Display the backbuffer.
SDL_Flip(sfScreen);

// Set the timer.
gTimer = SDL_GetTicks();
}
}


...is MUCH smoother! It's almost like I know what I'm doing.

Rhaal

 

Entry

5:55 PM - XML Fun!
I'm off work in 5 minutes! In light of the lack of expected OT today, I'm going to force myself to work on my programming for at least one hour before playing Warcraft :)

I've been briefly learning XML (as in for a couple hours) and I think I get it. Does this look like a feasible xml doc to describe elements in a playlist?
[source language= jscript]
"1.0" encoding="ISO-8859-1"?>



"01">
Tehtris Tehme
Shane E. (vuxnut)
\data\music\tehtris.mp3


"02">
Champion of Ron
Shane E. (vuxnut)
\data\music\cor.mp3




Rhaal

 

Entry

7:59 PM - A Nice Day
I wonder if my most frequent updates in this journal will come with the World of Warcraft queue. Actually, I'm sure I'll find time at work as well.

I only had one day off this weekend, and that day was today. I planned on spending some time implementing improvements to tehtris's audio system, such as the ability to pause tracks and resume at a later time, but I didn't get around to it. A lot of laundry and a bit of laziness steered me away from my compiler.

That's ok because I'll have enough work to do tomorrow, as it's looking like another 13 hour day.

Rhaal

 

Entry

11:54 AM - The Beginning
I'm now among the l33t of GDNet+ members! I've decided to start keeping a journal on here if for naught but self-motivation.

So, I'll introduce my current projects.

tehtris
This game is going to be an all out effort on my part to start and finish a game. It's teaching me a lot about game engine functions. The game engine isn't anything exportable yet, as it's constantly evolving around one game.

The Chronicles of Lorium
This is my baby, and that's why it will not be rushed. The story is being developed, and that's pretty much it. Theres no implementation other than a little concept art from my artist. I'll give a synopsis when I'm in the mood. I'm at work right now, and it gives me a reason to sign out of WoW and write something in my journal later :)

That said, I'll talk about my life from time to time. Why not? If you find no interest in golf, hockey, tennis, computer science, video games, rpg's, dragonlance, and office political humor you might want to skip these ones.

If you'll excuse me, I need to find a way to kill an hour before lunch.

9:18 PM - World of Waiting

I'm in the damn queue to get on Warcraft. So I decided to capture a screenshot of my project tehtris. I've only been coding it for a few days, but I got the basic game states, rendering, audio, and text functions moderately working.

Alas, the queue has turned in my favor.

Rhaal

Sign in to follow this  
  • Advertisement