Java-Gaming.org    
Featured games (78)
games approved by the League of Dukes
Games in Showcase (430)
Games in Android Showcase (89)
games submitted by our members
Games in WIP (468)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Using a map in html  (Read 1014 times)
0 Members and 1 Guest are viewing this topic.
Offline Asterius

Junior Newbie





« Posted 2012-05-05 08:24:55 »

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!
Offline Regenuluz
« Reply #1 - Posted 2012-05-05 17:04:17 »

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))
Offline Asterius

Junior Newbie





« Reply #2 - Posted 2012-05-05 19:15:56 »

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

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?
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Regenuluz
« Reply #3 - Posted 2012-05-05 19:26:52 »

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. Tongue
Offline cylab

JGO Knight


Medals: 34



« Reply #4 - Posted 2012-05-05 21:29:12 »

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]

Mathias - I Know What [you] Did Last Summer!
Offline sproingie

JGO Kernel


Medals: 200



« Reply #5 - Posted 2012-05-06 01:29:34 »

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.

Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

theagentd (6 views)
2014-04-24 23:00:44

xsi3rr4x (83 views)
2014-04-15 18:08:23

BurntPizza (75 views)
2014-04-15 03:46:01

UprightPath (86 views)
2014-04-14 17:39:50

UprightPath (69 views)
2014-04-14 17:35:47

Porlus (86 views)
2014-04-14 15:48:38

tom_mai78101 (109 views)
2014-04-10 04:04:31

BurntPizza (169 views)
2014-04-08 23:06:04

tom_mai78101 (265 views)
2014-04-05 13:34:39

trollwarrior1 (217 views)
2014-04-04 12:06:45
Escape Analysis
by Roquen
2014-04-25 11:42:09

Escape Analysis
by Roquen
2014-04-25 11:37:01

Escape Analysis
by Roquen
2014-04-25 10:38:58

Escape Analysis
by Roquen
2014-04-25 10:22:13

List of Learning Resources
by SHC
2014-04-18 03:17:39

List of Learning Resources
by Longarmx
2014-04-08 03:14:44

Good Examples
by matheus23
2014-04-05 13:51:37

Good Examples
by Grunnt
2014-04-03 15:48:46
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!