Thread: Animation.
View Single Post
Old 19th January 2009, 11:37 PM   #8
Ham
Member
Expert member
 
Join Date: May 2006
Location: international
Posts: 96
Default Re: Animation.

Hmm.
I just discovered Sandbox
It seems pretty amazing. Certainly you can get up and running quickly with that.
Its free and easy.
Its based on the Cube engine

Hmm they take MD3 files from Blender.

Thats always an issue, "can I use my 3D modeler with the engine?"

I make a free game engine too, but I can't describe it as 'easy' as its very undocumented
and an eternal work in progress. Here's a recent download I posted.
It has everything to basically use the engine minus hundreds of content files.
Mac version of iGame3D

Windows version of iGame3D

Here's the WTF Import/Export Plug-in for AC3D

Ok this demo of the engine is simply displaying 256 old school 8 bit characters and cycling colors.
You can fly around using the WASDR and F keys along with the mouse.

Use Control L or Command L to exit the little demo program and go into editing mode.
From the Levels Menu choose New Level and name your level.

Export your 3D models from AC3D to WTF format.
The new file with .wtf extension should go into the folder:
Data/WTF/

We kind of keep things organized like Data/WTF/Buildings/ etc.
Likewise we keep our images in Data/Images/Buildings/ etc
And we stick to .png files to keep things sane.

Putting images in the right place is something that you want to
do before creating your models that use them in AC3D, or
your paths will get lost later.

As long as things save to the Data folder you should be ok.

In the editor choose the Icon with the cube and arrow.
It will list files and/or folders in the WTF directory, find your file and choose "Add Object", to insert the model as an object, or load mesh to muck about in the mesh editor (not advised!).

Beware of "create preview" in the model loading window.
Open a new empty level before making previews.
If you click "create preview" while a folder is selected it will make previews for every file in the folder, else it will do one file at a time.
Either way it wipes out anything in the level before doing its preview magic, so beware.

Ok so once you add objects, choose Levels>Save.
You should have a new folder Data/Levels/YourLevel
with a new file "load script.lua"

It has an 'auto-script" that the engine writes over area and after that
you put your own scripting in.

The AC3D WTF Export willl produce one material for every 'object' in AC3D.
Generally for one object we end up with two materials, for whatever reason.
But anyway, so your material has the texture lets say of the 2x2 open sign.
In the load script you could animate that (after the auto script section) with
some script like:

obj = get(ig3d_object,"yourObjectNameHere")
MatToChange = get(ig3d_material, 2) -- material one is usually empty from the exporter
animate = true
delay = 0
frameTime = 1
num_columns = 2
num_rows = 2

setMaterialInfo (MatToChange, IG3D_ANIMATION, animate, delay, frameTime, num_columns, num_rows)

And it should animate!
Ah game coding what fun.
Help HTML files are found in Data/Help/


Anyway explore your options, there are other game engines out there, ones with UNDO.
Take it one step at a time, find out what ever engine you choose requires and can
deal with before creating anything more than sketches.
You could end up throwing away alot of 3D work simply because one
model uses up your entire polygon limit.

Good luck.

Last edited by Ham; 19th January 2009 at 11:40 PM.
Ham is offline   Reply With Quote