New Engine: Recycling

posted in A Keyboard and the Truth for project 96 Mill
Published July 10, 2007
Advertisement
Greetings All,

It's been a bit longer than I'd hoped for my next post on the development of my new engine; however lots has been going on with my personal life; anyhow let's touch base with what I've been doing.

Recycling:

An important thing to leverage, especially when you've been doing game development for a while (like me =/) is to recycle. Chances are if you're like me, you've written a lot of code, a LOT of code; if this is the case chances are a lot of it is still good, even if it's only fragments, and the way I look at it there are some very good reasons for recycling code:


  • Saves time in not having to rewrite certain things

  • You benefit from code which has potentially been well debugged

  • The less new code you write the fewer bugs you're likely to have



Of course the key is determining what is usable from your big digital scrap-pile. Chances are a lot of it is 'junk', great canditates for recycling are ususally stand-alone systems which do a small number of things and do them really well.

For me, I decided to take the entire S3Engine (The engine that was being used for Malathedra), scrape it down to the bare metal and use it as a starting platform for my new engine, why?

Because it's got some damn-fine code in it!

When you stop to think about how many hours you've poured into certain systems; you get the urge to recoup those, and for me recycling the S3Engine was a no brainer.

At it's heart the S3Engine contains basic systems for window creation, Direct3D initialization, basic message handling, graphics device mode selection, save-game serialization, windows user profile based settings storage and retrival, audio streaming, resource caches, radial menu UI system; and the list goes on...

So with a little bit of work I managed to scrape away all of the S3Engine specific parts, e.g. 2D Entities, C-style scripting with LUA, etc. and I'm left with a system that starts to a blank window, with all of the neccessary underlying little details that tend to be forgotten when starting a new system.

I easily spent two months developing this code, it took me about a day to get it all cleaned up and ready for new engine components to be built on it; this is some major savings.

Thoughts? Comments?
0 likes 5 comments

Comments

johnhattan
Quote:Original post by EDI

Thoughts? Comments?
Sounds like a plan. Less code is always better than more code.

Now make a game.

July 10, 2007 01:26 PM
ildave1
[imwithstupid] Now make a game! ;)
July 10, 2007 04:35 PM
Endar
Damn fine idea, especially with code that does everything you say.

I've just started creating a small toolbox of functions that I seem to have to write every second day. Mostly string related stuff, but it's a start.

Like you, I'll probably end up re-using the majority of my current game (small though it may be) as the base of my next.
July 10, 2007 07:04 PM
coderx75
That Malathedra was a damn fine lookin' women if you ask me. I thinks you might need to tap some o' that action right there. No needs fo' the new woman to get jealous or nuttin'.. Ya'll'z just friends now, right? Once her and Malathedra get real buddy-buddy-like, it'll ALL be good brutha. Juss let 'er come as she please. =b

Seriously, that was some great stuff you were working on before. I can't wait to see what you do with it. Good luck Jacobs. I'm looking forward to the progress. =D
July 11, 2007 04:43 AM
EDI
Hehe, thanks!

Yeah Malathedra will be back, and if I have my way even more beautiful :D
July 11, 2007 08:09 AM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement
Advertisement