Couple quick questions from a newb to java.

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!!!

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 :slight_smile:

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.

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/

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

[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
[/quote]
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 :

then in the java applet code you read your parameter :

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

URL u=new URL("http://yourserver.com/something.php?SESSION="+this.session);

and finally in something.php you should have

<?php
session_id($_GET["SESSION"]);
session_start();
...
...
?>

this is the idea…