Posts Tagged ‘development’

Visual Logic Proof of Concept

Filed under: Game Maker


This is a little proof of concept for a visual approach to programming.

You create a logic chain by placing links between the ‘input’ and ‘output’ points of actions/conditionals/loops/whatever. The rule is that at least one point of a link must be blue, and you can not link two blue points. Basically, make sure you only connect outputs and inputs, not two of the same kind.
The execution starts from the function entry-point, the tag with only a white output.
Currently you can not break links
Currently you can link two outputs to the same input as a legal operation. Do you think this should be kept that way?
Currently there is no checking for infinite loops (such as an output of a function linking straight back to it’s own input)
On an IF, the green output links to what’s executed if the IF returned true, red for false, and white for whatever happens afterwards.

Once you’re done with the diagram, hit Return, and it will compile a script which will be saved to the same path as the program as ‘out.txt’
If it freezes or throws an error, you created an infinite loop or other non-logical thing in the diagram.

It’s limited to random IFs and one function right now, but that can now easily grow.

The editable to this was lost with my hdd in 2006 so this is an exe.

Visual Logic Editor

Tags: , ,

Permalink Comments (0) GearGOD Oct 2, 2007

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

GM6+ Window Skinning

Filed under: Game Maker

Just a little one-function script to assign a bitmap skin to your game. It’s slower than it’s GM5 counterparts, but as far as I know it’s the only thing that works on GM6+ to date.

Skinning

Tags: ,

Permalink Comments (7) GearGOD Oct 2, 2007

Advanced Seeking Missiles

Filed under: Game Maker

Another bit of deliciousness from my GM folder. I made it after watching Battlestar Galactica. I learned a lot about homing missiles, like the fact that the tracking system isn’t as important as target selection. Anyway, it’s all there. With not much help or comments as usual :P .

Clicking the mouse will launch a few missiles in concert. Their super cool advanced AI will have each pick a target which can be hit in the least amount of time, and avoid designating more than one missile per target unless there are more missiles launched than targets to pick from. After that a tracking algo kicks in which simulates a limited amount of fuel which is used up by turning. The tracking algo is deadly efficient and predicts where the target is going to be. If the missile runs out of fuel before hitting, it’ll just keep flying in a straight line. If its target is destroyed by another missile, it’ll intelligently try to pick another target which its most likley to be able to hit. Not only is this a good demo to learn from, it’s also good for actually putting ideas to a test. With a bit of work you can make a much larger room and spawn a lot more enemies and have it launch missiles automatically. What you’ll end up with is an equilibirum of targets being spawned and shot down. As you tweak the AI the number of targets onscreen at any time will go down if you made a good change or up if it was a bad one.

Oh and if you haven’t realized, the ribbon trails here are the same ones as you’ll find in my ribbon trail sample. Only, that one is nice and commented and stuff.

Fire Ze Missiles!
Compiled EXE by popular demand.

Tags: , ,

Permalink Comments (0) 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