Java-Gaming.org    
Featured games (91)
games approved by the League of Dukes
Games in Showcase (577)
games submitted by our members
Games in WIP (498)
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 1581 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

JGO Kernel


Medals: 282
Projects: 3
Exp: 16 years


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.

People make games and games make people
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
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.

 

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

The first screenshot will be displayed as a thumbnail.

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

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

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

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

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

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

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

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

trollwarrior1 (183 views)
2014-04-04 12:06:45

CJLetsGame (190 views)
2014-04-01 02:16:10
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

Good Examples
by Grunnt
2014-04-03 15:48:37

Good Examples
by matheus23
2014-04-01 18:40:51

Good Examples
by matheus23
2014-04-01 18:40:34

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:22:30

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:05:20
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!