Using a map in html

Hello,

I am thinking about creating a web game, but my problem is how to make an interactive map.

I saw for example this showcase : http://www.java-gaming.org/topics/real-time-strategy-game-java-javascript/26045/view.html

If I look at the HTML code, I saw the map depends on a CANVAS tag.

Can somebody indicate me how I can generate such a tag and how it works?

Thanks in advance for your responses!

If you saw the canvas tag in the html code, then it’s probable because it’s html. ^^ (html5 that is (http://www.w3schools.com/html5/html5_canvas.asp))

Yes, agreed. But this is also Java-Gaming showcase, not only an HTML page ;D

The question is how to build such map/game from java code, and what guidelines / tutorial can I follow to do this?
I would like to create a web game, in Java, without using applet. And beeing able to handle, in java, events like clicks, etc. on my map / html canvas.

Any suggestion?

You’d have to use an applet to build a game like that in pure Java. As far as I could see, then that game is made in html/javascript, with some server side backend stuff.

But to do it in Java, you could use Java’s build in Canvas and paint your object directly on that. I’m not sure how you’d go about making it fill the entire browser though, since I’ve only ever made 1 applet, and that was a Tetris game. :stuck_out_tongue:

The problem is there is still confusion out there, that javascript has nothing to do with java. They should have sticked to the original name LiveScript. See [url]http://en.wikipedia.org/wiki/JavaScript#JavaScript_and_Java[/ur]

It was named JavaScript after LiveConnect came around, in the hopes that apps would be built out of JavaBeans that were scripted with the newly named JavaScript. They really did intend to have people scripting Java with it … problem is, LiveConnect was such a crummy interface that was prone to deadlocks and crashing, that no developer was seriously interested in using it. I tried it for a while, and found that the only java/browser bridge interface worth a damn was, ironically, the one in IE.

I’m told that LiveConnect is still around in some form and that it’s more or less fixed now, but too little too late for me and most everyone else.