Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (498)
Games in Android Showcase (116)
games submitted by our members
Games in WIP (563)
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  
  Intro and questions  (Read 2235 times)
0 Members and 1 Guest are viewing this topic.
Offline Zantetsu

Junior Newbie





« Posted 2008-10-06 20:52:17 »

Hey all! I'm not sure how to introduce myself properly besides from saying I would like to develop Java games yet my expertise with the tools needed are a little erm... Lackluster.

Even with a good background in programming and 3D modelling I'm having some trouble understanding the principles of Java3D (an expert's opinion to start out with). Following more or less four tutorials (with the exception of Sun's) none of them actually lead me anywhere, even when I copied everything to see if I am doing it right. While I don't expect to master this tool overnight I hope a community would help out a clueless nublet who's trying to get more out of his studies from college. Smiley

Now for something I've been wanting to know for a while: Are there any easy to follow guidelines to start off with a screen (either window or applet is irrelevant) such as a template? To be frank the beginner tutorials aren't made for complete beginners like me and some even forget to mention which methods go where.

Sorry if I sound a little brash, I don't exactly have anybody to teach me this personally so it's kind of annoying doing geometrical shapes and whatnot when I've got third party models finished already. Sad
Offline tom
« Reply #1 - Posted 2008-10-07 06:24:20 »

The most basic Java3D application template:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
29  
30  
import com.sun.j3d.utils.geometry.ColorCube;
import com.sun.j3d.utils.universe.SimpleUniverse;
import java.awt.BorderLayout;
import javax.media.j3d.*;
import javax.swing.JFrame;
import javax.vecmath.*;

public class J3DTest {
    public static void main(String[] args) {
        Canvas3D canvas3D = new Canvas3D(SimpleUniverse.getPreferredConfiguration());
        SimpleUniverse simpleUniverse = new SimpleUniverse(canvas3D);

        BranchGroup rootBG = new BranchGroup();
        rootBG.addChild(new ColorCube());
        simpleUniverse.addBranchGraph(rootBG);

        Transform3D viewT3D = new Transform3D();
        viewT3D.lookAt(new Point3d(2, 5, 15), new Point3d(), new Vector3d(0, 1, 0));
        viewT3D.invert();
        TransformGroup viewTG = simpleUniverse.getViewingPlatform().getMultiTransformGroup().getTransformGroup(0);
        viewTG.setTransform(viewT3D);

        JFrame frame = new JFrame();
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        frame.setSize(640, 480);
        frame.setLayout(new BorderLayout());
        frame.add(BorderLayout.CENTER, canvas3D);
        frame.setVisible(true);
    }
}

Offline Zantetsu

Junior Newbie





« Reply #2 - Posted 2008-10-07 11:14:57 »

Thank you very much, it's just what I needed.  Cheesy
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Eli Delventhal

JGO Kernel


Medals: 42
Projects: 11
Exp: 10 years


Game Engineer


« Reply #3 - Posted 2008-10-07 17:31:24 »

I wouldn't bother learning Java3D, by the way, because if you're interested in making Java games it's definitely the wrong choice.

I would try LWJGL (an adaptation of OpenGL for games, among other things), for its ease of use and speed. Take a look at Kevin Glass's 3D tutorial to get you started.

http://www.cokeandcode.com/asteroidstutorial

See my work:
OTC Software
Offline Zantetsu

Junior Newbie





« Reply #4 - Posted 2008-10-08 22:47:08 »

LWJGL you say? Is that any different than JOGL library-wise? I see way too many libraries when I simply need an efficient enough one for videogame development.

I'm going to give it a look. After a whole week trying to memorise the very basic instructions to open a rendered scene J3D got very mind-numbing. Thanks for the tip. Smiley
Offline Eli Delventhal

JGO Kernel


Medals: 42
Projects: 11
Exp: 10 years


Game Engineer


« Reply #5 - Posted 2008-10-09 05:13:26 »

LWJGL is not hugely different from JOGL in terms of the actual OpenGL part, but JOGL is simply a Java OpenGL binding whereas LWJGL is specifically designed for games. It also includes other useful things like OpenAL support, etc.

See my work:
OTC Software
Offline Zantetsu

Junior Newbie





« Reply #6 - Posted 2008-10-09 20:39:31 »

I've got another question about this library and Java in general: Does it have any limits regarding what it can do? As in, an indy company called JaGEX proudly say their flagship game RuneScape keeps trying to surpass the limits and whatnot... But with a traditional online RPG I don't see how they could achieve that.
Offline gouessej
« Reply #7 - Posted 2008-10-09 21:13:46 »

I've got another question about this library and Java in general: Does it have any limits regarding what it can do? As in, an indy company called JaGEX proudly say their flagship game RuneScape keeps trying to surpass the limits and whatnot... But with a traditional online RPG I don't see how they could achieve that.
What do mean by "limits"? Be more precise. JOGL is even more reliable than pure OpenGL through C because some code is used to fix some bugs in Windows Cheesy it is not only a pure binding and the GLU has been rewritten in pure Java which allows it to be more reliable especially under Linux. You can do with JOGL what you can already do with OpenGL in C/C++.

Offline Zantetsu

Junior Newbie





« Reply #8 - Posted 2008-10-09 21:43:32 »

By "limits" I was referring to the developers opting for Flash instead of Java for games deducting it is slow, "ugly" and can't handle something at the level of 6th Generation games. Even I am not sure it could go beyond that though given the fact such detail would lag a PC too much (not to mention the size of the game growing) I doubt I'm going that far.

It's a relief. I picked Java for my game because it's multi-platform and browser based; the ideal for a game you'd want to play anywhere with/against somebody. Cheesy

Thank you all for the help! I'll be visiting regularly for advice and showing results. Smiley
Offline Eli Delventhal

JGO Kernel


Medals: 42
Projects: 11
Exp: 10 years


Game Engineer


« Reply #9 - Posted 2008-10-10 05:26:59 »

Pfft, for those who say that Flash is better than Java in terms of performance... well... they're smoking crack. Flash is vector-based and has built in drawing tools / image optimization so it's easier to make pretty stuff, yes, but it's total dog shit speed compared to Java. Flash is a loosely typed scripting language and Java is a professional programming language (although ActionScript 3.0 apparently improves on this).

I'd say the main reason to use Flash is audience. More people are willing to wait for a Flash game to load than who want to see the ugly Java loading image on an app; it's simply more familiar. That and all this "trust" nonsense you have to deal with sometimes and Sun is simply shooting their casual web potential in the foot.

See my work:
OTC Software
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.

radar3301 (12 views)
2014-09-21 23:33:17

BurntPizza (30 views)
2014-09-21 02:42:18

BurntPizza (20 views)
2014-09-21 01:30:30

moogie (20 views)
2014-09-21 00:26:15

UprightPath (28 views)
2014-09-20 20:14:06

BurntPizza (32 views)
2014-09-19 03:14:18

Dwinin (48 views)
2014-09-12 09:08:26

Norakomi (74 views)
2014-09-10 13:57:51

TehJavaDev (102 views)
2014-09-10 06:39:09

Tekkerue (50 views)
2014-09-09 02:24:56
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

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
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!