Previous Blog Next Blog
Prev/Next Blog
by date

Going Mobile: Part 2

Going Mobile: Part 2
Name:Ben Versaw 
Date Posted:Aug 20, 2008
Rating:3.0 out of 5
Public:YES
Comments:YES
RSS Feed:GarageGames Blog feedor Subscribe with .
Profile Page:View profile page for Ben Versaw

Blog post
With the semi-recent discussion about Torque for iPhone making it seem a even more distance iPhone development option than before I am glad that we decided to roll on ahead with our own engine.

Speaking of the BrainFluid Engine there has seen several advancements to its design / code base.

Texture Manager
I added a texture manager to the engine mainly because the BSP Trees required it - but I also hooked it up the to existing systems and the increase in performance as seen through testing tools has been noticeable.

The main idea behind a texture manager is to have it handle all requests for textures - if three different models need the same texture, the texture manager can load that texture once and then bind it to device when it is required. This reduces the memory footprint of the game because instead of storing a texture in three different locations, it is only stored in one central location.

BSP Trees
The engine now uses BSP trees to help optimize rendering and collision detection with level geometry. One of the key decisions we have made regarding the engine is that it has to run fast and take up as little hard drive space as possible. BSP Trees and data compression are helping us on this front.

The BSP Trees we use are calculated in our art pipeline by our level exporter from Milkshape3D and then loaded by the engine when needed. Because we are using BSP Tree collision detection is now fully up and running.

The BFS System
The BFS system (standing for BrainFluid Script) is at the core of the engine. Scripts in BFS are very compact and small taking up far less space then lua or even TorqueScript would. Unfortunately, the compact nature of BFS has came with a price - it is only editable by a custom tool I built called, creatively enough, the BFS Editor.

Thankfully, the BFS system was carefully planned so that it could be robust and accomplish all of our needs for the project. Currently, it supports: functions, if-then statements, scheduling events, global and local variables, and calling BFS functions in Obj-C and vice-versa.

Testing Onward!
Dennis and myself have began testing on the actual device(s) now. I recently bought a iTouch to complement his iPhone so now we can test on both platforms. Once again, we consider this project an investment and are willing to put out the money and effort required to see it through to completion.

Above: A test level running on my iTouch on top of the design document, a very rough work in progress story board, and some programmer concept art. Project details are censored out and artwork is obviously not final.

The first day I got my device was a very disappointing experience - as I discovered that the emulator in the SDK is very broken. Many of functions you can use in your code simply do not work on the actual device. Fortunately I have solved all of those issues now.

Engine Complete
In a short period of time we now have an engine that has its own scripting language, supports 3D levels, models with multiple skins and animations, cameras (1st person, 3rd person, even a rail cam), 2D objects both as sprites and as GUIs, and the performance on the iTouch / iPhone is amazing. We also have a working art pipeline between Maya and our engine for levels and models.

Another great new feature is all of our text is saved in separate files that can be easily translated into another language. Providing quick localization.

Now time to begin making the game!

Like What You See?
You could have the same level of dedication and programming experience on -your- project. All you have do to email me at benv@brainfluidgames.com to discuss the possibility of contracting me for a project or even giving me a job at your company.

Recent Blog Posts
List:08/20/08 - Going Mobile: Part 2
08/07/08 - Going Mobile
06/11/08 - Reinventing the wheel - Creating a 2D API
05/23/08 - Rated M - Just to be rated M
11/22/07 - Text Based Cell Phone Games
06/26/07 - Guitarist Joe Needs You!
11/27/05 - Plan for Ben Versaw
07/28/05 - Plan for Ben Versaw

Submit ResourceSubmit your own resources!

David Montgomery-Blake   (Aug 20, 2008 at 17:38 GMT)
This is quite exciting! I'm definitely interested in seeing the direction you guys take this.

DALO   (Aug 20, 2008 at 19:13 GMT)
Shhhwwaattt? Can I beta test your engine for some constructive feedback?

Devon Winter   (Aug 20, 2008 at 19:43 GMT)   Resource Rating: 3
Hey Ben! Looks like you guys are making solid progress, and getting all the pieces in place for your engine. I'm curious how much thinking is going towards licensing the engine and tools as much as the final game itself. More than a little I'd wager.. ;)

Throwing out some completely unsolicited and probably uncessary suggestions, but hey who knows one day I might be using this engine, and there are always things I'd wished the developer did in the early days. So here goes.. ;)

- Set up a robust error/debug logging system right away, and use it consistently. Whenever we're building engines it's always something easily postponed, and we're almost always sorry we did. Sucks when every coder on your team has a different convention for error return codes and logging protocol.

- wrt to your texture manager -- please don't make the mistake TGEA did and use the texture filename as your unique key. TGEA hashes the name into a lookup table, and then uses that for the cache. But it doesn't account for the fact that the same name may reside in different paths. So two materials, same name, different subfolders only one of them ever gets resolved. When your texture name is stamped inside your .DTS file, which means it's not as simple as just renaming yoru texture, but potentially re-exporting the .DTS that references it, it becomes a pita.

Okay.. that last might have become a small rant. :) Anyhoo... erm.. use ID's! :)

Good luck, and can't wait to see further progress !

Ben Versaw   (Aug 20, 2008 at 20:03 GMT)
"This is quite exciting! I'm definitely interested in seeing the direction you guys take this."

Thank you.

"Shhhwwaattt? Can I beta test your engine for some constructive feedback?"

Unfortunately allowing others to use the engine would cause us to bump into some legal walls that I really don't want to deal with at the moment. It is something I have been thinking about but I really don't want to mess with licensing an engine built over the SDK without legal advice - which is simply out of my budget range at the moment.

If, however, it becomes a realistic option to allow others to license our engine I will let the GarageGames community know.

"wrt to your texture manager -- please don't make the mistake TGEA did and use the texture filename as your unique key."

The texture manager uses numeric IDs for many reasons. A couple are that strings take up more memory than an ID, its faster to find a texture from an ID, and because our levels are generated by a custom tool chain anyway it can be automated.

You must be a member and be logged in to either append comments or rate this resource.