Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - NeroGames

Pages: 1 ... 4 5 [6] 7
76
SFML projects / Re: Nero Game Engine
« on: October 14, 2017, 11:10:36 am »
How to use the Engine 03 : Play with Meshes !    |    Part 2 : Mesh and Meshed Object Properties !

Hi everyone, how are you doing !  In this second Howto on Meshes we'll talk about some Mesh properties.

Mesh Object and Meshed Object

First of all, I hope that, both words are not confusing you, I don't think that munch before to choose my Classes names, I just took the first ones that come to my mind  ;D.

There is a little reminder
  • Mesh Object = Mesh
  • Meshed Object = Mesh + Sprite

Both Objects carry a Mesh and that Mesh can be configured to suit your needs.

On the Left of the Engine, along with the Sprite Tab and Color Tab, you get the Mesh Tab, we gonna play with it. The properties below work the same way on both Objects types, you just have to select them and apply the one you want.

Fixed Rotation

This one is pretty easy, when activated, your Object will never rotate even if it stand on a sloping ground or if it get hit by a projectile.

Is Sensor

This is one of the Coolest feature of Box2D. When talking about Box2D the first thing people see is the "Physics Simulation" Part of the library. But the thing is, if you set all your objects to Sensor mode, you end up with a powerfull "Collision Detection Engine" without any Physic Simulation. This let you free to implement your own Physic Simulation.

Object in Sensor Mode stay affected by Gravity, but that's all, they don't participate to the "Physics Simulation". that's make them great to build your game logic. You can use them to check if your Character has reached a certain area and then trigger a specific event. When i'll build my game prototype, i'll show how you can use Object in sensor mode to do great things.

Allow Sleep

This property is activated by default, and it should stay like that. It will help reduce the computation operated by Box2D.

Density | value : [0 - 100]

What is Density ? in simple words it's a short of relation between an Object Volume and its Weight. For the same volume, the same Object will get a higher weight if its Density get increased. In your game, that will make your objects more stronger.

To check that, create two identical Polygon Meshes, let's call them Left_P and Right_P. Now using the mouse, take Left_P and throw it on Right_P. Right_P will get ejected easly, now increase its density to 100 and throw Left_P on it again, you will see that now Right_P is more resistant or stronger.

Also the Density don't affect the way Gravity affect the Object. Two Ojects with the same volume, and different density (e.g different weight) will be affected the same way by the gravity (in the absence of air resistance to be more accurate). Fo more detail on that go check Newton Laws.

Friction | value : [0 - 10]

What is Friction ? If you don't want your Object to slide on a sloping ground just increase its Friction. If you want your Object to slide on any surface like if it was ice set the Friction to 0.  For more technical explication you can Google Friction Force

Internally Box2D use a range value of [0 - 1], In order to avoid using decimal, the Nero Engine use the range value of [0 - 10].

Restitution | value : [0 - 10]

What is Restitution ? Increase Restitution will allow your Object to bounce more easly. For more technical explication you Google Coefficient of restitution

Internally Box2D use a range value of [0 - 1], In order to avoid using decimal, the Nero Engine use the range value of [0 - 10].

Gravity Scale | value : [0 - 10]

If you want to change the way your Objects are affected by gravity, this is the property to configure. Set the value to 0 will allow your Object to float on the air. Increase the value, will make your object fall down more quickly.

The Engine Physics Default settings

When using Box2D the first time, The first thing you notice, is that the physics simulation is slow. According to my experience there are three Settings to configure in order to fix that.

  • The Pixel / Meter Ratio used
  • The Box2D World Computation Freqency
  • The Box2D Bodies Gravity Scale

The Nero Engine use a Pixel / Meter Ratio of 30. It means that 30 pixel on your canvas will be equivalent to 1 meter for Box2D. This value is hard coded in the Engine, I may consider make it configurable in the next releases.

The Default Computation Frequency is set to 30 Hertz, you can see it on the Right of the Engine. Fill free to play with this value.

The Engine also use a default Gravity Scale of 3 for all Object. I've tried several values and comes up with this one, it's the most important parameter between the three. the computation Frequency coming in second position.

By adding more and more Dynamic object onto the Canvas, the Physic simulation may become slow, so, remenber to play with those Three parameters in order get the Simulition Speed that suit you.

