Java-Gaming.org
Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
Featured games (78)
games approved by the League of Dukes
Games in Showcase (406)
games submitted by our members
Games in WIP (293)
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  
  Couple quick questions from a newb to java.  (Read 1372 times)
0 Members and 1 Guest are viewing this topic.
Offline wizecoder

Junior Newbie





« Posted 2008-11-26 19:16:21 »

Me and my brother are wanting to make a trading card style game with networking that runs on the web browser. I am responsible for the programming so i decided our best bet is java applets. My questions are: 1. What would be best between java2d and lwjgl for a 2d applet game? 2. Would accelerated graphics like in the cokeandcode.com tutorial be possible in applets? And if so how?  I may have more questions later so please bare with me.

Thanks in advance.

P.S. MY FIRST POST!!!!!!!!!!!
Offline princec
« League of Dukes »

JGO Kernel


Medals: 196
Projects: 3


Eh? Who? What? ... Me?


« Reply #1 - Posted 2008-11-26 21:13:50 »

Java2D will be fine, and much easier to begin with. As trading card games are turnbased and not reliant on repeated fast graphics updates you won't be needing any accelerated graphics at all I shouldn't think.

Cas Smiley

Offline SimonH
« Reply #2 - Posted 2008-11-26 21:25:42 »

Very true - and java2D is also likely to work on more machines, so you'd get a wider audience.
If you do your networking via HTTP you wouldn't get any off-putting browser security dialogs that way either.

Heroes' Keep is in development.
Meanwhile try Bloodridge
Games published by our own members! Check 'em out!
Try the Free Demo of Revenge of the Titans
Offline wizecoder

Junior Newbie





« Reply #3 - Posted 2008-11-26 22:00:28 »

Ok thanks for the replies. I think i will go through the tutorials here: http://www.planetalia.com/cursos/ and the networking articles at http://gafferongames.wordpress.com/networking-for-game-programmers/
Offline wizecoder

Junior Newbie





« Reply #4 - Posted 2008-11-26 23:01:21 »

Just thought of three questions about the networking: 1. What would be the best way to handle things like user accounts? It would need to be accessed from within the applet and from the website. 2. What would i need to learn for making a card database type setup. 3. What hosting service would you recommend? I have looked at slicehost and it seems fairly good but i would like other opinions.

THANKS
Offline DzzD
« Reply #5 - Posted 2008-11-27 01:43:09 »

Quote
1. What would be the best way to handle things like user accounts? It would need to be accessed from within the applet and from the website
an easy way would be php/mysql wich seems sufficient for a card game and will be pretty simple to setup.

to access your user session from both applet and web page you can add a parameter to your applet tag with the php session id (or other if not php) than use it in your applet HTTP call exemple :

<APPLET
 width=640
 height=400
 code="yourapplet">
 <PARAM NAME=SESSION VALUE="<?php echo session_id(); ?>">
</APPLET>

then in the java applet code you read your parameter :
1  
2  
3  
4  
5  
String session;
public void init()
{
 this.session=getParameter("SESSION");
}

and you set it as a GET parameter in the url to use the right session server side
1  
URL u=new URL("http://yourserver.com/something.php?SESSION="+this.session);


and finally in something.php you should have
1  
2  
3  
4  
5  
6  
<?php
session_id($_GET["SESSION"]);
session_start();
...
...
?>


this is the idea...

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

Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
 
Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars and Titan!

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

The first screenshot will be displayed as a thumbnail.

The invasion has landed! On Mars! And you're there to beat 'em!
cubemaster21 (81 views)
2013-05-17 21:29:12

alaslipknot (91 views)
2013-05-16 21:24:48

gouessej (122 views)
2013-05-16 00:53:38

gouessej (114 views)
2013-05-16 00:17:58

theagentd (126 views)
2013-05-15 15:01:13

theagentd (113 views)
2013-05-15 15:00:54

StreetDoggy (158 views)
2013-05-14 15:56:26

kutucuk (180 views)
2013-05-12 17:10:36

kutucuk (180 views)
2013-05-12 15:36:09

UnluckyDevil (187 views)
2013-05-12 05:09:57
Complex number cookbook
by Roquen
2013-04-24 12:47:31

2D Dynamic Lighting
by Oskuro
2013-04-17 16:46:12

2D Dynamic Lighting
by Oskuro
2013-04-17 16:45:57

2D Dynamic Lighting
by Oskuro
2013-04-17 16:23:20

Noise (bandpassed white)
by Roquen
2013-04-05 17:36:01

Noise (bandpassed white)
by Roquen
2013-04-03 16:17:38

Java Data structures
by Roquen
2013-03-29 13:21:12

Topic Request
by kutucuk
2013-03-22 21:42:01
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!
Page created in 0.098 seconds with 21 queries.