On November 29 2012 03:01 sluggaslamoo wrote: Impossible.
The logistics of transferring more than 100MB of spritesheets every time you load the game would make it unviable.
Performance is no problem at all. Running it in a browser or not makes no difference, you can run full 3d games in a browser no problem, the issue is transferring all that data (which is why most big games don't run in a browser), you may as well make it an installable game.
I'm curious to why transferring 100 mb every time you run the game would make it impossible, instead of inconvenient.
And I'm curious as to how performance would be no problem at all. Performance would only be no problem if the code was modified specifically for browser usage. Outside of that, not a single version of windows emulation has been able to emulate it without latency issues.
@question 1: Okay, inconvenient, not impossible. But it is practically impossible. Someone also mentioned dynamic loading, unfortunately for a game such as starcraft, most if not all of the graphics need to be loaded before the game can be run. Something like an RPG would be much more suitable to dynamic loading.
@question 2: Its not emulation. It would be more than 10 times, if not 100 times faster if you remade it because you can run hardware accelerated graphics and that is where the main bottleneck is. OpenGL would piss all over the bitmap blitting that was used in traditional Starcraft, you could render 10,000 sprites without your computer breaking a sweat. V8 Javascript is also really damn fast, not as fast as C, but its also not the main bottleneck.
The core of starcraft, without the single player campaign, all the music, videos etc, just what you need to play multiplayer is about 20-30 megs, it's been done before with sclite, i used to stick it on a 128 mb usb key and play it on the go in college. HTML5 specifies a cache for file storage in a browser around 10 mb (forget exact specification) still not close enough, and as someone mentioned early, really smart caching won't cut it, you need that 30 megs in memory accessible at all times. Someone earlier mentioned websockets for multiplayer support, again the standard isn't mature enough, nor is the backend server support (see node.js, which is js only) unless you rewrote chunks of starcrafts network code from scratch in javascript, good luck.
Making a starcraft 2 port with pure HTML5 isn't viable, without making some severe compromises and lengthy developer time. Fortunately you don't have to, chrome has native support for c and c++, converting to said languages from others is very doable.
Wow, WarCraft actually works. And since there is no way they had the source code, this means some nerd reverse engineered it and ported it.
Pretty sure it was already done a long time ago in freecraft. Warcraft 2 logic is extremely simple compared to starcraft though.
I don't want to port StarCraft to Java Script (Which I think is what this guy did to WarCraft II, since it runs in a browser). I just want to reverse engineer it so I can add features. It'll still be C++, just like the original.
As a programmer of a few network games I can tell you that it's most likely too server intensive (latency would be terrible when you use website URL calls instead of plain optimized network packets).
The problem is that strategy games require you to poll every time and await a result (a few times a second preferably). While 3D shooters poll the same way, they can skip a few poll iterations of the networked game loop because it will catch up in the end (and retrace the missing steps) and usually not influence the game outcome. With strategy games this is very different, the information send from one to another can not be lost or ignored, because it might change the outcome of the game for one player.
Luckily there are some languages that can exert more control over this, so by using such languages it could be possible, but it's very time consuming even if you manage to get the source code.
Wow, WarCraft actually works. And since there is no way they had the source code, this means some nerd reverse engineered it and ported it.
Pretty sure it was already done a long time ago in freecraft. Warcraft 2 logic is extremely simple compared to starcraft though.
I don't want to port StarCraft to Java Script (Which I think is what this guy did to WarCraft II, since it runs in a browser). I just want to reverse engineer it so I can add features. It'll still be C++, just like the original.
I'm pretty sure it's a Java applet, not Java Script.
But an in-browser version would definitely be badass.
Wow, WarCraft actually works. And since there is no way they had the source code, this means some nerd reverse engineered it and ported it.
Pretty sure it was already done a long time ago in freecraft. Warcraft 2 logic is extremely simple compared to starcraft though.
I don't want to port StarCraft to Java Script (Which I think is what this guy did to WarCraft II, since it runs in a browser). I just want to reverse engineer it so I can add features. It'll still be C++, just like the original.
You can't reverse engineer the machine code into C++. Its possible, but not for something like Starcraft.
You can't run C++ on the client side.
Even if you could, you would be defeating the entire purpose of your project. The low level code is what is causing the cross-platform problems. It would take you an eternity to understand the old code and rewrite it to work for Windows 7. If you want it to be more cross-platform, then Javascript/JavaApplet would be the way to go.
However this project might take you 2 years to complete at least.
Wow, WarCraft actually works. And since there is no way they had the source code, this means some nerd reverse engineered it and ported it.
Pretty sure it was already done a long time ago in freecraft. Warcraft 2 logic is extremely simple compared to starcraft though.
I don't want to port StarCraft to Java Script (Which I think is what this guy did to WarCraft II, since it runs in a browser). I just want to reverse engineer it so I can add features. It'll still be C++, just like the original.
You can't reverse engineer the machine code into C++. Its possible, but not for something like Starcraft.
You can't run C++ on the client side.
Even if you could, you would be defeating the entire purpose of your project. The low level code is what is causing the cross-platform problems. It would take you an eternity to understand the old code and rewrite it to work for Windows 7. If you want it to be more cross-platform, then Javascript/JavaApplet would be the way to go.
However this project might take you 2 years to complete at least.
On December 02 2012 02:55 peacenl wrote: As a programmer of a few network games I can tell you that it's most likely too server intensive (latency would be terrible when you use website URL calls instead of plain optimized network packets).
The problem is that strategy games require you to poll every time and await a result (a few times a second preferably). While 3D shooters poll the same way, they can skip a few poll iterations of the networked game loop because it will catch up in the end (and retrace the missing steps) and usually not influence the game outcome. With strategy games this is very different, the information send from one to another can not be lost or ignored, because it might change the outcome of the game for one player.
Luckily there are some languages that can exert more control over this, so by using such languages it could be possible, but it's very time consuming even if you manage to get the source code.
Websockets can let you set up a pretty standard socket from a browser. Check out socket.io
On November 28 2012 18:32 Jonoman92 wrote: I guess everyone has their own anecdotal experiences... but thought I'd mentioned bw has always worked just fine for me in Windows 7 with no special effort. Sometimes the lobby colors are funny-lookin' but it's not too important and in-game is always fine! So, at least give it a try before deciding "it's too complicated."
this is my case as well, only the menu is messed up in colors but inside bnet and in game its all fine.
you don't need the source code you probably don't need blizzard authorization as long as you only provide the code to use legal bw files to launch the game (but you dont provide the assets yourself)
llvm-qemu is pointless here, emscripten emits javascript from LLVM IR. All you need to do is convert all of the starcraft binaries to llvm IR, then write a directdraw/directinput to sdl binding, and then write whatever parts of win32 starcraft touches, and then make the thing actually work (because it won't because of how emscripten works w.r.t. render loops, so you'll need to probably dive into that and rewrite parts (if not most) of it.) Actually, that sounds like a fun project.
you don't need the source code you probably don't need blizzard authorization as long as you only provide the code to use legal bw files to launch the game (but you dont provide the assets yourself)
llvm-qemu is pointless here, emscripten emits javascript from LLVM IR. All you need to do is convert all of the starcraft binaries to llvm IR, then write a directdraw/directinput to sdl binding, and then write whatever parts of win32 starcraft touches, and then make the thing actually work (because it won't because of how emscripten works w.r.t. render loops, so you'll need to probably dive into that and rewrite parts (if not most) of it.) Actually, that sounds like a fun project.
and how do you convert the binaries in llvm IR without llvm-qemu?? anyway it's againt the eula so bw would really need to be blackboxed while cutting edges with new technologies and not supporting things like bnet or custom games, just the basic multiplayer game with a web app to actually launch games.
you don't need the source code you probably don't need blizzard authorization as long as you only provide the code to use legal bw files to launch the game (but you dont provide the assets yourself)
I am not a computer expert but I beg to differ. If you don't have the source code in which the game engine was built upon, you are not going to be able to replicate a lot of the bugs and tricks you can do in game. Without those bugs and tricks, it is not SC. I remember very clearly that Chris Sigaty tried so hard with his team to emulate muta stacking in SC2, they simply cannot do it because of a different game engine.
Everything is easier said than done, people should know that.
I didn't know they tried to emulate Muta Stacking in SC2 but failed .
That is a load of BS. Adding in muta stacking to SC2 is extremely easy. Unit pathing is more of a problem for the engine.
Wow, WarCraft actually works. And since there is no way they had the source code, this means some nerd reverse engineered it and ported it.
Pretty sure it was already done a long time ago in freecraft. Warcraft 2 logic is extremely simple compared to starcraft though.
I don't want to port StarCraft to Java Script (Which I think is what this guy did to WarCraft II, since it runs in a browser). I just want to reverse engineer it so I can add features. It'll still be C++, just like the original.
Reverse engineering to add features is something people have been doing for years, its not really a new idea. Reverse engineering to run on a browser is a whole different level of endeavor.