77
SFML projects / Re: Nero Game Engine
« on: October 08, 2017, 03:34:05 pm »
When will the Source Code be released ?

Hi everyone, how do you do !

Many people have beeen asking for the Source Code, so I wanted to let you know about it.

The Code will be available after the Engine First Release. After that first release, I will work on the Code in order to reorganize it, add comments there and there and make it more clean. I can't give the exact time, but I may estimate that to three months.

As soon as the Code will be on Github, I'ill make a post to prevent you. Also from now, you can find the link to the repository in the Footers of my posts.

Howtos

I've been busy those days so I did not get some time to continue the Howtos. I will complete the remaining ones the next week.

78
SFML projects / Re: Nero Game Engine
« on: September 26, 2017, 08:33:34 pm »
Missing DLLs

I've forgotten to add GCC DLLs. If you don't have the GCC compiler installed, you won't be able to run the Engine. Thank you for pointing that out Ruckamongus, as you mentioned it's possible to link them statically, but I prefer to share the DLLs.

There is the download link : Missing DLLs

? ?
It'd be cool if you had saving/loading working so you could include a complete project.

I don't get what you mean here. If it's about Save and Load your Scene in the Engine, it works fine now.

79
SFML projects / Re: Nero Game Engine
« on: September 25, 2017, 11:18:54 pm »
How to use the Engine 03 : Play with Meshes !    |    Part 1 : Mesh Edition !

Meshes are a key component of the Engine. I'm sure you'll like to play with them.

There are four types of Mesh. Polygon, Circle, Line and Chain. When you click on the Mesh_Selection button on the Right of the Engine, you don't see "Chain" along with "Polygon", "Circle" and "Line", that's normal because Chains are created out of Lines.

soooooooo Let's Begin !

Switch between the Object Mode and the Mesh Mode

You can switch easly between Object Mode and Mesh Mode using the Space bar key.

