Advertisement Jump to content
  • Advertisement
Sign in to follow this  
  • entries
  • comments
  • views


Sign in to follow this  


  • Random Observation of the Day!
    Tonight is a drinking night!

    (and so is tommorrow night)

So... I got incredibly bored with the equation crap. Because its boring. Essentially the only thing left to do with it is to write a renderer (ie, something that can render and preferrably buffer a list of points) for it. Which is meh. I'm not too caring about it, if I want to do it it's easy enough to do.

I think my new project is going to be a framework (still utilizing the GUI system) to write minigames. Think along the lines of Wario Ware/Mario Party. Because those games are fun as hell, and can be broken up into many smaller, easy to write components.

One limitation I'm probably going to impose on such a system is that it's going to be single player only. This is due to the fact that its going to be on the PC, and hotseat gaming sucks. I currently have no existing codebase (anymore) for networking stuff, so that's basically out of the question.

But yeah.

Along with that new project is an upgrade of my rendering components. I've still been using that SDL placeholder dummy code which sucks ass. I really need to write a full-fledged OGL adapter for it, which (again) shouldn't take that long but is still something to do.

One thing that I've never done before is combine 2D and 3D elements. Well, I have, but I've always implemented it by billboarding textured quads. Which isn't what I want to do this time.

I think my OGL adapter will have 2 modes - 2D and 3D mode. The key difference is, essentially, the matrices loaded. Its trivial enough to just buffer a perspective/modelview matrix for each mode (whoo, for a combined total of 4 matrices) and use glLoadMatrix(..) to swap 'em out.

Additionally, an optimized program should only need to swap the matrices out twice each pass - all of the 2D stuff should (hypothetically) be drawn on top of the 3D stuff.

There are some other nasty bits that'll result in this, the bigest of which is the manditory disabling of the z-buffer tests during 2D mode. Which isn't a problem because I'm already using the painter's algorithm (render scene from back->front) because SDL doesn't have a z-buffer. So it'll work out.

Finally, the biggest nightmare is to implement a real font engine. As I've ranted in other people's journals, I can't stand writing font engines. What I'm using now is SDL_ttf, which is nice, but I'm creating a new surface (and freeing it) for every call to drawText(..) every frame. Which is slllooowww.

So that'll have to be fixed. Wrote one before, it was a bloody nightmare. Hopefully this one won't be as bad :/

Crap, I always seem to write too much recently. Guess I've always got too much crap on my mind. That's college for ya [headshake]
Sign in to follow this  


Recommended Comments

Mines almost finished, and you can use it if you want. It doesn't have a lot of features, but it works for everthing I'm doing:

  • Color strings

  • Left, Right, or Centered text

  • Text wrapping

  • Scaling

  • fixed or non-fixed width

Might add these:

  • Keyword highlighting

  • Underlining

  • Shadowing

I just have to finish the text-wrapping, rewrite the renderer (its rendering to quads, and I'm thinking of switching to render-to-texture). Warning though, if you just want to look at the code, I don't comment very well ATM.

Share this comment

Link to comment
Nah, I'm good, but thanks for offering :)

I don't think I'll need nearly that much functionality. I normally use a minimalistic coding style. Basically all I need is a class which implements

void drawText( text, color, x, y, w, h );

Other than that, meh. I've debated some about actually allowing the calling code to choose fonts and text sizes, but at this point even that isn't necessary.

Like I said, minimalist, to the point where its a flaw :)

Share this comment

Link to comment
What are you talking about? That is minimalistic :D lol. My last font engine implemented some crazy stuff (I was playing around). Once I get into shaders and such, it'll get better... think bump-mapped fonts :D

But yea, a simple font interface is apparently too hard for me too make (I add so much stuff while I'm programming its not even funny). This font engine started out as "I just need something to print my FPS to the screen".

Share this comment

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!