Ever notice that in ladder games, when you hover over a unit with your mouse and left-click it selects that unit (I would certainly hope you have)? Well you can spawn 1000 units randomly around the map at all different heights and set your camera to any yaw, pitch, FoV an/or height offset you want and still click on units in 3-D space, with the the frontmost unit being selected (won't select units behind it from the observers point of view).
So, is there any way we can exploit this in-game feature to circumvent the need for tracelines?
what about shots that 'miss'. The workaround is painting the entire game area with flat invisible units and it's messy and hardware intensive (ie, impractical)
Although they are easy to make, I wonder if the blizzard version is more memory efficient than the 50-200 checks per game loop required for a good traceline.
The blizzard version is internal and not accessible by Galaxy script.
Also, if you really need to check a 200-step traceline (Holy hell that's got to have a range many screens long, and that's if it's precise! The entire map's width is covered if it's a rough check...) on every single game loop the entire time, you're probably doing something wrong.
However, it does not appear to be a much of an issue. My whole physics system is done in GUI (squished and optimized with a third-party program afterwards, granted). My physics engine does not use any instant tracelines, but rather just performs the physics on objects 32 times per second. Even with many hundred objects, it runs perfectly on my computer and lags moderately on battle.net (that's including all the EXTENSIVE UI coding). At a couple hundred objects, it runs perfectly on just about any computer and doesn't lag at all except in large (many players) games.
The author gave me a private license to it, so it's up to him to give it out when he decides to release. Quite a few programs have been developed specifically for Mafia, interestingly enough.
I'm honored that the creator of my favorite Starcraft 2 custom game replied to my post. I've talked with you in the mafia channel a few times, my name is Solomon.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Ever notice that in ladder games, when you hover over a unit with your mouse and left-click it selects that unit (I would certainly hope you have)? Well you can spawn 1000 units randomly around the map at all different heights and set your camera to any yaw, pitch, FoV an/or height offset you want and still click on units in 3-D space, with the the frontmost unit being selected (won't select units behind it from the observers point of view).
So, is there any way we can exploit this in-game feature to circumvent the need for tracelines?
@EdwardSolomon: Go
what about shots that 'miss'. The workaround is painting the entire game area with flat invisible units and it's messy and hardware intensive (ie, impractical)
@PirateArcade | I make games | Ask me things on Discord
@greythepirate: Go
A trace algorithm is very easy to make. There's no reason to use such a workaround.
@DarkRevenantX: Go
Although they are easy to make, I wonder if the blizzard version is more memory efficient than the 50-200 checks per game loop required for a good traceline.
The blizzard version is internal and not accessible by Galaxy script.
Also, if you really need to check a 200-step traceline (Holy hell that's got to have a range many screens long, and that's if it's precise! The entire map's width is covered if it's a rough check...) on every single game loop the entire time, you're probably doing something wrong.
However, it does not appear to be a much of an issue. My whole physics system is done in GUI (squished and optimized with a third-party program afterwards, granted). My physics engine does not use any instant tracelines, but rather just performs the physics on objects 32 times per second. Even with many hundred objects, it runs perfectly on my computer and lags moderately on battle.net (that's including all the EXTENSIVE UI coding). At a couple hundred objects, it runs perfectly on just about any computer and doesn't lag at all except in large (many players) games.
Don't even need to code a traceline. Just make a highlight system using the centered mouse, which is just as good if not better for the sc2 engine.
Then use 2d UI for muzzle fire and the weapon.
Any chance you'd share?
The author gave me a private license to it, so it's up to him to give it out when he decides to release. Quite a few programs have been developed specifically for Mafia, interestingly enough.
@DarkRevenantX: Go
Perhaps he'd be willing to let me use it. So can you either tell me who he is or ask him for me?
@DarkRevenantX: Go
There's a physics engine in Mafia?? Of all things...
Why?
No, I didn't put it in Mafia. I made this engine in December, and recently tested it again with the optimizer and without sounds.
@DarkRevenantX: Go
I'm honored that the creator of my favorite Starcraft 2 custom game replied to my post. I've talked with you in the mafia channel a few times, my name is Solomon.