If you want to get to the Play Mode you have to do CTRL + Space bar, to come back to Object Mode, just press Space bar again (we'll talk more about that later).

When you are in Object Mode, you are dealing with the Object_Manager of the current Scene. By going in Mesh Mode, you are letting the Mesh_Editor take control of the Canvas.

The Mesh_Editor has access to all Meshes present in your Scene either the mesh is encapsulated in a Mesh_Object or a Meshed_Object. It can fully modified them but not delete them.

Move Vertex

To move a Vertex, Left_Click on it, and drag it where you want.

Move Line

To move a Line, Left_Click on it, and drag it where you want.

Add Vertex

Vertice can be added on any Line. For that, make a Right_Click where you want on a Line.

Remove Vertex

A Right_Click on a Vertex will remove it.

Drag Mesh

You can Left_Click and drag easly a Polygon, a Circle or a Line. To move a Chain you have to select it first (see below)

Select Mesh

Use CTRL + Left_Click in order to select any Mesh, it will become Orange

You can click any where else in the Canvas to make a deselection (In the next release I will configure the Escape key for deselection)

Move, Scale, Rotate Mesh

When a Mesh is selected you can Move, Scale or Rotate it the same way you do with Sprite : CTRL + Numpad Keys. The Mouse is not used here, it works only with the Numpad.

Extrude Line

If you have ever used a 3D modeling software you know what Extrusion means, if not you can Google it.

In order to Extrude a Line you just have to hold the SHIFT key then Left_Click and drag.

Extrude Vertex

Works same as for Lines. Hold the SHIFT key then Left_Click on a Vertex and drag.

It only works on Lines and Chains Edge Vertice Currently !!!, I may consider extend that to others Vertice in the next releases.


Flip Mesh

I did not consider that feature even once since I've begun the Project. I'll make that for Engine Second Release.

Mesh Validation

Each time a Mesh is modified the Mesh_Editor checks for its validity. When a Mesh it's not valid it becomes Red

A Red Mesh is not converted in Box2D Body because the Box2D library raise Exceptions when it can't generate a Body.

The Mesh Validation System is currently incomplete !!! You may encounter some crashes when you have at least three Vertices almost aligned. The current solution is to Save your Scene before hitting the Play_Button or the Return Key.
 
That's All !

So, that's all for this Howto. With the Mesh_Editor, you can create any shape like Trees, Animals , Landscapes, the limit is your imagination.

when you are done editing some Meshes, you can press the Space bar key to return in Object Mode and then press the Return key in order to see your Meshes come alive. On the Bottom Right of the Engine you have some Check_Buttons that allow you to hide or show divers information about Box2D Bodies.

80
SFML projects / Re: Nero Game Engine
« on: September 25, 2017, 09:35:26 pm »
How to use the Engine 02 : Control the Camera !

Hi everyone !

In the previous Howto, we saw how to add, remove, duplicate objects and more! so let's play with the Camera this time.

Scroll the Camera

Using the Numpad you can scroll horizontally and vertically the Camera using the following keys :
Numpad_4, Numpad_6, Numpad_8, Numpad_2

Using the Mouse you can achieve the same actions with CTRL + Mouse_Wheel for scrolling vertically and ALT + Mouse_Wheel for scrolling horizontally.

If you use a Touch_Pad you don't have to use ALT + Mouse_Wheel, you can scroll horizontally directly.

Scale the Camera

Using the Numpad you can scale the Camera with the Numpad_Addition and Numpad_Substruct keys.

Using the Mouse you can scale the Camera with the Mouse_Wheel

Rotate the Camera

Using the Numpad you can rotate the Camera with the Numpad_7 and Numpad_9 keys

Using the Mouse you can do the same with SHIFT + Mouse_Wheel


Save and Restore the Camera

I guess the actions above were pretty obvious, so what about this one.

The Canvas is infinite, so you may lose yourself going here and there. In order to avoid that you can register the current Camera state (Position, Scale, Rotation) with ALT + Numpad_5. Now you can go where you want and press the Numpad_5 key to come back.

81
SFML projects / Re: Nero Game Engine
« on: September 23, 2017, 06:49:39 pm »
How to use the Engine 00 : The Nero Dev Engine !

Hi guys ! Are you ready for the Nero Game Engine Adventure ?.....? Let's begin !

This series of Howtos will show how to use the Nero Dev Engine. Since the engine is not complete, those Howtos will cover only the available features.

You can download the Dev Engine in the beta version on the Post just above this one!

There is a little overview of those Howtos.
  • How to use the Engine 01 : Play with Objects !
  • How to use the Engine 02 : Control the Camera !
  • How to use the Engine 03 : Let's Edit Meshes !
  • How to use the Engine 04 : Workflow !
  • How to use the Engine 05 : Use your own Resources !

Before we start, one more precision. The Dev Engine Interface can be divided into Three Main Part :
 
The Left : The left side of the Canvas : Engine Mode, Save, Load, Sprite Tab, Mesh Tab, Color Tab
The Center : The Canvas, the utility buttons on top the Canvas, the Log window bellow the Canvas
The Right : The right side of the Canvas : Layer, Mesh, Object, Scene, Draw Checkbuttons, etc.

So if I say you can change the current Scene using the Select Button in the Top Right of Engine you know where it is.





How to use the Engine 01 : Play with Objects !

Build a Game Scene consists to add Objects onto the Canvas and then Customize them. There are three (3) types of Objects : Sprite_Object, Mesh_Object, Meshed_Object

Add Sprite Objects

In order to add a Sprite_Object, click on a Sprite_Button. On the Left of the Engine, you have the Sprite_Tab. By passing the Mouse over the a sprite button you can see a Sprite_Preview. You can use the Numpad_Multiply and Numpad_Divide buttons to scale the Sprite_Preview.

Add Mesh Objects

In order to add a Mesh_Object, select a Mesh_Shape (Polygon, Circle, Line). On the Right of the Engine you have the Mesh_Selection_Button.

Mesh_Objects are created with a default Type. Polygons and Circles are always created as Dynamic Mesh and Lines as Static Mesh.
In order to change the Mesh type, select it and choose the Type you want (Dynamic, Static, Kinematic).

Add Meshed Objects

In order to add a Meshed_Object hold the CTRL key and click on a Sprite Button, it's the same way that to add a Sprite_Object but you need to hold the CTRL Key befor.
The default Mesh of a Meshed_Object is always a Dynamic Polygon Mesh. To change that, select your Meshed_Object then choose the Mesh_Shape and the Mesh_Type you want.

A Meshed_Object is a combinaison of a Sprite_Object and a Mesh_Object, so Actions that can be applied on one of the both, can be applied to the Meshed_Object.

Select Objects

When you make a Left_Click on an Object, you Briefly select it. As soon as you release the Left_Click the Object get unselected.

In order to make a Permanent Selection you have to make a Right_Click on the Object.

Remove objects

You have two ways to delete an Object. The first one is to make a Permanent Selection and then press the Delete Key. The second one is to hold ALT and Left_Click on the Object.

Move, Scale, Rotate  Objects

You can Move, Scale, Rotate Objects with either the Numpad or Mouse.

Mouse / Move : Left_Click on a Object. Hold your click and move the mouse
Mouse / Scale : Hold the CRTL key. Then Left_Click on an Object. Hold your click and move the mouse Up or Down
Mouse / Rotate : Hold the SHIFT key. Then Left_Click on an Object. Hold your click and move the mouse Up or Down

Using the Numpad you have to make a Permanent Selection on the Object first and then Hold the CTRL key.

Numpad / Move : Numpad_4, Numpad_6, Numpad_2, Numpad_8
Numpad / Scale : Numpad_Addition, Numpad_Substract
Numpad / Rotate : Numpad_7, Numpad_9, Numpad_Multiply, Numpad_Divide

Flip Objects

The Flipping concerns Sprite_Object or Meshed_Object. When you apply it to Mesh_Object or even Meshed_Object you may encounter some weird behaviours, that because, Meshes are not meant to be flipped. But it's not a big deal, you just have to Edit your Mesh to fix it. I'll correct the Flipping function for Meshes one day  :)

