Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (777)
Games in Android Showcase (231)
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  
  Newbie needs some help  (Read 1513 times)
0 Members and 1 Guest are viewing this topic.
Offline frdfsnlght

Senior Newbie

Trying to understand

« Posted 2004-03-19 02:22:30 »

I'm tearing my hair out with this one. I've been programming Java for about 7 years, and before that I was doing low level 3D stuff (hand-coding line drawing, polygon filling, and transforms in assembly), so I have something of a background in 3D, just not Java3D.

I've done various searches here and on Google, but I can't find any remedy.

I've been working on the a tutorial ( and I've gotten to the end of chapter one where, supposedly, my program should produce a display with a square. I can't for the life of me figure out why it isn't displaying. All I get is a black window, no square.

I hate posting a pile of code and asking other people to help me, but I fear I have no choice this time. I'm totally stumped.

I've zipped up my code, complete with ant build script and batch file to start to app. I've posted it on my server:

Could someone please take a look and tell me what I'm missing? Please?

Offline frdfsnlght

Senior Newbie

Trying to understand

« Reply #1 - Posted 2004-03-19 15:23:56 »

After getting some sleep and calming down a bit, I realized I left out some pertinent info from my previous post.

First of all, there's only 4 source files in the download: implements main, implements the VirtualUniverse, implements the view, and implements the geometry. Together, the files implement a minimal 3d setup without using any of the utility classes in java3d. When I use the SimpleUniverse class from the utilities in other apps, I can get things working, but I don't want to use SimpleUniverse because I need more control over the view (when I get a bit further with my app).

I can run various demos from the java3d package successfully, so I know java3d is essentially working on my setup (which is java 1.4.1_01 and java3d 1.3.1 on WinXP Pro SP1).

Given the info here, I'm led to believe the problem is in the view related class ( and not the geometry class ( However, since I don't know what's wrong, who am I to judge?

I've tried fiddling with the camera location and geometry location, thinking maybe I wasn't seeing anything because it wasn't in view. I've also tried adding some ambient lighting, thinking I didn't have enough light. None of these things worked, which again leads me to believe there's something wrong in

I'm still stuck on this. Any help would be appreciated. Please? I can post the code directly to the forum if requested.

Offline frdfsnlght

Senior Newbie

Trying to understand

« Reply #2 - Posted 2004-03-20 16:41:36 »

I solved the problem. If I had the author of the tutorial in front of me now, I'd strangle him. It will always be a mystery to me why some authors don't test the code they publish.

The problem was the geometry all along. The 4 coords used to define the square were defined in the wrong order so the geometry was being backface culled. Reverse the order and the square appears.

What irks me most is that the author made a point of mentioning the order of the points to prevent just this problem. In a later section of the tutorial, he reveals that j3d uses the right-hand-rule for culling. His orginal example was based on the lef-hand-rule.

I'll try to drop the author a note so he can correct the tutorial.

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

JGO Coder

Projects: 2

Fire at will

« Reply #3 - Posted 2004-03-23 19:29:16 »

hehe, I hear that. The Java3D API Jump Start book is riddled with errors in the examples too.


Pages: [1]
  ignore  |  Print  

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

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

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

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

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

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

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

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

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

nelsongames (2291 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!