Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (538)
Games in Android Showcase (132)
games submitted by our members
Games in WIP (600)
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  
  Tutorial on Game Programming in Java  (Read 2997 times)
0 Members and 1 Guest are viewing this topic.
Offline keyro

Junior Newbie




Java games rock!


« Posted 2004-04-10 18:00:37 »

Hey

I was looking around the web for some game-programming tutorials for Java and all I could find was two tutorials that even though they were quite nice, they talked only about applets and not full applications. So I was wondering where I could find some reference material I could use to learn how to program games in Java (as regular applications)? I already have some Java programming experience, as I use Java to build computer simulations for various physics systems at my University, so I'm not so much looking for a programming tutorial as for a game-making tutorial - more specifically, the Java2D API (I know there are various ways into the 3D world (Java3D, JOGL and many others), but right now I think that 2D would be enough of a challenge... first Pong, then Quake Wink) , and a general overview of "normal" game-making techniques (i.e., loops, input/output, etc).

Thanks!
Offline kevglass

« JGO Spiffy Duke »


Medals: 211
Projects: 24
Exp: 18 years


Coder, Trainee Pixel Artist, Game Reviewer


« Reply #1 - Posted 2004-04-11 08:46:39 »

This might help:

http://www.java-gaming.org/cgi-bin/JGNetForums/YaBB.cgi?board=cluebies;action=display;num=1081461966

(a few posts down in this forum :/)

Kev

Offline keyro

Junior Newbie




Java games rock!


« Reply #2 - Posted 2004-04-12 03:22:53 »

Kev

That was actually one of the two tutorials that only talked about applets I mentioned in my post  Wink I've found a book that's being written by a user in these forums and I'm trying to start with it, but I'm kinda pressed for time right now so I don't know yet if it meets my needs or not. In any case thanks, and if you happen to know of a tutorial that deals with what I'm looking for - programming games in Java as applications and not applets - do remember to drop me a line Smiley

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

JGO Coder


Medals: 2


pixels! :x


« Reply #3 - Posted 2004-04-12 03:35:23 »

Hehe the irony Grin

Actually Kevin is just about whipping such a tutorial together:
http://www.java-gaming.org/cgi-bin/JGNetForums/YaBB.cgi?board=Announcements;action=display;num=1081718135

Right now it's source only, but that will change. Oh and btw applets and applications aren't that different. In applets you extend (J)Applet and init() is the entry point and in applications you extend (J)Frame and main() is the entry point... that's it - in a nutshell.

Welcome to the board Smiley

弾幕 ☆ @mahonnaiseblog
Offline keyro

Junior Newbie




Java games rock!


« Reply #4 - Posted 2004-04-12 04:02:43 »

Heh, ironic indeed Smiley thanks onyx -  I'll make sure to keep an eye on that topic.

And my beef with applets is that an applet gives you the Graphics context with which you can draw stuff right out of the blue (or so it seems), and I always wondered how to do the same with a JPanel or a JFrame.

Thanks for the heads-up on the topic at any rate, and for welcoming me to the board Smiley
Offline nonnus29

Senior Devvie




Giving Java a second chance after ludumdare fiasco


« Reply #5 - Posted 2004-04-12 10:28:42 »

Quote
And my beef with applets is that an applet gives you the Graphics context with which you can draw stuff right out of the blue (or so it seems),


Thats one of the things I tried to addressed in the applet tute I wrote (in the tutorials section about applets-how they work), because it was really confusing to me at first too.

The gist of it is, an applet is a component in a web browser that only responds to commands/methods called from the web browser (init, start, stop, update/repaint) so normally an applet will only update its display when told to by the web browser, hence the Graphics appears "out of thin air".

You can also force drawing in an applet by using getGraphics() and releaseGraphics() (these may not be the actualy methods but you get the idea) to get and release the Graphics whenever you want.  This used to be a performance improvement, but not with Swing and current jre's.

Hope that helps.
Offline keyro

Junior Newbie




Java games rock!


