Posts Tagged ‘tools’

3d model converter/loader

Filed under: Game Maker


I wrote this ages ago and it didn’t receive much publicity but unless things changed, it’s the most powerful tool you have to get high end models into GM. Not feature-rich, but powerful. This will overcome vertex count limitations. And this will work on models which have more than one surface , and it will automatically convert textures to .bmp (although since gm7 this might not even be needed anymore). It loads 3ds, x, and b3d formats.

Oh also, now that gm has a function to save and load models, you can overcome the long load times by having a gm script import an .i3d mesh and save it as a gm mesh, and from then on only load that one.

One bug I noticed is that due to the way it handles loading, you can’t keep it too ‘deep’ on your harddrive. The path where the model sits must be short. Like c:\temp\rah\model.ble worked for me and c:\gdev\gm\stuff\temp\model.ble failed.

Model Loader

Tags: , ,

Permalink Comments (6) GearGOD Oct 2, 2007

External object exporter/loader

Filed under: Game Maker

extensions screenshot

This is one of my coolest pieces of GM goodness ever. I refused to post it anywhere for nearly a year but now that I’m moving from GM I thought it would be nicer to share. Unfortunately it doesn’t come with a readme. I might write one if I get time but I’ll briefly explain it here.

This is a two piece system that allows to to take ANY object from ANY gm6 game, and load it at runtime into any game that uses the loader system. It’s the result of a several week collaboration between IsmAvatar and me. If you use this, credit is required for us both. The first step is the Object Exporter. It’s a nifty little piece of java code you’ll find in the zip. When you run it, point it at any GM6 game and I’ll bring up a list of objects in that game. You can then select any of those objects and it will export all their code. Note, it does not export and drag and drop actions other than the ‘execute code’ and ‘excecute script’ one. When we designed it, we agreed that anyone using it should only be using scripts. The really cool thing is it’ll automatically pay attention to what scripts your object relies on and export them as well. The result is a GOD file containing all the code required to manifest this object.
The second stage is the loader. It will take the object, and do a crapload of work behind the scenes to bring you one delicious function g_parse(). It loads a .god file and returns the object index which you can then instance as if the object has always been in the game! instance_create(0,0,g_parase(“rah.god”)) it’s as simple as that. Now a lot of the magic it does behind the scenes is about making it run fast. It acts as a primitive compiler and modifies the code going into it so it runs almost as fast as native code. It also does a couple of other things with parsing like allow you to ban certain functions which you’d consider unsafe. Or perhaps redirect one function into another. This is in the demo. Any calls to show_message() get redirected to winlog_post so any .god object attempting to show a message, shows it the way I tell it. Something very useful for serious extension mechanisms.

It does have several bugs, but overall it works. It’s not quite capable of taking an entire complex gm6 game and loading it straight, but for extension and modding purposes, it’s a gold mine.
If you use this or any part of this, be sure to credit both IsmAvatar and me. Also, we’re now living in a sort of GM7 world but on the G-Java foums is a utility capable of loading a gm7 game and saving it as a (corrupted) gm6. To fix the corruption, open game maker 6 with a blank game and merge it with the file this utility spat out. The result is a flawless conversion.

Extobj

Tags: ,

Permalink Comments (1) GearGOD Oct 2, 2007

Threaded Log Window

Filed under: Game Maker

winlog

A little set of scripts to provide a threaded log window to GM. You can write to it in lines or sequentially, which is very useful for messages that have a start and an end like “Loading graphics…Done” where the Done part gets written on completion and stays on the same line.

Because this creature is threaded, it’s especially useful for debugging. When GM gets stuck in a long or endless loop, its output stops responding so it can’t tell you what’s going on. This log window will. When I worked on my more complicated creations, this came in handy countless times.

If anyone gets around to making an extension form it, please send it to me so I can put a link here. I tried to make one with the final version of extension maker and gave up. Frankly, that extension maker is pathetic given that it’s the only way GM7 users can use its most notable feature.

Winlog zip

Arcalyth from 64digits converted this script to extension form, so gm7 users can fetch it here. Threaded Log Extension

Tags: ,

Permalink Comments (4) GearGOD Oct 2, 2007