In order to Flip an Object, first make a Permanent Selection and then Hold the CTRL key

Numpad / Flip Horizontally: Numpad_1
Numpad / Flip Vertically : Numpad_3

Duplicate Objects

This is great to make Tiled-Like Scenes.

In order to Duplicate an Object, first make a Permanent Selection and then Hold the ALT key

Duplicate Horizontally and Vertically    : Numpad_4, Numpad_6, Numpad_2, Numpad_8
Duplicate in Diagonal                  : Numpad_1, Numpad_7, Numpad_9, Numpad_3


Layers

On the Right you can see the Stack of Layers. There are some buttons to Add, Delete, Move UP and Move Down Layers.

The See_Button allows to Hide or Show a Layer
The Check_Button allows to Select a Layer

When you add an Object, it goes to the Currently Selected Layer. But Layers always contain the same Type of Object. So if you add a Sprite_Object when your currently selected Layer contains some Meshes, the Engine will create automatically a new Layer before to add the Sprite_Object.

Move an entire Layer

It is possible to move all Objects in a Layer. In order to achieve that, first, make sure the Layer is selected, then Hold CTRL and ALT and use the following keys: Numpad_4, Numpad_6, Numpad_2, Numpad_8

That's All!

That's all for the first Howto. Just bear in mind that you can play with Objects either with the Mouse or with the Numpad. By default the Numpad is used to handle the Camera, so in order to used it with Objects you have combine it with CTRL or ALT. We'll talk about the Camera in the next Howto.

82
SFML projects / Re: Nero Game Engine
« on: September 23, 2017, 11:06:07 am »
Nero Game Engine Happy Release 2.0

Hi everyone, how do you do!

Before to begin with the Engine Howtos, i've taken the time to add the following features to the Engine.
  • Save and Load Scenes
  • Auto Save Scenes
  • Undo and Redo Actions

I'll present those features briefly, the details will be for another post

Save and Load Scenes

Each Scene is saved in a single JSON file locate at NERO/scene_name/scene_name.json

Auto Save Scenes

The Auto Save feature is based on the Save and Load feature, when Auto Save is activate, the scene is saved each 30 seconds

Undo and Redo Actions

This feature is an unexpected one.  I did not plan it since the beginning of the Project. But when, i've completed the Save and Load feature, I realised that I could use it to build a Undo Redo System.

Currently there no limit on the number of Undo-Redo.

Download link

Nero Game Engine Happy Release 2.0


Howtos

I'll begin the How to use the Engine series this weekend

83
SFML projects / Re: Nero Game Engine
« on: September 18, 2017, 12:32:48 pm »
Nero Game Engine Happy Release  :)

Hi! everyone, in a  previous post, i've said that i will be busy on the next days, so i'll need to slow down the development, but guess what, i suddenly get some days off! what allows me to make a great progress on the Engine. Therefore i'm pretty happy now  ;D. Instead of making a post on the new features or make a video, i've thought, it would be better if you can try the engine yourself.

