
Command and Conquer – Programming an RTS game in HTML5 and Javascript - PixelRobot
http://www.adityaravishankar.com/2011/11/command-and-conquer-programming-an-rts-game-in-html5-and-javascript
======
roschdal
I would advise you to stop working on this project immediately, and instead
focus your efforts on creating a game with original game content. EA owns the
trademarks and copyright to the material.

You'll be much better off by starting your own project, instead of cloning a
commercial product. Yes, the source code of command and conquer might have
been released by EA, but EA still owns the trademaks.

(speaking as someone who as tried recreating a popular turn based strategy
game using HTML5..)

~~~
artmageddon
I can see EA getting up in arms over a game like this since they are still
selling Command & Conquer Games (Tiberian Dawn was part of Command & Conquer:
The First Decade which came out a few years ago), but what about for other
games that aren't being sold? The author here is giving proper attribution and
isn't making any money off of it, as far as I understand. What about remaking
games from companies that don't exist anymore?

/not an expert on copyright and honestly curious

~~~
ceejayoz
> What about remaking games from companies that don't exist anymore?

[http://en.wikipedia.org/wiki/Abandonware#Enforcement_of_copy...](http://en.wikipedia.org/wiki/Abandonware#Enforcement_of_copyright)

~~~
atomicdog
That explains distrubuting abandonware, but what about recreating it/porting
it to another platform and charging for it?

------
molmalo
Isn't it strange that we are celebrating being able to build things made 20
years ago, but in the browser?

I can imagine someone in 2032 posting somewhere: "Hey! I ported Crysis to the
XXX " Being XXX = an Augmented Reality 3D Browser or what comes next in 20
years from now.

Just a thought.

~~~
wtvanhest
It is also awesome that he did it as one person in a month. I'm sure it took a
lot more time to develop the original and a lot more people.

~~~
molmalo
I did a _simple_ RPG game engine (It handled basic scripting, navigating
through different maps, some screen tricks, etc), back in 1999 when I was 15
y.o. (yeah, I had a LOT of spare time back then)... I'll leave a screen here:
<http://img41.imageshack.us/img41/2714/proyge0.jpg> in case someone wants to
see what it looked like (I had 'borrowed' some tile art from several games of
the time: Final Fantasy 5 and Harvest Moon :P but some were entirely made by
me!!).

It was made in C++ and some ASM (I needed to use assembler to improve the
performance in some critical areas, like graphics, working with 0x13h mode, I
wrote my graphic library from scratch).

I can assure you that it was laborious and pretty difficult (specially talking
to the hardware directly). But I REALLY wanted to learn programming, and I
didn't went on vacation that summer, so I spent a lot of time coding for fun
:)

Do you want to know the funniest part of it? Some years later, I lost the
majority of that code. While formatting my PC, I forgot to save that... Now I
only preserve some exes, but I've lost the level editor and the tile editor I
made =(

Oh gosh, I feel nostalgic now.

Having said all of this, I can _really_ understand the guy who ported this
game. The will to learn is a powerful motivator.

~~~
ajuc
I feel for you. I made side scrolling arcade game in 13h mode (in 2000 or sth
like that, I was learning Turbo Pascal).

It was quite addictive - had many levels, upgrading ships, different win
conditions, physics (you flew a rotatable rocket - asteroid style physic, but
with big tiled levels, with teleports, doors and buttons, enemies, and some
objectives to do(transport people from bus stops to the barber - don't ask :)
). It even had water tiles, that had different physics (less gravity, more
friction), and I've implemented interactions between different objects (like
flamethrower bullets changes to harmless smoke in the water, laser goes
throught glass tiles, etc). I made my own sprite editor (didn't know hwo to
read bmp files :) ).

I've lost it all to hard disk error a few years ago.

------
swombat
C&C is not the "grandaddy" of RTS. Dune 2 is.

~~~
twelvechairs
Or Herzog Zwei or perhaps earlier games (Ancient Art of War anyone?).

(sadly I guess this discussion somehow has to come up every time someone
mentions the word RTS.)

~~~
Serentiynow
Yes. <http://carbongames.com/airmech/help.html> Interesting blog where they
write about their experience in porting it to NaCl.

