Sunday, June 26, 2022
HomeGame Developmentunity - What's the easiest way to construct a system for ammunition...

unity – What’s the easiest way to construct a system for ammunition being fired out of cannons when participant characters and crewmates will also be ammunition?


I am at present working in Unity and there is a scenario I am not skilled sufficient to determine the very best answer for.
I am at present making an attempt to construct a sport impressed by the area of interest DS sport, Dragon Quest Rocket Slime. It is a Zelda-like forced-perspective top-down sport the place the first fight mode is you bodily working round on a tank to throw ammo into cannons to fireside them down ‘lanes’, nearly like a real-time card battler within the veins of the trendy Conflict Royale.

The issue is, I do not know what the easiest way to develop the best way the sport ought to deal with the ‘firing lanes’ attributable to the truth that participant characters and crewmates can ALSO be fired out of cannons. After they attain the opposite finish, they’re going to land within the enemy ship to trigger mayhem, steal ammo or sabotage their ammo dispensers.

I am pretty rusty at programming, however my preliminary ideas have been making a separate UI-element to characterize the ‘firing lanes’ (which, within the preliminary DS sport, was visualized by the highest display screen) that might use tiny sprites to simulate when ammo has reached the opposite aspect or not (and could possibly be shot down if two opposing ammo collided), making use of the related harm or results upon reaching the top efficiently.

enter image description here

The problem with that’s twofold – I am at present undecided HOW to construct this method attributable to what number of shifting elements it has – defining an ammo class could be considerably easy, however getting the cannon to take the ammo, spawn the ammo within the flight path with the stats the ammo has and simulate all of it, I do not fairly know the place to even start as I am nonetheless within the technique of constructing the core motion techniques and the all-important ‘precise potential to choose up issues and throw them into the cannons’.

The second situation is with the participant characters and crewmates doubling as ammunition. I think about I might in all probability make the cannons work together with the participant characters in a different way, however the situation is how I may apply some ammo properties to them as nicely on this theoretical ‘the cannons flip ammo into sprites’ scenario. Some participant characters might even have particular results when fired out of a cannon, making the distinction a bit extra sophisticated.
May I simply… apply the ammo class to participant characters too that activate after they’re put right into a cannon?
What’s extra is, within the authentic DS sport, if a participant character was shot down – they do not disappear like ammo, they merely fall to the bottom and take some harm. In contrast to the ammo, they cannot be despawned so simply, and, IDEALLY, they’d additionally land on the bottom proportional to how far they’ve travelled in a firing lane.

I perceive that I am reasonably inexperienced with the constructing of techniques at present, particularly with out the bevy of assorted youtube tutorial movies to assist maintain my hand, however I wish to know the way I might go about tackling this particular design downside, particularly from an ‘really making all of the techniques concerned’ perspective.
Thanks to your time!

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments