Page 1 of 1

Irrlicht "Easy Engine" Official Post [UPDATED]

Posted: Thu Aug 18, 2016 10:29 am
by tdkr80
- Just scroll down to see the progress of the engine -

Hello, this is my first post here on the forums and am hoping to make it a good one.

I've started developing a Game Engine with Irrlicht (IrrlichLime, .NET Wrapper) while keeping in mind that allot of the time beginners would like something a little easier to use, but don't want to ditch the Irrlicht Engine. Naturally, I chose C# as the language of choice. The project will be released as a DLL and at a later time I'll release a GUI application along with it, for those who really just don't want to code.

So far, all I have is Terrain, Skyboxes, Meshes, a simple Water Plane and have started with lighting (Directional, Point & Spot)

To show you how simple it is to start to use all of the above classes below is a sample code

Code: Select all

 
Game game = new Game(800,600,"Game Title");
 
Render.CAMERA_TYPE = CameraType.FPS;
Render.DRIVER_TYPE = DriverType.OPENGL;
 
Terrain terrain = new Terrain("Heightmap.png","Grass.png","Detailmap.jpg");
terrain.AddToGame(game);
 
terrain.SetTextureRepeats(32,32);
terrain.EnableLighting(true);
terrain.SetScale(2);
 
Skybox skybox = new Skybox("DirectoryPath/Skybox/");
skybox.AddToGame(game);
 
Mesh mesh = new Mesh("Models/v3_bridge.obj");
mesh.AddToGame(game);
 
mesh.EnableWireFrame(true);
mesh.SetScale(10);
 
game.Run();
 
For each object you can set it's scale, position, lighting, wireframe, bounding box etc.

So what would you like to see in the engine?

Thanks,
Mathew

Re: Irrlicht "Easy Engine" Official Post

Posted: Thu Aug 18, 2016 2:50 pm
by Foaly
Hello!

I'm one of the developers of IrrlichtLime, and I'm happy it's being used.
In case you find any problems with it or if you have any suggestions, please don't hesitate to ask.

By the way, you said you're project will be released as a DLL. I guess you know that IrrlichtLime has both x86 and x86-64 build, but you could make your DLL build as "Any CPU", and let it auto-select the correct IrrlichtLime.dll.
I wrote a tutorial on that topic a while ago: https://sharkigator.wordpress.com/2016/ ... e-vs-2015/

Also, if you're developing a game engine, it should also have physics and sound.

P. S. In your example code, you set the video driver AFTER creating the game? How does that work?

Re: Irrlicht "Easy Engine" Official Post

Posted: Fri Aug 19, 2016 2:42 am
by tdkr80
Oh, haha! I didn't even realise I did that. You're right, that would come before creating the game.

I'll be sure to take a look at that tutorial.

I do plan on adding support for physics and sound but I figured that starting with graphics would be the more appropriate approach, also the fun approach as well.

I do have one question though, for the most part it's pretty simple converting code samples from C++ to C# but there's one thing I've been forever stuck on, a third person camera. Any suggestions?

Re: Irrlicht "Easy Engine" Official Post

Posted: Fri Aug 19, 2016 12:14 pm
by Foaly
tdkr80 wrote:I do have one question though, for the most part it's pretty simple converting code samples from C++ to C# but there's one thing I've been forever stuck on, a third person camera. Any suggestions?
Is there a specific tutorial for a 3rd person camera? But usually, it should be pretty easy to port code to C#.

Generally, you'll want the camera not to pass through wall, and you'll also have to smooth it's movement.
But I don't have too much experience with that.

Re: Irrlicht "Easy Engine" Official Post

Posted: Fri Aug 19, 2016 1:29 pm
by tdkr80
Thanks, I'm just not to sure where to start with cameras to be honest.

Also, thank you for the port.

Seriously.

Thank you!

Re: Irrlicht "Easy Engine" Official Post

Posted: Sat Aug 20, 2016 9:30 am
by tdkr80
Just an update for anyone taking a look.

I've added better keyboard and mouse handling methods, however you must still use the EventHandler that Irrlicht uses, which I honestly think isn't that much of an issue. Although I still need to come up with a better way to setup the handler.

I've also changed around a few things and now to set up a new game is even more simple.

The following code creates a simple game, which shows a mesh:

Code: Select all

 
// First we'll create our game
Game game = new Game(800,600,"Game Title",DriverType.OpenGL);
game.SetCameraStyle(CameraStyle.FPS);
 
Mesh mesh = new Mesh("Model.obj");
mesh.AddToGame(game);
 
// Lastly, we run the game
game.Run();
 
and to use the input methods you would first create an instance of the Input class in your game script and place something similar to following code in the games EventHandler

Code: Select all

 
input.Run(Event e)
 
if(input.GetKeyPressed(KeyCode.KeyA)) mesh.EnableWireFrame(true);
 
If there's anything you would like to see in the engines first release, please don't hesitate to PM me.

Re: Irrlicht "Easy Engine" Official Post

Posted: Thu Aug 25, 2016 5:36 am
by tdkr80
Just a quick update, low level shaders are now supported, just as simple as the rest, the example below uses the opengl low level shader used in the tutorial examples

Code: Select all

 
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using GameEngine.Core;
using GameEngine.Components;
using IrrlichtLime.Core;
using IrrlichtLime.Video;
 
namespace GameEngine
{
    class Program
    {
        static Game game;
        static Mesh mesh;
 
        public static void Main(string[] args)
        {
            game = new Game(800, 600, "Game Title", DriverType.OpenGL, false, true, true);
            game.SetCameraType(CameraType.MAYA);
 
            Shader shader = new Shader("../../../media/opengl.vsh", "../../../media/opengl.psh",MaterialType.TransparentAddColor);
            shader.AddToGame(game);
 
            mesh = new Mesh("../../../Models/v3_bridge.obj");
            mesh.AddToGame(game);
 
            mesh.SetScale(100,100,100);
            mesh.SetMaterialType(shader.GetMaterial());
 
            IrrlichtLime.Scene.SceneNodeAnimator anim = game.GetSceneManager().CreateRotationAnimator(new Vector3Df(0, 0.3f, 0));
            mesh.GetNode().AddAnimator(anim);
            anim.Drop();
 
            game.GetVideoDriver().SetTextureCreationFlag(TextureCreationFlag.CreateMipMaps, true);
 
            game.Run();
        }
    }
}
 
With shaders, I'll always remain a little lost so if there's features that are an absolute must with shader support please feel free to let me know. Also, if anyone has any other example shaders I can use feel free to send them my way.

Next, I'll be working on particles. For this part of the engine I'll be working on a bit of a side project, which is a visual editor to make particle creation in the engine a whole lot easier.

and of course, screenie:

Image