~~~
jhchabran
Thanks for this link, I've a huge fan of Herzog Zwei, you're rocking my world
with that link :)

It's mostly one of the best unknown game soundtrack I've heard.

------
Serentiynow
ea is making the same thing. <http://www.ea.com/tiberium-alliances>

Command and Conquer Tiberium Alliances brings the battle to your browser in
this epic strategy MMO. Compete or ally with your friends in a worldwide war
for precious resources. Based in the Command and Conquer Tiberium story world,
C&C Tiberium Alliances allows players to experience C&C in a brand new way.
Using HTML 5 technology, players are able to access their game from any web
accessible browser making this one of the first truly portable mmo strategy
titles to hit the market. Apply for the Closed Beta today at
www.TiberiumAlliances.com and get into the closed beta.

~~~
eru
You should have probably marked the citation somewhat more.

------
nikcub
i'd suggest using Git properly instead of making a new copy of the main JS
file with every version:

[https://github.com/adityaravishankar/command-and-
conquer/tre...](https://github.com/adityaravishankar/command-and-
conquer/tree/master/js)

it would also be nice if you separated out the code into functional modules
(as opposed to event functions) so that parts can be reused. I was interested
in checking out your selection code since I implemented my own recently.

better modules and functional separation would also make it easier for others
to understand and contribute to the code.

Not taking anything away from an awesome demo, just some suggestions.

~~~
pavelkaroukin
All these are minified versions. I believe these were kept in place with
different version number attached to be able to quickly switch between, not
for version control reasons.

~~~
molmalo
Check out cnc.js for a non-minified version.

------
SeanDav
Great effort! Still a couple of comments: As already mentioned C&C is not the
originator of this genre. Wikipedia has a decent article on this:

<http://en.wikipedia.org/wiki/Real-time_strategy>

Also please don't use a black background. The dark blue links are really hard
to see clearly!

------
kghose
I'm on Mac OS X Lion and Firefox. I lost my cursor after I loaded this page.
So now, when Firefox (any firefox window) is active my cursor disappears. It
returns when I make some other app active. This sometimes happens on Chrome
and Flickr, so I wonder if there is some HTML5 thing that is buggy for FF and
Chrome?

Any one else with this issue?

~~~
pak
I've had this happen to me on Chrome. It was definitely a browser bug, because
restarting the browser resolved it. I first noticed it when I was working on a
web page with complicated CSS rules for 'cursor'. If I had to guess, it has to
do with loading custom .cur or .gif files as the cursor, since it didn't seem
to happen unless I tried to do that. However, it was very sporadic and I could
never get a reproducible minimal test case.

------
dazbradbury
dupe - <http://news.ycombinator.com/item?id=3473024>

~~~
samwillis
It doesn't matter if its a dupe of something everyone missed before and people
up vote it this time. So much stuff gets submitted now that links are only on
the first page of the new list for a few minutes and can easily be missed.
This time its hit at the right time and there could be a good discussion about
it.

~~~
user9756
I agree with your argument,

but why is he being down voted? All he did was to point out that this article
has been published before.

Maybe there are some interesting comments in the "dupe" thread? (in this case
no, but you get the point)

I'm still new to HN and I find the up/down vote behaviour rather peculiar from
time to time. This is such a time.

~~~
nl
(He's being downvoted because it didn't add anything to this discussion, and
it seemed like a case of sour-grapes because he originally submitted the link.

If there was discussion on the original submission it would have been useful)

------
caycep
dwarf fortress next!

~~~
kiba
Funny that you mention that, because I am working on my own unique "blend" of
dwarf fortress in HTML5 and javascript.

Let just say the game takes place in a dyson sphere in the far future.

------
scriptproof
Very interesting. These games in the browser will change the world for gamers.

~~~
jiggy2011
Like the flash/java games we've had for the last ~12 years?

I'll be impressed when we get a full 3D FPS/RTS with full shader effects.

~~~
Destroyer661
If you check out <http://mrdoob.github.com/three.js/> you'll see that
WebGL/Canvas is way beyond the flash/java games. Both do have low-level
shaders right now and more improvements are coming all the time.

------
nicetryguy
I'll just leave this here

<http://www.youtube.com/user/theostation#p/c/880ECFFEF4972939>