There is the download link, it is a 32 bit version, it should work on any Windows

Nero Game Engine Happy Release 1.0

One Precision, this is not the Engine First Release, it just a way to let you have fun with the engine.

Inactive Features

The following features have been disabled or are not implemented yet
  • Auto Save
  • Save
  • Load
  • Grid
  • Gravity (Grav X, Grav Y)

Break the Engine , Report bugs

Currently the Engine doen't defines limits, the canvas is infinite, the number of objects that can be added is infinite, the number of vertex in a line or polygon is infinite, objects can be zoom down or up at infinite etc.

So you are free to play as you want. I encourage you to try to break the engine in any you could think, and if you find bugs just report it.


Resources

The resources used in the download has been grabbed over the internet, i've no right on them, but they are mostly free resources.

You can use the Textures you want, just copy them in the /Resource/Texture folder.


How to use the Engine

I will make some regular posts on how to use the Engine, and if you have any question just ask, Those posts will be gathered later in order to build the engine Tutorial Book

The Engine use the following Inputs

  • Mouse or TouchPad
  • The Numpad
  • CTRL, SHIFT, ALT  : in combinaison with the Mouse, TouchPad and Numpad
  • Space bar, Escape, Delete, R, P, B, Right Arrow, Return

84
SFML projects / Re: Nero Game Engine
« on: September 06, 2017, 10:13:02 pm »
What next for the Nero Game Engine ?

Hi! Everyone how are you doing  :D

It's almost one year that I’ve started the project. I've got into the habit of making a post only when I actually make some progresses in the development. I know, that, in this way it's difficult for you to understand where I am going with the Engine. So in this post I will describe the work that need to be done in order to complete the Project.

The First Release
 
