Java-Gaming.org Hi !
Featured games (81)
games approved by the League of Dukes
Games in Showcase (513)
Games in Android Showcase (119)
games submitted by our members
Games in WIP (576)
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  
  How to get in to Java games programming?  (Read 2584 times)
0 Members and 1 Guest are viewing this topic.
Offline gmehta

Innocent Bystander




Java games rock!


« Posted 2004-03-30 14:02:46 »


I am knowledgeable in Java and J2EE and always wanted to get in to games development. So where would I start ? Are there any books that I can srart with ?

Help appreciated. Thanks.
Offline n00bie

Junior Newbie




ill make tomarrows games tomarrow


« Reply #1 - Posted 2004-03-30 19:57:31 »

I also have a question along the same lines.  I don't know hardly anything about Java, and want to learn.  I'm 14, and know a little bit about BASIC, PASCAL, and C++, but want to learn Java and game programming.  I don't know the best way to learn.  I had a tutor for a while, but she moved.  Cry  

Can somebody give me some suggestions?

Ryan
Offline Jeff

JGO Coder




Got any cats?


« Reply #2 - Posted 2004-03-30 20:07:25 »

There is at least one decent book about there. I forget the name but other guys around here will remember.  

Shawn Kendall's book, which I hope will be excellent, is due out any day now. Its called "Practical Java Game Programming" and is from New Riders press.

The other thing to do ofcourse is to look at good sampel code.  There is a lot of it around here.  Then there is the question of environment.  I write this a lot it seems and shoudl probabyl doa  FAQ somewhere...

The first question you need to ask yourself is 'what KIDN of game do I want to do?'  Applet programming is very different from J2ME cell phone programmign and BOTH are quire different from desktop (j2SE.)

The most completeand easiest to work with  environment is J2SE.  If you are going that route the NEXT thing you need to ask is "wil lthis be a 2D or a three D game?"  If you know ntohing about either Java game prgroammign or 3D then I STRONGLY advise doing a 2D game as your first project.  3D is a very compelx areain of istelf., OTOH if youve already done 3D programmign and knwo all about vectros, transforms, view culling etc then you might want to do 3D.

Based on the above I suggest you picka  first project. Tell us what you think you want to do and we'll direct you further.




Got a question about Java and game programming?  Just new to the Java Game Development Community?  Try my FAQ.  Its likely you'll learn something!

http://wiki.java.net/bin/view/Games/JeffFAQ
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline princec

JGO Kernel


Medals: 404
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #3 - Posted 2004-03-31 07:27:58 »

Alien Flux source code here. You will also need SPGL from CVS, and LWJGL also from CVS.

It's complicated fiddly stuff but there's a few gems in there.

Cas Smiley

Offline CodexArcanum

Senior Newbie




Games == Life


« Reply #4 - Posted 2004-04-01 03:10:14 »

I'm currently working my way through a few books to try and get this stuff down.

I'd reccomend Head First Java, by Kathy Sierra and Burt Bates (published by O'Reilly) as a good book for a total newb.  It's pretty easy to follow and has you build fun example programs.  I highly reccomend it to learn java basics.

Right now, I'm reading David Brackeen's, Developing Games in Java. It's an ok book so far.  He covers a lot of useful concepts, and he seems to know his Java.  I haven't gotten too far into it so far, so I'm not sure how much I can reccomend it.
Offline Jeff

JGO Coder




Got any cats?


« Reply #5 - Posted 2004-04-01 16:08:43 »

One Warning if i may...

Unless you are plannign on building Applets skip any stuff on using AWT or Swing to do games.  Its old info and not the best way anymore.

Other then that, yeah any book that gives you a good intro to how Java wortks is a great start, then we can help point you to the right APIs for various things here.

If yo uare learning Java coding for the first time, once you get the feel of Syntax I'd also recommend strongly Josh Bloch's book "Effective Java".  It will teach you lots of good Java programming habits.  

If you are coming from other languages with different performane characteristics I'd also recommend Steve and my book "Java Platform Performance".  Its getting a bit long in the tooth but most of it is still relevent.  Its actuallyall on-line fi you can stand to read on-line (I'cant) at http://java.sun.com/docs/books/performance



Got a question about Java and game programming?  Just new to the Java Game Development Community?  Try my FAQ.  Its likely you'll learn something!

http://wiki.java.net/bin/view/Games/JeffFAQ
Offline duncanIdaho

Junior Duke




invert mouse


« Reply #6 - Posted 2004-04-01 22:03:09 »

To add to the good advice above I'll say that I learned a LOT by reading these forums, searching the archives, and picking apart sample code found on the site.

There are many technologies out there and choosing one can be really tough if you want your game to run on many platforms.  I agree with a previous poster that you should start 2D, and that J2SE is a nice place to start using the Java2D APIs.

Finally I'll plug a great book in line with my suggestion:  Vincent J. Hardy's "Java 2D API Graphics" ISBN 0-13-014266-2.  Easy to read with great pictures although it never mentions game programming.
Offline CodexArcanum

Senior Newbie




Games == Life


« Reply #7 - Posted 2004-04-01 23:15:16 »

Hmmm...yeah, this book uses AWT and Swing pretty heavily.

Well, if there's a better method...what is it and where is it?
Offline Jeff

