Archive for the ‘Game Maker’ Category
Filed under: Game Maker
The funniest programming language i’ve come across is l33t. Educate yourself here
http://en.wikipedia.org/wiki/L33t_programming_language
I wrote a quick interpreter for it in GM. Mind, the source code is horrible. It’s an example of how NOT to write a virtual machine. It will parse the contents of source.txt and print the output. No input supported right now. I tested it on most sample programs and found that they work. The ones that do not are fibonacci and countdown, for reasons unknown yet.
More sample programs you can try running can be found here:
http://electrod.ifreepages.com/l33tprogs.htm
int3rpr3t0r download
Tags: concept, snippets
Permalink Comments (2) GearGOD Oct 2, 2007
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: 3d, development, tools
Permalink Comments (5) GearGOD Oct 2, 2007
Filed under: Game Maker

A little trick I did to show that some limitations of d3d can be cheated around. Here we have a reflective surface. This is achieved by resolving a model’s vertices into screenspace (once again game maker limits and provides no transform functions so I had to pretty much duplicate d3d output with scripts). It is however, very limited and only shows the idea. To make it work in a game with a camera, you’ll need to do a bit more in the way of transforms.
Oh yeah. The i3d format it uses is produced by my mesh exporter also available here.
Reflections
Tags: 3d, effects, snippets
Permalink Comments (0) GearGOD Oct 2, 2007
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: development, interface
Permalink Comments (6) GearGOD Oct 2, 2007
Filed under: Game Maker

The challange was to draw a 2d fluid. The solution was very interesting. Because actually solving marching cubes or similar was too slow in Game Maker, I designed an ‘analog’ approach. This works on a surface. First we draw whatever the fluid ‘world’ may be – that is, what the fluid area will actually show. Like a liquidy red version of the screen for blood, or a gradienty blue version for water, etc. Then we do a bit of magic and overwrite the alpha of that surface with the alpha of particles representing the fluid area. Last but not least, we achieve thresholding without alpha testing which is unsvailable in game maker by multiplying the alpha values by themselves several times much like the contrast ramp phase of a bloom filter.
The technique of overwriting a surface’s alpha chanel alone is useful in many other applications, but I’ll let you think about that.
Oh yeah one more thing. The demo itself looks different from both these screenshots. And probably less pretty. Fiddle with it yourself to achieve the style you want. You’ll be wanting to play with the step script, which is sufficiently commented to navigate.
Metaballs!
Tags: effects, eyecandy, tutorials
Permalink Comments (2) GearGOD Oct 2, 2007
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
.
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: ai, development, effects
Permalink Comments (3) GearGOD Oct 2, 2007
Filed under: Game Maker

This is a little distorting shockwave effect. You might remember it from my very impressive Kill Catalyst screenshots on 64digits. It’s not quite so impressive in the demo, but if tweaked a bit and used right, will be awesome.
Shockwaves
Tags: effects, eyecandy, tutorials
Permalink Comments (5) GearGOD Oct 2, 2007
Filed under: Game Maker

This is really neat. It’s a few things in one. First and foremost it handles linear screenspace distortions. We’ve done shockwave rings, but lines turned out to be a bit more tricky. This shows two methods of doing it. One very pretty but slow one by creating several point distortions, and one fast but less pretty one with a few quads. It also shows how to do lightning that follows a linear path, and how to go about making awesome energy beams in general.
As with must stuff coming out of my GM folder, there’s no help file or explanations. If you want to use this, you’re going to have to pull it out yourself.
Linear distortion
Tags: effects, eyecandy, tutorials
Permalink Comments (2) GearGOD Oct 2, 2007
Filed under: Game Maker

I whipped this up after someone posted on the GMC asking about it. Mark’s naiive approach to drawing in version 6 and above resulted in it having a d3d and normal mode when both are esentially the same thing. Enabling d3d makes a number of things impossible. Mainly, surfaces. Not having d3d makes other things impossible like zbuffer and perspective correct texturing.
If you ever try to draw a skewed or distorted polygon with textures, you’ll see that there’s a weird artifact. Unfortunely only Mark can fix this, but we can approximate a solution by subdividing our polygon into several segments and interpolating the texture coordinates for them. By providing properly calculated UVs to each segment, we reduce the error the renderer produces by giving it more clues as to what the UV values should actually be.
Perspective Correct Texturing
Tags: 3d, tutorials
Permalink Comments (3) GearGOD Oct 2, 2007
Filed under: Game Maker

Ribbon trails are very pretty if used right. In fact even if used wrong they’re still pretty most of the time. I don’t know why no one has done this before. I saw scripts that drew them with circles which gets slow or ugly if you go fast, and with lines, which is limited to 1px in width. The obvious thing to do of course is to use a primitive.
So we make a list containing coords of where we’ve been for the past N steps, and then draw it. I’m not going to explain the intricacies of the drawing script but everything is very straightforward and you shouldn’t have problems figuring out how to use it.
When doing mouse decorations or trails, never have them snap to the mouse position! The mouse is a precise input device which is good most of the time but in the land of eyecandy it means jerky, ugly movements. Instead have the decoration follow slowly as I do here. It makes a world of difference.
Ribbon trails
Tags: effects, eyecandy, tutorials
Permalink Comments (5) GearGOD Oct 2, 2007
« Older Entries Newer Entries »