This site requires JavaScript, please enable it in your browser!
Greenfoot back
GreenHouse
GreenHouse wrote ...

2013/9/22

Greenfoot 3D

1
2
GreenHouse GreenHouse

2013/9/22

#
More and more scenarios are going 3D. We have now raycasters and 3D engines; so why not create Greenfoot 3D? Same method names, same class names, same principle. But with the next dimension included :) What do you thing about?
SPower SPower

2013/9/22

#
Well, it's a good idea, but behind the scenes, I'm already working on a 3D engine in JOGL, outside of Greenfoot. It requires a lot of work, especially when you think about stuff like lightning, animations and loads of other stuff. When I'm finished, I'll probably tell it here, see what it can do to help this.
GreenHouse GreenHouse

2013/9/22

#
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
31
32
33
34
// lets setup the world
class DemoWorld extends World {
 
    public DemoWorld()
    {
        super(800,600);
         
        SampleObject sample = new SampleObject();
        addObject(sample,0,0,0);
 
        Camera.setPosition(200,0,0);
        Camera.lookAt(sample);
    }
 
}
 
// and the 3D Actor
class SampleObject extends Actor {
 
    public SampleObject() {
     
        super("marine.obj","texture.png");     
     
     
    }
     
    public void act() {
     
        getRotation().add(1,0,0);
     
     
     
    }
}
... will create something like this one isn't it easy? :D
SPower SPower

2013/9/22

#
Well, that sure looks easy, but when you want it to run really fast, so that it's also usable for more purposes, you'll have to get it to more complex stuff like uing JOGL (Java OpenGL). And it gets more complex once you add in texturing, lighting, schadowing, etc. Especially when you want to set it up so it's easy to re-use and scalable.
SPower SPower

2013/9/22

#
O, you're using something which has already done all of that... Yeah, then it's easy.
GreenHouse GreenHouse

2013/9/22

#
i used jpct because i'm familiar with this engine; so we only need to wrap these methods into the eays-use Greenfoot style
wabuilderman wabuilderman

2013/9/22

#
i think i would really enjoy a greenfoot 3d... it would probably be easier than java monkey engine, though unity would still be more graphical.
MatheMagician MatheMagician

2013/9/22

#
I am not sure Greenfoot3D would really be worth the time: by the time a user is capable enough to use it, he probably is good enough to start using something like JavaMonkey or jpct (though I have never used that before). By using those tools instead, he will not be limited by the constraints of Greenfoot.
GreenHouse GreenHouse

2013/9/23

#
Its the objective to create a 3d engine that is as easy as greenfoot now is.
Kartoffelbrot Kartoffelbrot

2013/9/23

#
That's a great idea. But I won't be a help for you. The math lessons in school teached me about the three Dimension, but my programming skills are not very developed so far. Especially I don't know all these Java classes you use. Maybe the project will be as hard, that you should take Money for it, when you take it to finish it. If it isn't too expensive I would buy it :) .
mjrb4 mjrb4

2013/9/23

#
You have to remember that Greenfoot is designed first and foremost for beginners - it's not really *meant* to be an environment where you can knock up the latest, huge, online, multiplayer, jaw-dropping graphically awesome game. Now some people have done rather good, technically challenging and impressive games in both 2D and 3D, and that's certainly a great thing to see! But gearing Greenfoot more towards higher end, advanced development would be at the same time detracting beginners from using it to get started - and if that's the case, it isn't doing what it should. Combine that with the fact that 3D is inherently far, far more complex than 2D and you start to see the issue. At a simple level it might seem like just moving and placing actors using 3 co-ordinates rather than 2 - but in reality you've got all sorts of problems that just don't exist in 2D - collision checking is much more complex (you can have vertex-vertex collisions rather than just point-vertex collisions), you need to start worrying about camera position and angles, there's several rotation methods you might choose to use all of which are more complicated than the 2D variant, suddenly actors need to be assigned 3D models rather than just images (which are much more difficult to find and expensive to produce), light sources and colours need to be defined, and that's just a bunch of things I can think of off the top of my head. There's also practical issues such as the need to integrate with native libraries for all practical purposes, which means you couldn't play it without downloading it. Sure, it's *possible* - but as said already, if you can manage all the above fine and want to create a 3D game then you're probably better off using JMonkey and working outside of Greenfoot!
SPower SPower

2013/9/23

#
@mjrb4 Well said!
Kartoffelbrot Kartoffelbrot

2013/9/24

#
Creating Greenfoot 3D hasn't to use Greenfoot, if I understood it correctly. It should be only as easy to handle.
MatheMagician MatheMagician

2013/9/24

#
I think what mjrb4 meant was that jmonkey is about as easy to handle as greenfoot. The only thing that really makes it harder is the fact that you have an extra dimension to struggle with.
GreenHouse GreenHouse

2013/10/1

#
Daamm :D first shared scenario from Greenfoot 3D Feel free to look into the source-code of this scenario :D And please send me your feedback!!
There are more replies on the next page.
1
2