JGO Coder




Got any cats?


« Reply #8 - Posted 2004-04-02 03:20:31 »

Okay, ASSUMING...

(1) Yo uwant to use the built in APIs in j2SE
and either
(2) You want to deploy some reasonable tiem in teh future
OR
(3) You don't care about Mac

Then for 2D you want to use what are called the "Fullscreen" API along with BufferStrategy and VOlatileImages

Together these provide a platform neutral abstraction of video memory and video buffer flipping which are the two  fudnementals of doing 2D games.  

The term "fullscreen" is misleading as actualy the same technique works in either fullscreen or windowed mode with only about 2 lines of different set-up code.

There are a few exampels around. I wrote one called "Scroller" that one of the other guys cleaned up and is posted around here somewhere (on the Wiki I think.)

Good articles to read include:

http://java.sun.com/docs/books/tutorial/extra/fullscreen/

http://web.archive.org/web/20021102075642/www.java-gaming.org/Documents/Understanding_AWT_Image_Types/understanding_awt_image_types.html


The reason for the Mac warnign is the current Mac VM has a performance bug and really crawls at flipping buffers.  They know about it and its on their list to get fixed...

Got a question about Java and game programming?  Just new to the Java Game Development Community?  Try my FAQ.  Its likely you'll learn something!

http://wiki.java.net/bin/view/Games/JeffFAQ
Offline n00bie

Junior Newbie




ill make tomarrows games tomarrow


« Reply #9 - Posted 2004-04-09 12:58:55 »

I have been reading "Learn to Program with Java" by John Smiley.  Its pretty easy to understand, but only covers the basics.  What should I know about Java before I get into gaming?  

I'm learning about making my own objects, and how client programs use them...basics.  

Ryan
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline mezcal

Senior Newbie




Java games rock!


« Reply #10 - Posted 2004-04-28 18:37:32 »

Quote
One Warning if i may...

Unless you are plannign on building Applets skip any stuff on using AWT or Swing to do games.  Its old info and not the best way anymore.


What do AWT and Swing do which aren't done the best ways?  And how else do you do it?  (Which is the same question CodexArcanum had, I guess)

Isn't Fullscreen part of awt?
Offline Orangy Tang

JGO Kernel


Medals: 56
Projects: 11


Monkey for a head


« Reply #11 - Posted 2004-04-28 19:17:10 »

Quote
What do AWT and Swing do which aren't done the best ways?

Well unless you're very careful and restrictive in what you're doing, most drawing is done on the CPU in software, which is never going to be able to compete with dedicated graphics hardware in terms of speed.

Quote
And how else do you do it?  (Which is the same question CodexArcanum had, I guess)

Grab yourself an OpenGL binding (like LWJGL ) and use that instead. Nice, fast, hardware accelerated drawing will all sorts of added extras you normally wouldn't be able to do with regular 2d graphics.

Quote
Isn't Fullscreen part of awt?

Dunno whether its tecnically part of AWT or Java2D, but yes its part of the regular java platform. It still seems to be somewhat buggy though from what I've seen. Of course if you use LWJGL you get its own fullscreen methods which tend to be more reliable. Smiley

Oh, and if you fancy giving OpenGL a shot, grab yourself a copy of the RedBook

[ TriangularPixels.com - Play Growth Spurt, Rescue Squad and Snowman Village ] [ Rebirth - game resource library ]
Offline mezcal

Senior Newbie




Java games rock!


« Reply #12 - Posted 2004-04-29 00:04:11 »

Ok, well I have been wanting to play with openGL for a while, anyway, so LWJGL sounds good.  Smiley

I have a few questions though..  how exactly does an openGL "binding" work?  / What is it doing? / How do I use it? Embarrassed
Offline Matzon

JGO Knight


Medals: 19
Projects: 1


I'm gonna wring your pants!


« Reply #13 - Posted 2004-04-29 03:50:43 »

Quote
I have a few questions though..  how exactly does an openGL "binding" work?  / What is it doing? / How do I use it? Embarrassed

A binding is made up of java classes with native methods, that bind to another api.
For example:
GL11.java in LWJGL declares a method:
1  
public static native void glClearColor(float red, float green, float blue, float alpha);

which when loaded will link to the lwjgl.dll and when executed will run this method in the dll:
1  
2  
3  
4  
static void JNICALL Java_org_lwjgl_opengl_GL11_glClearColor(JNIEnv * env, jclass clazz, jfloat p0, jfloat p1, jfloat p2, jfloat p3)
{
      glClearColor((GLfloat) p0, (GLfloat) p1, (GLfloat) p2, (GLfloat) p3);      
}

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.

Longarmx (46 views)
2014-10-17 03:59:02

Norakomi (37 views)
2014-10-16 15:22:06

Norakomi (28 views)
2014-10-16 15:20:20

lcass (32 views)
2014-10-15 16:18:58

TehJavaDev (62 views)
2014-10-14 00:39:48

TehJavaDev (62 views)
2014-10-14 00:35:47

TehJavaDev (52 views)
2014-10-14 00:32:37

BurntPizza (70 views)
2014-10-11 23:24:42

BurntPizza (40 views)
2014-10-11 23:10:45

BurntPizza (82 views)
2014-10-11 22:30:10
Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06
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!