Hi, I'm a long time C++ programmer. I've also programmed in Direct X but I've never used a game engine.
I wrote some code a while back that generates a fractal planet about the size of the moon and lets you run around on the surface. I'm now updating it for better terrain with tunnels and houses and stuff. It was originally written for DX 9. What I'm wondering is if I can use this engine to save me handling a lot of the lower level crap. I need to generate meshes in real time from fractal functions and refine them on the fly. There really isn't much data on disk at all. The way I originally did it was to build things on the CPU and then download them to the card. As your avatar moved I would build new terrain chunks at the appropriate LOD, load them on the card and then switch over to the new model when everything was read to go. Collision is done on a separate model that's only built around what your Avatar can touch. Another requirement is that terrain coordinates have to be translated to a coordinate system such that the Avatar is always close to 0,0,0. Since the wold is so big it has to be done like this so the Z buffer works correctly. All this worked quite well so I want to keep the same basic system but if possible get some help with the graphics.
My basic question is since my needs are kids of specific is using a 3D engine going to help me much. I'm just afraid I'll end up throwing so much of it out that it won't be worth using. I eventuality want to make some kind of MMO game out of this but I'll worry about that in the future. Thanks in advance
Basic info about IRRLICHT and 3D engines in general
-
- Posts: 2
- Joined: Tue Oct 20, 2015 9:23 am
Re: Basic info about IRRLICHT and 3D engines in general
Sorry, that's really hard to tell for such a specific case where you already have something working. There is no automatism for that kind of stuff, so you would have to do the same in the engine. Where the engine helps is more for typical cases. Loading meshes in some common formats. Having some camera-code. Offering an UI and some support for platform independent input support. There is a basic collision system in Irrlicht.
But things like mesh-generation with fractals - that will always be custom code. Might even be a little bit harder with an engine as you kinda work around the abtractions.
But things like mesh-generation with fractals - that will always be custom code. Might even be a little bit harder with an engine as you kinda work around the abtractions.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
-
- Posts: 2
- Joined: Tue Oct 20, 2015 9:23 am
Re: Basic info about IRRLICHT and 3D engines in general
I guess I should have explained myself better. I intend to keep the code I have for generation of triangles. It uses a cross between marching cubes (in my case prisms), surface nets and an octree combined with the fractal functions . I realize the engine won't do any of this for me. In the end I get a tri-list but it's in my own data structure.........I guess I should spend a few days and try it and see how it goes....
-
- Posts: 11
- Joined: Fri Oct 09, 2015 3:17 pm
Re: Basic info about IRRLICHT and 3D engines in general
I would say if you encapsulated correctly the first version of your project you should be fine. i.e separating the hardware graphics handling and the on-the-fly world creation in RAM.
This way you should be able to port to a 3D engine in a straightforward manner.
Technically, you should be able to transfer your live in-RAM mesh to the card (mesh buffer) pretty easily with irrlicht AFAIK.
More to the original question, a 3D engine is GREAT so you don't have to mess with the underlying hardware and portability BS. Especially with Irrlicht, you know the graphics WILL start on any system, and you can focus your productivity on the higher level things.
I was building a DirectX 9 class library for my projects, but it was too much work with too many uncertainties, I recently decided to just use Irrlicht and it was the right move.
This way you should be able to port to a 3D engine in a straightforward manner.
Technically, you should be able to transfer your live in-RAM mesh to the card (mesh buffer) pretty easily with irrlicht AFAIK.
More to the original question, a 3D engine is GREAT so you don't have to mess with the underlying hardware and portability BS. Especially with Irrlicht, you know the graphics WILL start on any system, and you can focus your productivity on the higher level things.
I was building a DirectX 9 class library for my projects, but it was too much work with too many uncertainties, I recently decided to just use Irrlicht and it was the right move.