MOBA Help

wowza… honestly, I wasn’t expecting a full blown prototype straight away… I was thinking there was going to be more of a discussion at hand, to figure out what exactly I was after… but this looks like, with a bit of tweaking… what I need to do the job, so thanking you roaminggamer for your insight!

funnily enough, what you have posted is somewhat similar to concepts I have already divulged. I suppose as a side question… what exactly is SSK, and how is that coming into play here???

just to add on, this is more to the point what I’m trying to accomplish, as heading roaminggamer’s advice with time stamping a video.

so, if you go to this video, it’s a mod that was made for starcraft, called nexus war, which is effectively what I want to try and replicate.

here’s the link: https://www.youtube.com/watch?v=bUxpO7D8IaU

and you’re looking at 16:33 in the video, as you can see there is ground troops, air troops, stealth troops, I want to be able to encompass all these things on a smaller scale I am going to presume.

thanks again.

Ed’s prototype gets you going pretty well with this.

If you are thinking of creating a Nexus Wars like “2D clone” using Corona, then you’ll have to come up with how to implement those various mechanics. Using physics, as already mentioned, is probably not a good idea as it would turn quite cumbersome very fast.

There are a lot of optimising that you could do. Using that Starcraft 2 style, you could give each unit a circular “aggro field”. If an enemy enters within a certain distance to them, then the unit begins to attack that enemy until they are destroyed. You could use the Pythagoras theorem to calculate that distance. Then include those special if-clauses for how that unit will attack. For instance, if a flying unit enters a melee unit’s aggro field then nothing happens as melee units cant attack air units, but if any non-stealthed unit enters a ranged unit’s aggro field, then they stop moving and start attacking until that enemy is destroyed. During this phase, the unit wouldn’t have to perform any aggro field calculations as it would be focused on attacking. Once the enemy dies, then resume the movement and tracking, etc.

Now, some further optimising tricks could be that you track where the furthest units for both players are. If you account for their attack ranges, then you know for certain that no units behind them can actually reach the enemy and therefore you don’t need to track their aggro fields. This would mean that even if you have hundreds or thousands of units on the map, you’d only perform those aggro field calculations for the units at the front lines.

Everything ultimately depends on your plans, i.e. what you want and how you decide to implement everything.

thanks for the reply Xedur, in actual fact, your last paragraph there on calculating aggro check on the furtherest unit makes an abundance of sense… that could potentially free up a whole bunch of memory issues that I am currently facing as I believe the problems I am currently facing is I am checking every single units aggro circle, at all times causing for huge memory issues.

so thanking you once again Xedur, that might just do the trick. really appreciate it :D 

re: SSK

SSK (https://roaminggamer.github.io/RGDocs/pages/SSK2/) is my own free library of solutions for common dev problems.

It has been around for about 6 years here (and comes from my original SSK library for Torque).

It is not perfect, but it is pretty solid.  Peruse the docs to see some of what it offers.

I never code w/o it.

re: The Video

You’re going to learn how to do basic vector math to accomplish that kind of behavior.  Aiming, firing, facing, …

You’re also going to have to implement some kind of path finding code (try jumper) to allow units to walk around complex area, objects, and avoid each other.

You’ll need to learn how to code up camera code and understand how to drag the world or select a position from a mini-map and have that choose the camera focus/center.

There is a bunch of interface work there too.

Then of course, you’ll need to learn how to give metrics to units and probably some basic state-machines to govern their behavior.

There is, much, much, …, more, but that was at first glance.