The first release will be the version 0.6.x, the Engine will be released as a precompiled library/API and games will be developed in C++
In order to make this release many tasks need to be done.

  • Task 1: Rebuild the "Saving and Loading" feature

    When I’ve implemented the Object’s Tree data structure, I’ve completely modified the engine heart. By doing that I’ve destroyed totally or partially some features like: the way things are added or removed in the canvas, the way things get selected, the way the layers work, etc. I've already re-implemented most of those features. The remaining one is the way Scenes are Saved and Loaded.
    Good news, I’ve already solved that in Pseudo code, I just need to make the implementation.

  • Task 2: Add a window that let edit Physic_Objects properties

    As you may saw, the Engine use Meshes in order to generate Physic_Objects. So all Physic_Objects properties are carried by Meshes. Currently only the type (Dynamic, Kinematic, Static) of the mesh can be choosed. But for those you know Box2D, Box2D bodies are made of one Body (b2Body) and somes Fixtures (b2Fixture). Bodies and Fixtures have properties like density, velocity, fix rotation etc. that can be customized. So there will be a window to handle that.

  • Task 3: Add a way to give a "Name" and a "Category" to each Object

    The Name of a object will be the primarily way to retrieve it in the code. In the code it'll be possible to write something like: Object o = engine.findObject(“ojbect_name”)

    The Object Categories will serve primarily to build the game collision logic. In simple word you will be able to specify which category of object can collide with which other category. In the code it'll be possible to write something like:
    • can_collide (Player, Enemy);
    • can_collide (Player_Bullet, Enemy);
    • can_collide (Player, Enemy_Bullet);

    Internally the engine will configure Box2D Collision Filtering for you.

  • Task 4: Process Box2D Collisions

    Build a game will consist mainly to retrieve collisions and give response to them. Box2D gives four functions to handle collisions:
    • BeginContact(b2Contact* contact)
    • EndContact(b2Contact* contact)
    • PreSolve(b2Contact* contact, const b2Manifold* oldManifold)
    • PostSolve(b2Contact* contact, const b2ContactImpulse* impulse)

    As I don't want users to struggle with Box2D stuff (It really gives some headaches), the Engine will process collisions for you in order to simplify things. For each of those four functions you'll be able write something like

    • nero::Collision c = engine.process(b2Contact) or
    • nero::Collision c = engine.process(b2Contact, b2Manifold) or
    • nero::Collision c = engine.process(b2Contact, b2ContactImpulse

    That way you will only have to deal with nero::Collision, the nero::Collision will give you the two nero::Object that are colliding and all other information concerning the collision.

  • Task 5: Build a game prototype

    To ensure that the Engine is ready for a first release I will build a game prototype. The prototype will be entirely made with physics, that means no graphics (Sprite), no sound, no music. The goal will be to have a fluid game.

    It’ll be a platformer, the Player will be a simple Cube or Circle that can move right/left, jump, double jump and dash.

    This prototype will be used to test the engine fluidity but also its limits.

The Second Release

After the first release, we will have an Engine that work fine, with most bugs fixed. Now in order to show the power and the potential of the Engine I will build a small adventure game (only one scene) with high quality graphics. In this game, Box2D physics will be completely transparent and the following features will be added
  • Animation Object
  • Sound Object
  • Music Object

When this game will be completed the Engine will be ready for a second release (The Official one with a full tutorial). And again the engine will be release as a precompiled library/API and games will be developed in C++

The Third Release

The third release will concern the version 0.7.x to 1.0.0

In those versions Lua will be added as a scripting language, therefore the default language to build games with the Nero Game Engine will be Lua. And the Engine will no longer be a Library/API, You will be able to install the engine as any other software on Windows, Linux and MacOS and start build games in your prefer IDE (Notepad++, Sublime etc).

The End

After adding Lua as a scripting language, my work will be completed. Of course I’ll continue to maintain the Engine and fix bugs but I will no longer add some features.

But, you should know that many features could still be added to the Engine, features like Particle Object, Soft Light Object, Shader Object, Artificial Intelligence etc. Also ones could think to carry the Engine on QT in order to benefit from more advance feature like color wheel, MVC structure, file management etc.

The Engine will be open source, so if any one wish to add features to the Engine it'll be up to him, also I know there are others great projects on this forum, those projects could be combined with the Nero project in order to build a real big and robust framework for SFML users.


It's all for this post, have a good day  8)


85
SFML projects / Re: Nero Game Engine
« on: August 27, 2017, 06:27:22 pm »
Hi! guys, thanks for the replies, it helps me improve my work.

It seems i still have a lot to do on the logo  :P. I'll make more researches on logo creation, and also ask a friend to help me with that.

From the end of this month i'll be a little busy with other stuff, so the development of the engine will slow down a bit.

In my next post, i'll discuss the remaining tasks before the first release, and also when i plan this release to be done.

86
SFML projects / Re: Nero Game Engine
« on: August 24, 2017, 10:39:13 pm »
Solid Object



As you may saw in the previous video, it's easy to add physics to sprites or more exactly to create Solid Objects. The following picture shows the process.



Things begin in the Engine Object Mode. First add a sprite, then select the sprite and add a Mesh. Et voila ! you just created a Meshed Object. The Mesh can take any Type (dynamic, static, kinematic) and any Shape (line, chain, polygon, circle).

By cliking on the Play button, the Engine goes to the Play Mode, it generates a Physic Object from the Mesh and attaches the previous sprite to it, what give us a Solid Object.


Physic Object

When you simply add a MeshObject (without selecting a sprite), the MeshObject becomes a simple Physic Object. This is good to create grounds, delimit areas or build the scene base shape. here is a resume of all objects.



A Versatile Engine

The way the Engine as been built, allows it to create any type of 2d games. When i've started the project, i've specified that i will focus on platformers, but even if you don't want to use Box2d physics or make platformers, The engine will suit to you as well. The Engine may be used to create RPGs, Top Down games, or Puzzle games like TicTacToe. We may notice three types of users.

  • Users 1 : I want to use all Box2d features

    That is the default behavior of the engine, you can use Bodies, Fixtures, Joints, Collisions, everything from Box2D

  • Users 2 : I don't want to use Box2d at all

    You just have to destroy all Box2d Bodies and Joints and then nullify the b2_world (m_World = nullptr). Of corse you won't have to do it yourself, i will add a Macro to handle that.

  • Users 3 : I want to use Box2D collisions but, I don't want Box2D Physics simulation

    You just have to make all Bodies as sensors, by doing that you will have a functionnal collision system without any physics simulation. I will add a box you can check somewhere, so all bodies will be automatically in sensor mode.


The Engine Logo

I've tried differents designs for the Engine Logo, and finally comes up with this one. Let me know what you think !





87
SFML projects / Re: Nero Game Engine
« on: August 09, 2017, 04:39:32 pm »
Nero Game Engine 0.5 / Enjoy Box2D Physics !

For this post, i'm not going to talk alot, just checkout the following video. I'm sure that many people who wish to make games with SFML and Box2D have dream of something like that.


88
SFML projects / Re: Nero Game Engine
« on: August 09, 2017, 02:30:18 pm »
Mesh, Mesh Object and Mesh Editor

Hi! everyone, how are you doing. Let's talk about Meshes this time.

The Engine Modes and SubModes

Before talking about Meshes, it would be helpfull to talk about the Engine Modes and SubModes.
The Engine has been built to work in several Modes. Currently the Engine has only one Mode, the Scene Edition Mode. This mode allows to build a scene.
Each Mode has several SubModes. Our Scene Edition Mode has three SubModes : Object, Mesh, Play.
  • Object SubMode : This SubMode allows to handle any type of Object. The following actions can be perform : Add, Delete, Move, Rotate, Scale, Duplicate (copy the Object in any direction)
  • Mesh SubMode : This SubMode allows the edition of any Mesh present in the Scene.
  • Play SubMode : This SubMode allows to test the game in real time.

A Box2d Editor or a Mesh Editor ?

My first idea was to build a Box2d Editor. The Nero Game Engine, is built with the idea to be Simple, Intuitive and Efficient. I did not want users to struggle with Box2d stuff. So, a Box2d Editor was the perfect solution. But let's say thing clearly, build a Box2d Editor is realy tough, months ago i would just say, it's impossible.
When you create a Box2d Body, you can't modify it later, more, it's difficult to store the Box2d Body somewhere in order to play with it later because its constructor is private. It was the first time i've seen a private constructor. :-\
With all those difficulties, i've just given up and begin to think to alternative solutions.

But, But, one day i woke up, and the solution came to my mind  ;D
I've forgotten the Idea to build a Box2d Editor and decided to build a Mesh Editor instead. (I've stolen the name "Mesh" from Blender  8))
The Idea is that i don't need to Edit Box2d Body, instead, i can create Meshes and then generate Box2d Bodies from those Meshes. Meshes are pure SFML and C++, they don't contain any Box2d stuff, and the cool thing, it's that they are really, really simple to Edit.

