SC2 Strat Javascript

Started by Bagr, March 14, 2010, 03:09:49 PM

Previous topic - Next topic

Bagr

Hello community,

I made a javascript to try out some builds while I was away from my home computer. I shared it with some friends who all told me to make it public, so here it is, if anyone finds it useful...

http://www.lava-gaming.com/

-Bagr

CTS_AE

#1
That's cool, it's a bit confusing, but that's awesome : )

there should be like a timer or something for like a countdown as well as how long the game has been running ; )

Edit: okay you have to click on fast for the tickers to start

It just takes some time to get used to, but I did post on your reply system you left on the emu.

rehvan77

really cool thanks man been lookin for something like this

j4vz

#3
i had a similiar idea a couple of day ago, to do a game analysis engine kinda like rybka or fritz for chess... to make infinite analysis based on time elapsed, testing out all the possible move for each race.

of course not in javascript... any language that support multithreading would be adequate.

but im lazy and i would need a huge team to determine the accurate strenght value for each unit/building and to work on a project of this size....

...


you should do an opening explorer like this: http://www.chessgames.com/perl/explorer
with a replay database from elite tournament.

I dont know how you like that idea, but if some people are interested in doing a project like this, just contact me, if there is a lot of people interested it might motivate me... i mean for the analysis engine and the opening explorer...  8)






Nostrada

Nice work. There's a major bug you should fix though.
Mineral counter glitches sometimes and says "NaN".

QuoteThe NaN property represents "Not-a-Number" value. This property   indicates that a value is not a legal number.

I'll look into the source code tomorrow if I'll have some spare time.

Bagr

CTS_AE : thanks alot for your feedback, I'll work on it tomorrow.Nostrada: Yeah, it's the same problem CTS_AE pointed out, max probe count for minerals are 21 atm, since I've only done tests with up to that many probes. any more probes will give an unvalid amount of increase.
//                                           6                          10     11     12     13     14     15                                      20
var pp=['0','0.75','1.5','2.1','2.85','3.5','4.25','4,95','5.65','6.35','6.90','7.54','8.18','8.80','9.42','10.00','10.56','11.10','11.60','12.10','12.60','14.60'];
are the numbers I've gotten so far, if anyone wants to double check them, or check amount gathered for more probes, please post your finds and ill update the script.

Tresh

Thats a neat idea, but a quick tip, rather than using src='#', use src='javascript::void(null)'

Kouga

kinda confusing but great work though

Bagr

Tresh: thanks, updated it
Kouga: yeah, sorry, made it primarily for my own use ^^ , got any tips to make it more user friendly?

Tresh

When i click on a button, i can write, is that made on purpose?
Also, the queue box doesn't expand.

If you send me the source i'd be happy to try and improve it. Im loving this tool ;)

Luxus

Yo first of all nice tool  :D

But then again chrono boost?  :'(

CTS_AE

Quote from: j4vz on March 14, 2010, 05:20:33 PM
i had a similiar idea a couple of day ago, to do a game analysis engine kinda like rybka or fritz for chess... to make infinite analysis based on time elapsed, testing out all the possible move for each race.

of course not in javascript... any language that support multithreading would be adequate.

but im lazy and i would need a huge team to determine the accurate strenght value for each unit/building and to work on a project of this size....

...

That sounds like a crazy awesome idea, but ofcourse it'd be more complicated than a game of chest and more complicated than was is posted here.  I mean you could collect alot of data from player games, or you'd pretty much have to have your own AI's with different themes they could select from.  Then you could figure out what best "theme" suits different maps : )


you should do an opening explorer like this: http://www.chessgames.com/perl/explorer
with a replay database from elite tournament.

I dont know how you like that idea, but if some people are interested in doing a project like this, just contact me, if there is a lot of people interested it might motivate me... i mean for the analysis engine and the opening explorer...  8)

Bagr

Tresh: yeah, each button is a input type=text, with a background showing off the builing. It was the easiest way to implement hotkeys for builing when i started out ^^
and haha, no, the queue box is meant to expand, but I must have messed up somewhere, gonna fix it when i have time

(the source is open, using files ./style.css , ./sc2.js and ofcourse ./index.php, no php included, just a counter at the bottom)


Luxus: oO forgot it completely..


Chrono boost issues:
anyone? how many seconds does it take for a nexus to charge to 100   energy, and what speed were you testing on?

(notes for myself)
should be easy to implement, retract 2 seconds instead of 1, on anything being built from a building with chrono buff, take into account count(buff) and count(building) so we can't boost 8 gateways with 1 buff...
anything i missed?

CTS_AE: The main idea behind the script.. (long story) is a competition that was just being held for BW, where someone made a time build with medics, Optical Flare, vultures, mines and communication addon VS protos to take out the observers and harrass the scv's. I made this script to find the fastest way to different builds (preset from a form).. half way through, as j4vz said, javascript sucks for multithreading, so i went in a new direction, trying to make the game 2player, where you could fight eachother (if you check the sourcecode, you can see a
#mapwrapper {
....
}
#map {
....
background-image: url('images/steppesofwar.gif');
}
I played with it a bit, but found the micro would be microscopic.. Anyone have any ideas how to make this a realistic 2player battle game, post your ideas (i know we will have to implement either a applet or ajax support..) but how to make it gameplay like in a battle?

Reelix

Make an enemy attack, make it load simple Zerg0.galaxy files, and you have browser-based starcraft!

Woot :p

- Reelix

Bagr

Reelix: haha, fun idea ^^ having an AI do a specific buildorder shouldn't be too much work to do, but how do you feel the attack function should work? at the moment of mouseclick, calculate attackforce and defenceforce of the full army of each oposition and have a winner declared? or something much more interesting involving skill in the fight itself?

ideas please ^^