1hr Prototype Challenge: RPG, Food

I’m not sure how I feel about this project, it’s not the most impressive out of everything that’s been made so far in these challenges. However, I have still learned some stuff and managed to at least create a template for something I could later “make good”.

The Idea

The theme this week was food & the genre was RPG, so I’m going to start by telling you the idea I had… This little doughnut warrior:


Has no sprinkles, and the only way he can get sprinkles is by killing the various waves of food & sweets charging at him. An endless wave of enemies come towards the player and progressively get stronger and faster. When the enemy comes in contact with the doughnut they would start draining the players health, at this point you tap to attack the enemy. So, in a nutshell it was a doughnuts quest to earn its sprinkles in an endless tap frenzy battle. Once I had the main game in place I planned on adding a very simple home screen that allowed the player to upgrade stats (strength: attack, speed: movement, Health increase).

I think the idea isn’t too bad, very simple but it could be a fun little game to waste some time on and its easily expandable…

What I achieved


Well I got the doughnut moving and managed to create a spawn system that randomly selects an enemy to instantiate. The enemies move towards the player and some of the battle code is in place, it is missing a few of the finer features that would improve it greatly but I managed to at least create a template for this type of game.

The greatest thing to come of this project is probably the spawn system for the enemies, it’s very simple but could be reused and extended for these types of games. Here’s a little look at the script:

public class enemySpawn : MonoBehaviour {

public GameObject[] enemies; //reference to each enemy (prefabs)
public float spawnTimer = 4.5f; //interval between each spawn

void Start ()
   InvokeRepeating("SpawnThem", 1f, spawnTimer); //spawn first in 1s, rest use spawn time

void SpawnThem ()
   Instantiate(enemies[Random.Range(0, enemies.Length)], this.transform.position, Quaternion.identity); //spawn a random enemy
   spawnTimer -= 0.2f; //decrease the spawn timer
   if (spawnTimer <= 0.5f) //spawn timer cap
     spawnTimer = 0.5f; //spawn timer cap


It simply calls the spawnThem function continuously with breaks between each call. The function itself just spawns a random enemy based on the length of the enemies array and decreases the timer so the next enemy spawns in a lot faster. This could easily be added to and include enemy types (difficulties), delays & a variety of tweaks to the spawning system could be made to change how the game flows. This is certainly a script I should keep handy if I ever want to create a game like this one^

What I missed

As I said there’s some things that didn’t make it into this prototype that I would have liked to see, it’s much more convenient if I bullet point this for you:

  • Enemy HP bars: the enemies were supposed to have bars above their head displaying their health
  • Sprinkles: A sprinkle added each time you get a kill – it was a little more difficult than I thought, more than a 5min job anyway
  • Doughnut attack anim: a simple slash of a sword (probably a breadstick) each time you tap
  • Background & floor assets: make the environment look a little nicer huh?

I think there’s one main reason as to why I didn’t get as far as I’d like and that’s because I spent the first 30m of development creating the art assets and placeholder run anim. Usually in these projects I start with boxes, get everything working then add graphics this once I worked the other way around and I don’t think it played in my favour. Additionally, 2D art is probably my least developed talent (I’m not too good at it), I enjoy art especially 3D but I thought since most projects so far have been 3D I’d try the other dimension for a change. I probably won’t make that decision again unless I have a lot more time to work on the visuals.

I still enjoyed this project even if it didn’t meet my original expectations, and it’s given me a lot of useful code I can use in future projects so that’s a bonus. Hopefully I won’t make these mistakes again; I can save a lot of time if I avoid a few of the pitfalls in this project.

Until the next post…

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s