Tuesday, August 9, 2022
HomeGame Developmentunity - How one can construct a system for ammunition being fired...

unity – How one can construct a system for ammunition being fired out of cannons when participant characters and crewmates can be ammunition?


I am presently working in Unity constructing 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 fashionable Conflict Royale.

Screenshots of Dragon Quest Rocket Slime

The issue is, I do not know the way the sport ought to deal with the ‘firing lanes’ because of the truth that participant characters and crewmates can ALSO be fired out of cannons. After they attain the opposite finish, they will 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 symbolize the ‘firing lanes’ (which, within the preliminary DS sport, was visualized by the highest display) that might use tiny sprites to simulate when ammo has reached the opposite facet or not (and may very well be shot down if two opposing ammo collided), making use of the related injury or results upon reaching the tip efficiently.

The problem with that’s twofold – I am presently undecided HOW to construct this technique because of what number of transferring components it has – defining an ammo class could be considerably simple, 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 means to select up issues and throw them into the cannons’.

The second difficulty is with the participant characters and crewmates doubling as ammunition. I think about I may most likely make the cannons work together with the participant characters in another way, however the difficulty is how I can even apply some ammo properties to them as effectively on this theoretical ‘the cannons flip ammo into sprites’ scenario. Some participant characters may even have particular results when fired out of a cannon, making the distinction a bit extra difficult.
Might I simply… apply the ammo class to participant characters too that activate once they’re put right into a cannon?

What’s extra is, within the unique DS sport, if a participant character was shot down – they do not disappear like ammo, they merely fall to the bottom and take some injury. 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.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments