Recommended Posts

Greetings all,

I am have been a 'C' and Assembler systems coder for over 35 years. I am retired now and I want to try my hand at writing a game. I have been reading the documentation a great deal as well as looking at many examples. I have also been in communication with Dad72 who is a member here. He has been very kind. 

That being said I have some questions regarding the mechanics of Babylon.js. I am a real noob when it comes to this framework as I have always programmed 'on the wire' and never used a scripted language that is not strictly type cast so please forgive my ignorance. 

My goal is to build a 3D game that has a detective who runs around and solves crimes. He will go into several areas looking for clues and then use those clues to solve the crime. As an example, the detective may be sent to a warehouse where he will open a safe after finding the combination and then see some clues that will lead him to a suspects home. There will be human models, as well as different things that can be picked up examined and used. The story may be outside sometimes as well as inside. This is a very basic description of the mechanics of the game but I think you can see where I am going.

I need some advice on what documentation I should read. What forums I should frequent and perhaps even some examples. I am really at a loss as my area is low level operating system programming in Windows, Linux, and DOS. I do have some questions about what I think may help me, so if you would not mind I would like to ask them.

I have been doing some reading and stumbled upon SceneLoader.Append.

Is it possible to build an entire level in Blender, then export that with the Babylon.js Blender exporter, then load that with SceneLoader.Append? Is that the best way to build the game I described.

After a level is loaded can I then set up collision detection with actions?

Can I bring in different models with their textures and place them in the scene after it is loaded? As an example, opening a container will expose a model that was not there before. 

Can I also delete models from the scene after some action.

I have no idea how to accomplish any of this. I cannot load a terrain and place a model on it and keep it from falling through the terrain. I can't even build walls for a room and set up collision detection within the room. 

The one thing I do have is lots of time as I am retired and a clear understanding of programming principles.

Thank you so much for your time, it is greatly appreciated.

Regards,

Richard

Share this post


Link to post
Share on other sites

Hello and welcome!!

Here are some answers:

* For the forum, you already found it :) We have the best community here and you will always find valuable people willing to help you

* I would also suggest to read about TypeScript and perhaps this one: http://doc.babylonjs.com/how_to/how_to_start. You will see how we build babylon.js and also how we setup VS code to use it with TypeScript

* Regarding blender: Yes you can build everything in Blender (or 3dsmax) and export it to babylon.js. Each level could be a .babylon file and you can then use SceneLoader.Append to load each level.

* After loading each level, you can setup collisions (you can even set them up in Blender;))

* Regarding models: you can use SceneLoader.ImportMesh to bring new models in your scene afterwards

* Deleting as well :) (mesh.dispose)

 

I would recommend to first create a simple plane in Blender and export it. Then use this doc to load it: http://doc.babylonjs.com/how_to/how_to_use_assetsmanager

Then try to add a sphere or any object by using ImportMesh

Share this post


Link to post
Share on other sites

Hi @Lanktor 

Welcome to the forum & Babylonjs.

Interesting project :) 

What kind of controls have you imagined for your detective?
click-to-move? keyboard keys?

i would suggest using babylon's built-in collision system, compared to a physics engine which, with your description of models falling through the ground, i suspect you have been playing around with.
You can see it in action here; (camera vs mesh)
http://playground.babylonjs.com/#P00AG7
It also works mesh vs mesh, using the " mesh.moveWithCollisions(moveVector3) " function
Docs; http://doc.babylonjs.com/babylon101/cameras,_mesh_collisions_and_gravity
 

Share this post


Link to post
Share on other sites

Hello All!

What a great community! Thank you so much for all of your suggestions.

I have viewed some of the examples and read a lot of the documentation. I have also installed Blender and am working my way through a very nice beginner tutorial that is provided by Blender Guru. Sounds like he is from Massachusetts. Once I get through the tutorial I am going to make a very simple scene and export it using the Babylon.js plugin. This will probably take a few days but it is really worth the effort. I am learning a so much and between the documentation for Babylon.js and Blender I can see a great deal of potential!

It's wonderful finally having the time to work on a project as if it is my job!

Thanks again for all of the suggestions and help. I am sure I will be back with more questions.

Regards,

Richard

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.