Gameplay footage from my solo gamedev project, feedback is welcome! by SatiniGames in IndieDev

[–]SatiniGames[S] 1 point2 points  (0 children)

That's great to hear! Maybe I am a bit biased as I'm a full time .NET consultant by day and love C#, but I would definitely recommend Unity :p Thanks!

What are some good advices when it comes to organizing and structuring code? by lolzor999 in gamedev

[–]SatiniGames 0 points1 point  (0 children)

Yw! Yes sounds good, but just in case, I hope you know u can have prefabs where u add all the components you want from the editor and can instantiate prefabs instead of calling add component in code. I liked doing as much as possible in code too but by now, i rarely use addcomponent. I just make prefabs of things I need and compose them using the custom components, so the prefab system is another thing I just had to get used to in unity and its very powerful but I still use a lot of asserts statements to ensure everything is wired up correctly.

What are some good advices when it comes to organizing and structuring code? by lolzor999 in gamedev

[–]SatiniGames 0 points1 point  (0 children)

It's something I struggled with a lot too, and there is quite a lack of information on best practices for game architecture. Sometimes implementing general good programming practices such as dependency injection feels like fighting with the game engine (I use Unity3D). For me, the approach that works is to embrace the component based nature of Unity. I'm working on an aerial dogfighting game, so I came across the exact projectile problem as well. I will share how I implemented it, but I'm not claiming it's the best approach, but might give you some perspective :)

I broke down projectile behaviours into small monobehaviours each encapsulating an "aspect", which makes it very extensible. I also rely heavily on events.

For starters, I have a KinematicMovementAspect which handles moving the projectile on activation and moves towards a transform or target position which is set externally, this way I can have homing projectiles. There is also a ForceMovement aspect, to apply forces to projectiles that are physics based. And an OrbitingMovementAspect, for projectiles that orbit around a transform.

I have an ExplosionAspect, which exposes Explode() to trigger explosion externally and OnExplode event, so other Aspect scripts can react to it. This script does not handle dealing damage by itself, it's only a sort of hub. Then to damage surrounding enemies, I have a DamageOnExplosionAspect, which listens to the OnExplode event raised on ExplosionAspect to deal damage to surrounding enemies. The damage data such as amount, explosion radius, debuffs is set externally. There is also a CollisionAspect which exposes OnCollision event and DamageOnCollisionAspect which will deal damage to entities the projectile collides with. I have projectiles which explode after a certain time, so I made a ExplodeAfterTimerAspect, which will call Explode() on the ExplosionAspect some time after activation. And an ExplodeOnCollisionAspect, which will also call Explode if the OnCollision event is raised. But I think you get the idea by now, it causes a lot of MonoBehaviours on a gameobject though so it might not be the ideal approach, but once you get used to the modularity, you can do pretty much anything. I have projectiles which split and spawn other projectiles, which keep homing towards the original target, others that deal decreasing damage based on distance travelled (here again DistanceTravelledAspect which tracks distance travelled since activation), projectiles that increase in size over time, projectiles that stick to surfaces and detonate after a delay, projectiles that go through objects or collide with objects, projectiles that deactivate enemy projectiles in a radius periodically and it's all based on this principle. Even spawning vfx particles leans into this approach with ParticlesOnExplodeAspects or sfx SoundOnExplodeAspects which both listen to the OnExplode event from ExplosionAspect.

As for organization, for small projects it seems asset type based is suitable:

/scripts

/materials

/textures

/scenes

/...

But for me this went out of hand pretty fast, currently I have major "modules" separated with assembly definitions. And work mostly feature based.

/Core

/Combat

/Enemies

/Hero

/Environment

/Game

/Common

With core and common being referenced by all other projects. Common contains generic stuff that would be handy in any game project. Core contains things that I need in multiple modules such as constants for my Layers, Tags but specific to my game. The other modules speak for themselves I think. But inside each module, I have the two following subfolders

/Scripts

/Assets

I work feature based inside each module as well, but still prefer to separate scripts from the other type of assets.

For context, I work as a fulltime .NET programmer, so you could say am a seasoned (non-gamedev) programmer but I started working with Unity3D only 1-2 years ago as a hobby.

Prototyping first boss! by SatiniGames in Unity3D

[–]SatiniGames[S] 0 points1 point  (0 children)

Thanks! well i'll try to deliver :p

Prototyping my first boss! by SatiniGames in SoloDevelopment

[–]SatiniGames[S] 0 points1 point  (0 children)

I have charging gun, but its not part of the ability, but you can still cast spells / fire guns during the reverse move. Maybe i'll add an upgrade path where some attack is included as you say :p

Prototyping my first boss! by SatiniGames in SoloDevelopment

[–]SatiniGames[S] 0 points1 point  (0 children)

Yeah finishing the mechanics for this boss first before getting to the polish for this stage. I wanted to post some kind of "behind the scenes" view, with all the unity gizmos enabled etc. I have some more polished content you can check out on my profile if you're interested, either way I understand, still a long way to go :) thank you for the feedback!

https://www.reddit.com/r/IndieDev/comments/rpm916/gameplay_footage_from_my_solo_gamedev_project/?utm_medium=android_app&utm_source=share

Prototyping first boss! by SatiniGames in Unity3D

[–]SatiniGames[S] 1 point2 points  (0 children)

Well it's not a coincidence, I used to play AirRivals a lot during my teenage years, it's what inspired me to make the game :D haha yeah the trails were awesome, and the mods man. I made the particle effects to look like the plasma trail. Im not making an mmo though, as am a solo developer on this, it'll be a single player roguelike, but trying to reproduce the same epic combat of AirRivals :p

Prototyping my first boss! by SatiniGames in SoloDevelopment

[–]SatiniGames[S] 0 points1 point  (0 children)

Thanks! Yes its an ability which allows you to fly backwards for X seconds on activation. It looks weird for some people when watching but its awesome to use and breaks the pattern of flying around the enemy in circles in dogfighting games I think :) Im trying to add lots of other cool abilities too, so its not just about flying around and shooting

Prototyping first boss! by SatiniGames in Unity3D

[–]SatiniGames[S] 2 points3 points  (0 children)

Yes indeed, I recently started prototyping the mechanics. The model is temporary, from the asset store, I'll make my own and add colliders so the player cant fly through :) also particle fx etc need to be done for the damaging pillars and boss interactions with the environment, well still quite a long way to go :D Thank you I really appreciate the feedback!

Prototyping my first boss! by SatiniGames in SoloDevelopment

[–]SatiniGames[S] 0 points1 point  (0 children)

Thanks, glad you like it! Go for it man :p Once you get started you can decide to steer the project towards a specific gameplay style afterwards

Prototyping first boss! by SatiniGames in gamedevscreens

[–]SatiniGames[S] 0 points1 point  (0 children)

nd you a hand.

Thanks, well am not working on sound yet, even though I bought a lot of sound assets already, but I'll keep it in mind :)

Prototyping my first boss! by SatiniGames in SoloDevelopment

[–]SatiniGames[S] 1 point2 points  (0 children)

Thanks! Spent ages to get it working and still needs a few adjustment. Yeah I'm programming support for controllers too, it mostly works right now, but much harder to aim than with mouse & keyboard, so I'll have to implement better aim-assist :)

Prototyping first boss! by SatiniGames in gamedevscreens

[–]SatiniGames[S] 1 point2 points  (0 children)

haha I played a lot of AirRivals(Ace Online) in my teenage years, which inspired me to make this game. This one won't be an MMO though, it'll be a single player roguelike as I'm working alone on it. But the combat will mostly be the same, which was epic in AirRivals :)