Wane - A 2D Pixel Art Adventure Game#
This blog post illustrates the development of Wane.
Development Process#
the 2D pixel art adventure game Wane. Embark on an extraordinary journey as a fearless soldier, determined to protect the realm from menacing monsters lurking in the vast desert.
Wane was brought to life through the powerful Unity game engine and the magic of C# programming. As the sole developer of the game, I meticulously crafted each aspect of the gameplay, from character movement and combat mechanics to enemy AI and level design.
Utilizing Unity’s versatile scripting capabilities, I programmed the soldier’s movement, making sure every step felt fluid and responsive. I implemented a sophisticated combat system that allowed players to engage in thrilling swordplay with precise attacks and parries.
The captivating desert landscape in Wane was meticulously handcrafted using Photoshop. I drew inspiration from real desert terrain and infused it with fantastical elements to create an immersive and visually stunning world.
Picture Showcase
A glimpse of the Source Code#
```
---
PlayerMovement.cs
EnemyBehavior.cs
EnemySpawner
public GameObject enemyPrefab; // The enemy prefab that will be spawned public float spawnInterval = if; // The interval at which enemies will be spawned public int maxEnemies = 5; // The maximum number of enemies that can exist at once public Transform[] spawnPoints; // The spawn points where enemies will be spawned public float cooldownTime = 10; // The amount of time between waves of enemies
public List<GameObject> activeEnemies = new List<GameObject>(); // A list of active enemies in the scene
private bool isCooling Down = false; // Whether the spawner is currently on cooldown
Unity Message | O references
private void Start()
{
StartCoroutine (SpawnEnemies());
}
private IEnumerator SpawnEnemies()
{
while (true)
{
if (activeEnemies. Count < maxEnemies && !isCoolingDown)
{
// Randomly select a spawn point
Transform spawnPoint = spawnPoints [Random.Range(0, spawnPoints.Length)];
// Spawn the enemy at the selected spawn point
GameObject enemy = Instantiate (enemyPrefab, spawnPoint.position, spawnPoint.rotation);
// Add the enemy to the list of active enemies activeEnemies.Add(enemy);
yield return new WaitForSeconds (spawnInterval);
}
}
---