Mesh

Meshes are just a powerfull tool. There are four types of Mesh
  • Polygon
  • Circle
  • Line
  • Chain
The four types of Meshes are handled by the same Class. This allows to switch from one type to another very easly. By example, a Line is made of two vertex (vertices), when you add one more vertex, the Mesh become automatically a Chain, and when you remove that vertex you come back to a Line.

MeshObject

A MeshObject encapsulates a Mesh. When a user is in the Engine Object SubMode, he can handle the MeshObject, this SubMode does not allow to fully edit the Mesh.

MeshEditor

When a user switches to the Engine Mesh SubMode, there comes the magic. Going in that mode, activate the MeshEditor and the user can now get access directly to the Meshes encapsulated in MeshObjects. In that mode the following actions can be perform
  • Add vertex
  • Remove vetex
  • Move vertex
  • Move Edge
  • Edge Extrusion

Next Time
I will post a Cool Video in the next hours  8)
The video will show the outcome of my work and the power of the Nero Game Engine.

89
SFML projects / Re: SFGUI (0.3.2 released)
« on: July 24, 2017, 01:08:20 am »
Hi there! the method i've used for my program is the following : when i go to one screen to another, i destroy the current screen and create the next. So there is always only one screen in the program. Most of the data is stored in a SQLite database, each time a screen is created the data may be load from there.

Since screens are created at each transition, you may notice that the transition take several seconds.

Concretely i use two classes.
  • State : each screen inherite from this class
  • StateStack : manage the transition between screens

each time a screen is created (at each transition) i reinitialize the SFML Window GL state, the SFGUI SFGUI instance and the SFGUI Desktop instance

Quote
context.window->resetGLStates();
context.sfgui = &mSfgui;
context.desktop->RemoveAll();

90
SFML projects / Re: SFGUI (0.3.2 released)
« on: July 21, 2017, 04:08:54 pm »
Hi Theo !, i've done a program that use several windows with SFGUI (check out the video), if it's what you want, i may help you. I've done the program long time ago, so i'll need some time to check out the source code and review how i've done it.


Pages: 1 ... 4 5 [6] 7
anything