Building a room environment

Hi everyone, my game environment is a room with and i hope you could help me with two question. The tutorials i've seen here there are terrains but i want a plain "terrain" for the floor. Which class is correct to buil such floor? I've tried TerrainBlock but i don't know if it is correct. Another question is about the walls, i was wondering the better way to build them, like a sky or using another kind of object.



Thanks in advance.

1 Like

a room like "in a house"?

i'd suggest a quad, or maybe a box if you can walk below and above it.



that is, if you want to build a simple box-like room with stuff in it. if you want to build a complete house, be cool and use bsp. and share our code, i need that too. :smiley:

Hi, my idea is making a race with little cars inside a room in a house, for now just the room matters. I've read about portals and other things here on the forum but i am confusing, my room seems so simple, just a floor and four walls. Is there a easy way to do this?



Thanks.

You can use a SkyBox, which is actualy just a box with inverted normals, to be your room.

even though harder initially, getting into using a 3d modelling tool like max, maya, blender etc will really make your life easier in the future for things like this

MrCoder said:

even though harder initially, getting into using a 3d modelling tool like max, maya, blender etc will really make your life easier in the future for things like this


totally agree~ :D

Hi, so you are saying that is better do the room in a modeling tool and then import it into my game?



p.s.: I

yes  :smiley:



(besides…having english as native language, like the mojomonkey, is geeky s)

I'm curious about the specifics with doing this.  I'd agree with creating a model as your environment, but the movement and placement on the model…I dunno…yeah.  Maybe using Collada for the areas, and certain properties for floors, or something?  I was reading a bit yesterday about portals and bsp trees, but the actual implementation in jME of the concepts is something I haven't yet seen.



I did read that batman and someone else were working on it, but those posts seemed quite old.  Any conclusive information, or alternatives?  If it's something that needs to be added, I may have time to put towards starting to work on it in about a month.  I'd like to see Quake or Half-Life-like games produced in jME.

i did wrote a method specifically for model collision checking which can be used for model walking.



and then all u need to do is to make sure ur camera doesnt go outside the model room

Maybe you should add a little spice into the debate.





Is the camera fixed ?, if so at what angle. If not - what are the bounds of moving the camera ?



Do you want items in the room ??, may these obscure the vision of the race track



Do you want gradual shadowing on the wall ??



Will the ceiling be visible ?







There are so many ways to do this, you just need to describe what the user can and caasnot do, what the user can cannot see.

The rest is being the magician and tricking the user…










As i said, the room will be a scenario to a race between litle cars. It has to be a environment with realistic physics, the camera is fixed at high point and will follow the car from there (not chase from behind like rock and roll racing http://www.juegomania.org/Rock+n+Roll+Racing/fotos/snes/1/1644/Foto+Rock+n+Roll+Racing.jpg) and with some other objects like toys, etc.

If i use a modeling tool to build the room and if i use SimplePhysicsGame, the objects inside a the room will be affected by physics and collision detection?



Thanks.

You could therefore just use 4 wall quads and one floor quad

Hi, i did the walls (1 object with 4 planes, no floor) in a 3D tool but when my car is inside it (between the planes, surrounded by them) the car model gets mixed up and all wrong. If i set the wall object to ghost material the car model problem is gone but i want the collision between them. If i understood, the problem is because the wall object is not empty, it is like i putting two objects in the same place. If so, how can i solve this?

Thanks in advance.

If you let us know up front exactly what you are trying to do maybe we could cut out the middle bit and give you the answer.



You have now added collision detection on what was initially as simple room. is there anything else that migth effect the scene. are you concerned about back culling and camera issues. Do you intend the wall to break up into broken pieces…


I think he just did a big box (with normals inside) and generated a StaticPhysicsNode from it. Then put my car example inside it (the car consists of 9 DynamicPhysicsNodes). I think that's not possible, since the box is a Solid Body in ODE's way of representation… I think the best aproach is to make the room out of 6 Quads… Each one making one independent StaticPhysicsNode…

That is exactly what i did, i didn't use quads because a thought 3D model would be easier but i will try this.

:smiley: