Time Away, Blender, Lua, More Time Away

Published August 07, 2011
Advertisement
I haven't been doing much coding on the game lately. I've been trying to shorten my to-read stack, and just haven't felt like getting on the computer too much. Also, the house took a vacation to my parents' home last week, so I was without a dev machine. When I have been at the pc, I've been learning Blender, which is significantly different than any other modeling software I've used. It's frustrating to know that something can be done and yet not be able to determine how in an interface that only makes sense after learning it; but after watching several video tutorials it's beginning to come together. I can understand why it's set up like it is, but I apparently don't think the way the UI creator does, so any new thing I want to do requires another Google search, since I'm taking the approach of How do I do what I want to do instead of working through tutorials in any logical order ;)

So I've made a simple Pac-Man player model, am using bones to animate it, have applied materials, etc. Then I exported it as an X file. Taking a look at it revealed that my 94-vertex model suddenly had 546 vertices! Some quick investigation revealed that each vertex was repeated for each triangle that used it.

I'd been considering what file format to use for the game's models for some time, and PiL (bn)(amazon) has a bit about structuring data files in such a way that they can be run as Lua programs. I like the idea of this, and so I've decided to go this route. While I'm at it, I thought I'd write an optimizer/converter in Lua that would take an X file and strip out all those extraneous vertices, re-index the triangles and spit out a model file that could be run by the Lua vm. Doing this will give me more experience with using Lua, to which I'm still quite new.

The optimization routines are nearly done--there are still some issues with handling the faces, but I should be able to finish it tonight. After that, I'm on another hiatus as I need to return to my parents' for a week or so due to a death in the family.
0 likes 2 comments

Comments

yckx
All the models are fairly small, so load times shouldn't be an issue. Im also looking at this method as a level file format, which also shouldnt be small in my game. But don't hold your breath for results—I won't be able to continue work on it until next week.
August 09, 2011 02:22 PM
Jason Z
Don't worry, I'm patient :P
August 09, 2011 08:22 PM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement
Advertisement