Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (780)
Games in Android Showcase (233)
games submitted by our members
Games in WIP (856)
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  
  Looking for where to Start with 2D games in Java. Help?  (Read 3440 times)
0 Members and 1 Guest are viewing this topic.
Offline torched_platypi

Junior Newbie

« Posted 2012-02-21 23:47:31 »

Hello, I'm new to this forum and I have looked around and it looks very helpful. I'm also rather new to java. Currently, I have taken an intro to Java course and learned basic Java syntax. I have (pretty much) mastered text based stuff, and would I'm interested in learning 2D graphics programming with Java. I just recently downloaded Eclipse and am playing with it as well. (Previously used BlueJ)

I was inspired by the game recently programmed by Mojang at the Mojam, and I would like to learn to program games that are similar in looks. It's called Catacomb Snatch, and you should be able to find screenshots on google. The graphics seem like they wouldn't be too hard to code, but they released the source code, and after opening it with eclipse, it's just WAY over my head. The biggest project I worked with using just text was a "Dungeons & Dragons" type text co-op adventure with 4 or 5 rooms (each a separate class), two playable characters (each a separate class), and 4 or 5 monsters (all from one class). This project ended up with only around 10 classes, plus a main class which housed the main method.

What I'm looking for I guess, is just where to start to go from a 10 class text game to a 20 class graphical 2D Shoot 'em up using lib, res, and src folders and files. That gap is where I'm stuck currently, and I've looked for a way to get across and haven't found it.

P.S. In the one programming class I took, we made a PacMan game using Greenfoot towards the end of the year. It was terrible. Greenfoot took 2-5 minutes to load one world with 40 or so objects in it. I learned enough to accomplish a Shooter game in Greenfoot, but it would be slow, bulky and not nearly advanced as I would like. I'm looking to transition to more advanced programming, not simply improvise with the noob skills I have currently.

If you made it this far, thanks for reading my post and thanks in advance for the help! Grin
Offline Beamery

Senior Newbie

Medals: 1

« Reply #1 - Posted 2012-02-21 23:58:18 »

For 2D games, I would start with something REALLY simple.  My first game was a Tetris clone.  By starting with something simple like Tetris, you can focus on the basic constructs that go into making a game, (the game loop, handling input, updating graphics, game state, etc.) without having to worry about complex graphics (pretty much anyone can draw a Tetris block) or about AI.  Once you have finished a game like Tetris, Pong, or Breakout, you will have a good idea of how ready you are to move on to more complex stuff.

As far as graphics go, you can start with Java2D, which I know a lot of people do.  It's pretty easy to work with and abstracts away most of the more low-level stuff.  However, you might find it more useful, albeit more difficult, to start with something like Slick2D, as Java2D will only take you so far, and it's likely that you'll eventually want to move on to something else. 

Edit: Personally, I have very limited experience with Java2D, and made my first game with OpenGL, so it is possible.  I've only heard from others about the performance issues concerning Java2D as things get more complex.
Offline torched_platypi

Junior Newbie

« Reply #2 - Posted 2012-02-22 00:07:19 »

Ok, that sounds great. I read some other "Help me, I'm New" posts, and I was thinking about starting with Slick2D because it sounded better than Java2D. I think I'll try to create Pong to start with.

2 questions

1. How is OpenGL related to Slick2D?

2. Do you know any tutorials that I could go to in order to start learning Slick2D?
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline ra4king

JGO Kernel

Medals: 508
Projects: 3
Exp: 5 years

I'm the King!

« Reply #3 - Posted 2012-02-22 00:26:24 »

1. Slick2D uses OpenGL underneath, it just uses a friendly, Java2D-like API so it's great for beginners.

2. The Slick2D site should have many helpful links on the right side.

Also, this post should explain the whole situation with java gaming.

Offline torched_platypi

Junior Newbie

« Reply #4 - Posted 2012-02-23 01:09:28 »

Alright, thanks for everything. Hopefully I'll have Pong up and running in no time! (no time=hours of debugging and practice)
Offline cheekymonk3y

Senior Newbie

« Reply #5 - Posted 2012-02-24 00:30:15 »

Start with Java2D and the zetcode tutorials:

Pages: [1]
  ignore  |  Print  

hadezbladez (712 views)
2018-11-16 13:46:03

hadezbladez (353 views)
2018-11-16 13:41:33

hadezbladez (697 views)
2018-11-16 13:35:35

hadezbladez (175 views)
2018-11-16 13:32:03

EgonOlsen (2366 views)
2018-06-10 19:43:48

EgonOlsen (2478 views)
2018-06-10 19:43:44

EgonOlsen (1465 views)
2018-06-10 19:43:20

DesertCoockie (2131 views)
2018-05-13 18:23:11

nelsongames (1909 views)
2018-04-24 18:15:36

nelsongames (2576 views)
2018-04-24 18:14:32
Deployment and Packaging
by mudlee
2018-08-22 18:09:50

Java Gaming Resources
by gouessej
2018-08-22 08:19:41

Deployment and Packaging
by gouessej
2018-08-22 08:04:08

Deployment and Packaging
by gouessej
2018-08-22 08:03:45

Deployment and Packaging
by philfrei
2018-08-20 02:33:38

Deployment and Packaging
by philfrei
2018-08-20 02:29:55

Deployment and Packaging
by philfrei
2018-08-19 23:56:20

Deployment and Packaging
by philfrei
2018-08-19 23:54:46 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‑
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!