46
SFML projects / Re: Nero Game Engine
« on: December 09, 2018, 07:03:16 pm »
Hi everyone, how do you do, Hope your are doing great.
Twitter account
I opened a Twitter account some days ago, you can follow me and stay update any time on the Engine development.
Twitter - NeroGameEngine.
Scene Screens
Today we are going to talk Screens. This is a new feature in the Engine, I did not plan it for the first version, but I finally thought it would be cool to have it.
What is a Screen ?
First, let's begin by what most people know : Game States. In a Game we generally have several states like : the game levels (each level being a state), the start menu, the pause menu, the options menu and many more. In order to manage all those states people generally develop a Sates and States_Stack system. In this system you can switch between States by pushing or poping them.
Instead of using a State/States_Stack System, the Nero Game Engine will use two differents systems. the Screen System and the World Chunk System. Those two systems combined will offer more power than a simple State System.
Add, Delete and Rename Screens
On the top left of the Engine Interface, just after the Utility_Tab, we now have the Screen_Tab. From this tab, we can see all the available Screens, add new Screens, delete Screens or rename Screens.
Each Scene always has at least one Screen, you can delete any Screens but once it left only one Screen, the delete button will have no effect.
World View and Screen View
By default the Engine start in the World View. In order to access Screens we need to switch to the Screen View. On the right of the Engine Interface there is a button called Screen View. It's a toggle button, when the button is activated we goes in Screen View, when it's desactivated we come back to the World View.
The current View mode is also displayed on the bottom right of the canvas.
Just below the Screen View button there is a list that allows to select a Screen.
Build Screens
When a Screen is selected we can start building it. Each Screen has its own Canvas color, its own Grid, its own Camera, its own layers. Basically everything you do when a Screen is selected will affect only that Screen. Each Screen maintains its own Undos and Redos
Not all types of Objects can be added to a Screen. There is no Physics in a Screen, Therefore it's not possible to add Mesh_Objects, Meshed_Objects (Sprite with Mesh) and Animation_Meshed_Objects (Animation with Mesh) In Screens.
We can only add Sprite_Objects, Animation_Objects, Text_Objects and Button_Objects.
Button_Object is a new type of Object that can be add on Screens but not in the Game World, I will present it in my next post.
Screen and Grid
In my last post, I said that the Grid was important for Screens, it's time to know why. Screens are rendered on top of the Game World and they are not affected by the Camera movement. Therefore in order to be visible a Screen must be contained in a strict area. Since the Canvas is infinite it's become easy to be lost. This is were the Grid comes, if you plan to render your game in a 800 x 600 resolution or a 1024 x 800 resolution, you will have to configure a Grid of the same resolution with an offset of (0, 0). The Grid will represent the Screen area and everything in the Grid will be displayed.
That's all for this post, there is more on Screens but that will be for the next post. The video shows the different Screens I built for the Adventure Scene.
Twitter account
I opened a Twitter account some days ago, you can follow me and stay update any time on the Engine development.
Twitter - NeroGameEngine.
Scene Screens
Today we are going to talk Screens. This is a new feature in the Engine, I did not plan it for the first version, but I finally thought it would be cool to have it.
What is a Screen ?
First, let's begin by what most people know : Game States. In a Game we generally have several states like : the game levels (each level being a state), the start menu, the pause menu, the options menu and many more. In order to manage all those states people generally develop a Sates and States_Stack system. In this system you can switch between States by pushing or poping them.
Instead of using a State/States_Stack System, the Nero Game Engine will use two differents systems. the Screen System and the World Chunk System. Those two systems combined will offer more power than a simple State System.
- Screens :
- World Chunk :
Add, Delete and Rename Screens
On the top left of the Engine Interface, just after the Utility_Tab, we now have the Screen_Tab. From this tab, we can see all the available Screens, add new Screens, delete Screens or rename Screens.
Each Scene always has at least one Screen, you can delete any Screens but once it left only one Screen, the delete button will have no effect.
World View and Screen View
By default the Engine start in the World View. In order to access Screens we need to switch to the Screen View. On the right of the Engine Interface there is a button called Screen View. It's a toggle button, when the button is activated we goes in Screen View, when it's desactivated we come back to the World View.
The current View mode is also displayed on the bottom right of the canvas.
Just below the Screen View button there is a list that allows to select a Screen.
Build Screens
When a Screen is selected we can start building it. Each Screen has its own Canvas color, its own Grid, its own Camera, its own layers. Basically everything you do when a Screen is selected will affect only that Screen. Each Screen maintains its own Undos and Redos
Not all types of Objects can be added to a Screen. There is no Physics in a Screen, Therefore it's not possible to add Mesh_Objects, Meshed_Objects (Sprite with Mesh) and Animation_Meshed_Objects (Animation with Mesh) In Screens.
We can only add Sprite_Objects, Animation_Objects, Text_Objects and Button_Objects.
Button_Object is a new type of Object that can be add on Screens but not in the Game World, I will present it in my next post.
Screen and Grid
In my last post, I said that the Grid was important for Screens, it's time to know why. Screens are rendered on top of the Game World and they are not affected by the Camera movement. Therefore in order to be visible a Screen must be contained in a strict area. Since the Canvas is infinite it's become easy to be lost. This is were the Grid comes, if you plan to render your game in a 800 x 600 resolution or a 1024 x 800 resolution, you will have to configure a Grid of the same resolution with an offset of (0, 0). The Grid will represent the Screen area and everything in the Grid will be displayed.
That's all for this post, there is more on Screens but that will be for the next post. The video shows the different Screens I built for the Adventure Scene.