Posts Tagged ‘Examples’

Back From Thanksgiving

Monday, December 1st, 2008

I’m finally back from my Thanksgiving holiday at my parents’ house, and I can hardly believe it’s already December!  Where has this year gone?

Anyway, I had a couple of things I wanted to post today, the first being a duo of clips from The Simpsons, found earlier on Engadget (and which I assume aired last night), where Apple becomes the target of Matt Groening’s irreverent humor when the Springfield mall gets its first Mapple store.  The funniest part of the two clips is when Bart hijacks the audio system in the store and puts some (quite truthful) words into Steve Jobs’ Mobs’ mouth.  Good stuff!

Update - Well, the YouTube videos are down, but if you live in the U.S., you can watch for free on Hulu.

The next thing I wanted to post, also a video, is a new trailer released yesterday for the Black Mesa mod - a Half-Life 2 mod that is looking to recreate the original Half-Life with the Source engine, but with more content, higher resolution textures and models, and environments that take better advantage of the engine than Valve’s original port of the game.  Normally I don’t get too excited over Source engine mods, since they rarely make good on their promises, or even get finished for that matter, but the amount of polish that has gone into this trailer makes me hope otherwise for Black Mesa.  You can view the trailer below, and find out more about the mod at the official site.

I played through a huge chunk of Half-Life 2 this holiday weekend, so I guess I’m a little bit excited about Half-Life in general again.

I’m glad to see that people found my recent set of examples interesting too, and I hope to get a fixed GM6 version of the 3D Rain example up sometime tonight.  Sorry about the slow rain example, I’ll play with it and see if I can get something up that’s a little easier on the older machines soon as well!

That’s all for now - thanks for reading, and I hope everyone had a good Thanksgiving (or just a good weekend if you’re not from the U.S.)!

Update - I’ve made a new GM6 file that should run better than the previous rain example, and which should load correctly in GM6.  The area that the rain covers is a bit smaller than the original example, and the rain is a bit more sparse, but you should get the idea.

You can download the new example here (1.26 mb).

3D Rain Example

Wednesday, November 26th, 2008

One environmental effect I see many people have trouble with in Game Maker’s 3D is rain - how to create it and how to make it look like real rain (not just a bunch of textured walls).

I’ve seen some impressive rain in recent game releases, particularly Gears of War / Gears of War 2, and I wanted to try to create something like that in order to see if the effect is possible in Game Maker.  And of course, I also wanted to supply myself and others with a nice example.

After some fiddling around, I’ve come up with what I think is a good replication of the other rain effects I’ve seen in games like Gears, which runs reasonably fast, and isn’t too complicated under the hood.  My example uses large, moving 3D walls textured with rain, scrolling down repeatedly and rocking back and forth and side to side using sine wave-based movement.  The rain is composed of many objects placed around the level at the start of the game, and the camera disables objects dynamically as it moves around.  I’ve also thrown in a simple animated ground (could be better), and fake terrain backdrop (the same as the one in my night sky example), and a skybox (courtesy of Yourself).

The example also uses a rudimentary FPS-style of controls / mouselook as well, but I just threw this in there to help show off the scene, so if you find a problem with that, please disregard it.

You can download the example here (2.5 mb).

Note: This example, for whatever reason, if only working with GM7 at the moment.  As soon as I have a chance to figure out why GM6 hates it, I’ll update the link with a fixed GM6 file.

Please use this example for learning purposes only, and don’t pull anything directly out of it to use for your own work (including textures) without first asking me about it.  Anyway, thanks for reading and enjoy!

3D Night Sky Example

Wednesday, November 26th, 2008

After spending some time reading a recently posted topic on the GMC asking about how to create a night sky in 3D, I decided I’d try my hand at making a simple example using a technique mentioned in that topic - using a model created as a pointlist to render stars.  I ended up liking the result very much, so I wanted to share it with everyone here.

Basically, at the start of the game (or more specifically, when the camera object is created), I’ve set up a script which creates models for a sky dome, a background pseudo-terrain, and stars.  These are drawn as you would draw a skybox, so they all appear in the background of whatever you’re doing in your game.

I’ve set up a simple FPS-style camera system for this demo, but it’s very crude, so don’t hold me accountable for that, please.  You can use your mouse to look around, and W, A, S, and D to move around.  F4 will toggle fullscreen mode, and ESC will exit.

You can download the example here (279 kb).

I’d appreciate it if this example were used for learning purposes only, and that you do not use any of the textures from it without first asking permission.  With that said, enjoy!

Faux Mode 7 Example

Saturday, September 6th, 2008

After having a short conversation with the people in this topic at the GMC, and seeing various other threads around there on the same subject, I decided I’d create an example GMK (and GM6, courtesy of LGM) to show people how to make a game that looks like the Mode 7 style graphics found on the SNES.

Let me note from the outset - this example does not emulate Mode 7 graphics.  Mode 7 was a special function the SNES had to scale, rotate, and distort backgrounds as they were drawn, and this example does not do this.  It may be possible to recreate Mode 7’s functions using surfaces, but it would be a waste of time and energy to try to emulate this system using Game Maker.  So instead, I am providing this example and the following list of style rules to demonstrate that if you adhere to certain self-imposed rules / restrictions, you can make games that look very similar to the old SNES classics without having to kludge together ridiculous graphics emulations.

I’m going to use Super Mario Kart as my guide - other games in the SNES library which made use of similar Mode 7 effects (like Pilotwings, for instance) may have broken the rules I will put forth, but you can be the judge of whether or not a certain visual technique breaks the feeling of the Mode 7 style (if there truly is such a thing).  With that said, here’s the list:

  • Flat ground / terrain - aside from players and a few obstacles, everything drawn in 3D is flat and usually textured.  Terrain receding into the distance is usually a repeated pattern.  The player’s domain is typically a well-detailed and large graphic.
  • Fixed camera height and angle - the camera in the game never changes altitude, and never changes the vertical angle it views the world from.
  • Sprite-based objects - even though the game world was presented as a 3D land mass, players, objects, and everything else was rendered as a 2D sprite.
  • 2D background - no skyboxes in Mario Kart!  Backgrounds are flat, and scroll parallax style.
  • No interpolation - the SNES couldn’t interpolate colors between pixels, and this was very evident in Mode 7 distortions.  Turn it off.

That’s pretty much it.  The example I’ve made doesn’t include everything from the list, but I think it’s a pretty good example of how the Mode 7 effect can be created in Game Maker using regular old D3D.

You can download the example here (94 Kb).

Please use this example for learning only, and do not build off of it without asking permission from me first.  Enjoy!

Animated Texture Water Example

Wednesday, August 20th, 2008

I was recently Looking over my old water example, and I decided I could make something that looks a little better.  So I dove into Game Maker (and Photoshop of course) and produced, what I feel, is a much nicer and more realistic water effect.

This water still doesn’t use any other geometry other than planes to create the effect (ie, no actual wave effects), but the new animated texture adds a new level of detail that my previous example just couldn’t pull off with only a few layers of static textures.  I used a similar texture in my old fishing game demo, and I am planning on posting a full tutorial on how to create the effect in Photoshop soon.

The 3D example also includes code for a skybox (courtesy of Yourself), and I will post a tutorial in the future on how to create compatible skybox textures with Terragen as well, too.

Anyway, the zip includes a 2D and 3D version of the example, for both GM6 and GM7.  I’d appreciate that you use this for learning only - so don’t use the artwork (animations / skybox) without obtaining permission from me first, please!

Download here (3.68 Mb) and enjoy!