Jump to content
  • Advertisement
Sign in to follow this  
Ermac

[java] Basic Java Resource Questions

This topic is 4719 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have an idea that I want to implement for an online browser game. Would Java be the best language to use or something else (C++,etc). (It would be a continous game like pong or something) I'm still learning PHP, but from my understanding that could only generate turn based games wouldn't it? If I do go with Java does anyone know which Java Programming book would be the best to start off with? My local Barnes & Noble usually has a ton of resources. Also since I have not programmed with Java since my college class with it over a year ago, what is the most recent version that I should be programming for? Thanks, Ermac

Share this post


Link to post
Share on other sites
Advertisement
The latest Java version is the tiger - 1.5, currently in beta updates. It has some new features such as autoboxing of primitive types, and generics.

A good book for game programming using Java is this one. It covers almost everything you need to know to program commercial quality java games.

AFAIK, an applet could solve your matter at hand without major problems. You might get confused about applet's security issues, concerning the fact there are some restrictions to the operations allowed to them.

Son Of Cain

Share this post


Link to post
Share on other sites
If the game is simple enough (pong, snake, tetris, etc.) I'd recomend using javascript. Then you don't need to worry about the user having the JRE installed, or bugs because he has the wrong version. It would also probably load a lot faster.

shmoove

Share this post


Link to post
Share on other sites
Thanks,

I know javascript very well, but I want something more advanced including sprite functionality and stuff. I know there are somethings I could do with javascript but since Java is one of my weak points I need to learn it anyway.

Looking at that book, so Java does support even 3D and collision functions etc? I know its OOP like C++ I just wasn't sure if similar features had been established.

Share this post


Link to post
Share on other sites
Java can do 3D with collisions. However, nothing is inherently built in- not even in c++. There are enough 3rd party APIs in either language that you're going to be equally well off in whichever route you choose.

Share this post


Link to post
Share on other sites
Yes, Java is a complete language, just as C++. It has an API called Java3D, but for game development the OpenGL bindings are preferred by developers, for many reasons. One of the best implementations is LWJGL.

Share this post


Link to post
Share on other sites
I found a basic Java book for a refresher until I can find a more in depth one. I already knew that Java was OOP, but I don't know if I thought about this prior to workin on it the networking aspect of it prior.

What is the difficulty level of working with network code? I did not mention earlier that I wanted to create a two way basic game through a web browser / applet? Since I don't know a whole lot, is that possible to create an open session between two browsers using Java, or would that require something different acting on a server?

Share this post


Link to post
Share on other sites
It should be possible, but first you'd have to 'sign' your applet. Direct connections via IP are outside of applet's security sandbox.

Share this post


Link to post
Share on other sites
It is possible, but it is not the best way to do. Why not try out java web start? That way you can work with standard code, without having to worry about the severe restrictions, and still deploy your game on the web.

Networking code is simple, as anything within Java - as long as you have a good understanding of the concepts of OOP and the basic work flow of the Java language.

Son Of Cain

Share this post


Link to post
Share on other sites
I'm not familiar with Java web start, how does that differ? Is it even common to use Java for a multiplayer gaming language over the web, or should I be using a different language?

Thanks,

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!