I heard about the GameDev challenge quite a while ago but I wasn't sure if I'd have enough time to complete an entry. This weekend I decided to give it a go. I was planning on just working on it in secret and submitting it if I succeeded... But apparently some gamedev people read my twitter feed so the cat's out of the bag now. It's due on June 1st so I didn't give myself much time to complete it. Here's hoping I can complete it in time since @Rutin found out my secret on twitter. >.<
I made decent progress on Sunday and Monday. It's definitely not a game yet but the basics are starting to come together.
I have a simple menu, Move Patterns, Shoot Patterns, Enemies, and Collision working. I still need to do Enemy Waves, Levels, SoundEffects, Music, Powerups, and polish. Sounds like a lot but I think I have the tough problems solved, and I'm using a bunch of assets from a Humble Bundle so it should come together pretty quickly.
Scriptable Objects
I try to data drive my programs and I was planning on doing it with XML again. However, Unity made some improvements to ScriptableObjects over the last few versions so I thought I'd give Unity's them a try for this simple project. I really hate the name ScriptableObject... The name gave me a mental block which made it harder to learn the system. I wish they would have called it DataObject or something similar. It's just a data file, but the name ScriptableObject threw me for a loop. Learn more about them here: https://learn.unity.com/tutorial/live-sessions-on-scripting#5c7f8528edbc2a002053b629
I have a simple MovePattern class which is one segment of a MoveSequence. It has a duration, a direction, and a speed. A sequence is made up of a list of MovePatterns and lets you specify whether its play once or a loop. Here is what it looks like:
I have similar data structures for Shooting, and enemy spawning. An Enemy is made up of a sprite, a move pattern, and a shoot pattern. We just reference these ScriptableObjects(data files) the same way we'd point to a prefab on disk. When I release the game, I'll put my code in a zip or git repo where anyone can download and mess with it.
I like how easy it is to use the ScriptableObjects to throw something together. You can use the editor to create new data files and configure them in the inspector. However the end user won't be able to edit these things without jumping through a few hoops. If it was just an xml or json file in the StreamingAssets folder the end user could easily just edit those files and mod your game. For real applications I'll probably stick to actual data files instead of ScriptableObjects but for some quick and dirty stuff like a game jam, this was pretty slick.
Next up - project Autoduel?