Author Topic: 3D GUI development - objects positions  (Read 1991 times)

Offline RhoX

  • byte
  • *
  • Posts: 29
    • View Profile
3D GUI development - objects positions
« on: July 29, 2011, 10:09:05 am »
Hey, guys!

I have a problem here, if you could help me with some tips and/or tutorials, this kind of stuff, I would be glad: I am starting to develop some 3D interfaces for simulations on Android, using the jPCT-AE. I've seen some code examples, but I dont know how to "position" my models at the scene. It's kinda hard to explain: how am I supposed to know where the objects are (and how) if I'm not seeing the scene during the development?
I dont know if I could get it clear for you, but the idea is pretty much simple. Do you have some "technique" to develop interfaces, scenes in general? Or is it just like try and error?

Thank you in advance

RhoX

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11777
    • View Profile
    • http://www.jpct.net
Re: 3D GUI development - objects positions
« Reply #1 on: July 29, 2011, 05:56:18 pm »
Some people used simplified scenes with place holder models in 3ds or similar. Or describe the scene in some meta structure (XML or something). Personally, i'm more of a trial and error guy and i do my level layouts using simple ASCII files...but that doesn't work for more complex scenes.

Offline RhoX

  • byte
  • *
  • Posts: 29
    • View Profile
Re: 3D GUI development - objects positions
« Reply #2 on: July 29, 2011, 07:53:29 pm »
Hum,  I comprehend.
But how is this idea of using simple ASCII files to do your level layouts? And, about place holder models, is it like using a complete scene in 3ds and import it (all of its composing objects) to jPCT-AE?

Thanks again!  :D

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11777
    • View Profile
    • http://www.jpct.net
Re: 3D GUI development - objects positions
« Reply #3 on: July 29, 2011, 08:02:30 pm »
The ASCII levels are using a fixed grid and each char represents some kind of object or a wall or the floor or...like so (this is a level of my game Robombs):

Code: [Select]
*****************
* 8bcf**dc   3***
* ***c**bc    ***
* *4  ccccc  ccf*
*f* *****f*****c*
*b*c*****c*****c*
* *c***** *****c*
* *c*****b*****c*
*cc   ccbc*****f*
* **7** *kcfb * *
* ****fc***** * *
* ****d******cbc*
*cd***bbcf**c**c*
*fb***kc*d**cd  *
** 5*****b**    *
**  *****  c   2*
***  ****bc******
***cb***cc*******
****cf*   *******
****  cb6********
****ccdc*********
**   ccc*********
**      *********
**1     *********
*****************

I'm loading that, parsing it and creating meshes and/or placing objects based on it.

I'm not sure about the place holder stuff...i just remember that some people did that, but i'm not sure what exactly they did. Importing the scene as a whole isn't really feasible, because 3DS stores a lot of information in the file that the loader can't process...so your scene may end up mangled.

Offline RhoX

  • byte
  • *
  • Posts: 29
    • View Profile
Re: 3D GUI development - objects positions
« Reply #4 on: July 30, 2011, 10:11:34 pm »
I kinda understand your idea. It seems nice.
Do you have some piece of code, maybe a simple sample to clarify my ideas?

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11777
    • View Profile
    • http://www.jpct.net
Re: 3D GUI development - objects positions
« Reply #5 on: July 31, 2011, 08:09:48 pm »
The Robombs source code is available at Robombs' homepage (just scroll down): http://jpct.de/robombs.game/download/

It's for desktop jPCT, but that doesn't change the actual idea.

Offline RhoX

  • byte
  • *
  • Posts: 29
    • View Profile
Re: 3D GUI development - objects positions
« Reply #6 on: August 04, 2011, 10:26:00 pm »
Thank you very much for the reply!

I'm going to look at it and see what ideas I can reuse for my application!

 :D