« Reply #6 - Posted 2004-04-12 12:19:36 »

Well that does clear some thing up for me - I had some ideas as to what applets were and it seems I was correct - but what I'm really interested in however is how to do that in an application, not an applet. Thanks anyway Smiley
Offline D.t.O

Junior Devvie




Psych'd about Java Games


« Reply #7 - Posted 2004-04-12 19:24:26 »

I remember there was some kind of a "fullscreen" tutorial, but I forgot where it was and I did not bookmark it Embarrassed...anyone know where that one is?

Enjoy.
Regards,
     - D.t.O
Offline kevglass

« JGO Spiffy Duke »


Medals: 211
Projects: 24
Exp: 18 years


Coder, Trainee Pixel Artist, Game Reviewer


« Reply #8 - Posted 2004-04-13 05:23:33 »

Ironic indeed, keyro's post is actually what pushed me over to actually putting the tutorial together (which I've been meaning to do for a while).

Tutorial is now first edition:

http://www.cokeandcode.com/info/tut2d.html

Hopefully blah will put it on the JGF page too Smiley

Kev

Offline Jeff

JGO Coder




Got any cats?


« Reply #9 - Posted 2004-04-14 02:31:46 »

Quote
I remember there was some kind of a "fullscreen" tutorial, but I forgot where it was and I did not bookmark it Embarrassed...anyone know where that one is?


I believe there is a link to a cleaned up version of the Scroller full-screen sampel I wrote on the Wiki.

Mike Martak's turtorial on full screen exclusive mode actually cover other thinsg too like BufefrStrategy and active rendering.  Its on The Swing Connection somewhere. Whenever I neeed the link I google for
"Martak" and "Full Screen " and it pops right up.

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 trembovetski

Senior Devvie




If only I knew what I'm talking about!


« Reply #10 - Posted 2004-04-14 03:25:18 »

Kev, that's a very well put together tutorial!

Offline D.t.O

Junior Devvie




Psych'd about Java Games


« Reply #11 - Posted 2004-04-15 02:33:05 »

Quote
Mike Martak's turtorial on full screen exclusive mode actually cover other thinsg too like BufefrStrategy and active rendering.  Its on The Swing Connection somewhere. Whenever I neeed the link I google for "Martak" and "Full Screen " and it pops right up.

Thanks for the google keywords Cheesy!
Just in case someone wants to take a look, it's @ http://java.sun.com/docs/books/tutorial/extra/fullscreen/

Enjoy.
Regards,
     - D.t.O
Offline keyro

Junior Newbie




Java games rock!


« Reply #12 - Posted 2004-04-18 02:58:13 »

Sorry for not having posted in a while, but I've been hammering out my latest project for University and have had little time to study game programming. On the other hand, my next project will rely heavily on animations, so Kev, rest assured I'll examine your tutorial thoroughly Wink thanks for posting it online man Smiley
Offline rks404

Innocent Bystander




Java games rock!


« Reply #13 - Posted 2004-05-05 14:55:22 »

kevglass - thanks for the excellent tutorial. I've been looking for a good j2se, non-applet tutorial and this is exactly what I've been looking for.

I also enjoyed having the game be playable via java web start. I idly clicked on it and lost the next half hour to an old skool version of space invaders - well done!

Thanks again.

Rajß
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.

rwatson462 (29 views)
2014-12-15 09:26:44

Mr.CodeIt (20 views)
2014-12-14 19:50:38

BurntPizza (40 views)
2014-12-09 22:41:13

BurntPizza (75 views)
2014-12-08 04:46:31

JscottyBieshaar (37 views)
2014-12-05 12:39:02

SHC (50 views)
2014-12-03 16:27:13

CopyableCougar4 (47 views)
2014-11-29 21:32:03

toopeicgaming1999 (113 views)
2014-11-26 15:22:04

toopeicgaming1999 (100 views)
2014-11-26 15:20:36

toopeicgaming1999 (30 views)
2014-11-26 15:20:08
Resources for WIP games
by kpars
2014-12-18 10:26:14

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