Thursday, June 30, 2011

Scripting in Game Maker

"It needs more work to be playable..."

Most of the work thus far has been making scripted events, and assets for said events. I suppose I could speak of how I'm doing scripted events in Game Maker, in case it'd be useful for other Game Maker users.

Because I'm not really a programmer, I wasn't sure about how to go about scripted events at first. I considered using Switches to do it, and it worked! However...

So I scrapped that form of event. I knew that some people used Lua for scripted events, but I've never worked with it before! I wanted to attempt something else before trying to learn it. So, through some experimenting, and some help from Chris P. Bacon (dude who worked on Gang Garrison 2), I went went with this solution, and am still using it today.

Game Maker's built in timelines! If you don't know, when you start one of these they go through a list of actions at the frames you specify. (Step 56 would run on the 56th frame after you started the timeline, for example.) All I needed to do was to force the timeline to stay at any particular step I wanted, and...

Voila, it's a scripted event in a tidier fashion than using switches! Whenever next_action() is run, it'll automatically go to the next Step of the Timeline.

On the downside, I still have to type more than, say, making a program that outputs scripted events for me. On the plus side, I have plenty of control since I can code stuff on the fly.

Wednesday, June 22, 2011

Boss Test