Mini (Game) Beginnings

This entry is part 15 of 15 in the series Game Development

Previously On IT Ninja . . .

Last time I tackled the player’s inventory and the items held within. It was a monumental task that required creativity to solve. Now it’s time to add a pivotal mini game, but first I must add in a bit of gameplay to work up to the mini game itself. So without further ado. . . let’s get started!

And Now On IT Ninja . . .

The Job Board

The minigame will require the player to to go a specific location and choose one of three items that are randomly generated. This means a whole new set of scripts and game objects associated with it. So far that’s been pretty easy. I just added a new canvas with an image, stretched it to fill the screen and hooked that into my UI script for pause/time control. This item will only exist in one place within the game world, which will make it a bit easier to deal with.

The Jobs on the Board

Now that I have my image, I need three new game objects to play with. Just a simple graphic with some text areas I can modify. Put a simple sprite shape under it to use as an outline, then duplicate it all a couple times to fill the board. Now I gotta write up a script to associate with those things . . .

Random Jobs

That was a lot more difficult than I expected. I have a feeling I’m totally doing things wrong, but I’m doing them the best that I know how. Again, I need to keep it simple, for my own sanity. But I’ve got it done, and I’ve got a (not so easy) way to add more options. Of course, I haven’t tested it yet, so it’s very possible it doesn’t work.

Testing Failure

And as I expected, nothing works. Eventually, I got the whole random job ticket part working. Yay me! But none of the rest of the functionality works. For some reason I can’t get the OnClick even to fire, nor detect a mouseover. . . I think I need to rebuild the GameObject in the world.

And amazingly enough that is all it took. I removed a portion of the game object and recreated it a bit differently and now it works, mostly. Originally, I started with an image and tried adding functionality to it, but this time I started with a UI button and modified that to look how I want. It’s great when things work!

Of course, even when some things work, others don’t. But with enough testing you can figure out what is happening and then fix that problem. Then you’ll find another issue, test some more, and fix it. And so on. . . But now, this whole new subsystem is working the way I want. Man, I almost forgot to add sound effects! I have to remember how important sound is. . .

Let the (Mini) Games Begin!

All this, and still no mini game? Yeah, I needed to make a lead-up to the actual mini game itself. This way, you have to go seek out the mini game in some other portion of the world. Of course, I once again have to build a new prefab. Luckily, it shouldn’t be too hard to start, although I’m not exactly sure how to do any of what I want.

I started with a rudimentary script, threw in a few variables and functions I knew I’d need. Simple stuff like collision/key detection, show/hide the game canvas, etc. Now comes the hard part, putting together the actual mini game(s). And that requires art, art that I don’t have. Art that I can’t find! Uh oh . . .

Next Time On IT Ninja . . .

So at this point I’ve got the beginning of a mini game system. But I still haven’t even built the mini game yet! What’s up with that? Well, maybe next time I’ll do just that. It’s gonna take a bit of work to do what I’ve envisioned. I know I say keep it simple, make it work, improve it later. But this one kind of needs more than that.

Series Navigation<< Items and Inventory

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.