• Register

Genesis game engine is a free game engine for 2 dimensional games. The engine are under the CC BY-ND licens.

Post article RSS Articles

Often, creating a good user interface is one of the biggest tasks in developing a game. We would like to make this as efficient as possible with Genesis, for this reason we would now like to introduce the new UI system a bit closer.

The base on which every user interface builds is the canvas or the render target. An infinite number of controls can be added to this. By activating and deactivating a canvas, different UIs can be created. For example, an inventory UI, the skill system, a merchant menu, and one of the game settings.

UI 1

Currently the engine has a progressbar, a label, a button, a gridview, a picturebox. Planned or in progress are a listbox, a listview with subitems, a textbox, a combox and many more. We are always open for suggestions and suggestions. The abstract class UIElement can also be used to design very unique user elements.

Here is a sample code for creating a user interface:

// 4. Create a Canvas
 Canvas MySampleUI = new Canvas(new Vector2(0,0), new Vector2(800,600));
 
 
 // 5. Create your Controls
 label = new Label("Mein Label", "Mouse Position");
 label.setLocation(new Vector2(20,20));
 label.setSize(new Vector2(200, 30));
 MySampleUI.AddElement(label);
 MySampleUI.AddUIActionListener(new CanvasActionListener(label));
 
 Label MyButtonLabel = new Label("MyButtonLabel", "Nothing has happened yet!");
 MyButtonLabel.setLocation(new Vector2(20, 50));
 MyButtonLabel.setSize(new Vector2(200,30));
 MySampleUI.AddElement(MyButtonLabel);
 
 Button btn = new Button("MeinButton", "Button1");
 btn.setLocation(new Vector2(20, 150));
 btn.setSize(new Vector2(200, 35));
 btn.AddUIActionListener(new ButtonActionListener(MyButtonLabel));
 MySampleUI.AddElement(btn);
 
 Progressbar bar = new Progressbar();
 bar.setLocation(new Vector2(20, 80));
 bar.setSize(new Vector2(200, 20));
 bar.setCurrent(60);
 bar.setSpace(1);
 bar.setIncrementValue(10);
 MySampleUI.AddElement(bar);
 
 Button MyProgressbarBtn = new Button("MeinProgressbarBtn", "Increase");
 MyProgressbarBtn.setLocation(new Vector2(230, 80));
 MyProgressbarBtn.setSize(new Vector2(60, 20));
 MyProgressbarBtn.AddUIActionListener(new ProgressbarUpdater(bar));
 MySampleUI.AddElement(MyProgressbarBtn);
 
 Button MyProgressbarBtn2 = new Button("MeinProgressbarBtn2", "Decrease");
 MyProgressbarBtn2.setLocation(new Vector2(292, 80));
 MyProgressbarBtn2.setSize(new Vector2(60, 20));
 MyProgressbarBtn2.AddUIActionListener(new ProgressbarDecrease(bar));
 MySampleUI.AddElement(MyProgressbarBtn2);
 
 PictureBox picB = new PictureBox(new Vector2(20, 190), new Vector2(300, 300), ImageIO.read(this.getClass().getResource("images/Human.png")));
 MySampleUI.AddElement(picB);
 
 GridView grid = new GridView("Grid", new Vector2(370, 20), 8, 4, 48, 48);
 grid.AddUIActionListener(new ListViewActionListener());
 grid.AddItem(new GridViewItem("MyGridItem", "GridViewItem", ImageIO.read(this.getClass().getResource("images/Sprite.png"))));
 grid.AddItem(new GridViewItem("MyGridItem", "GridViewItem", ImageIO.read(this.getClass().getResource("images/Sprite.png"))));
 grid.AddItem(new GridViewItem("MyGridItem", "GridViewItem", ImageIO.read(this.getClass().getResource("images/Sprite.png"))));
 grid.AddItem(new GridViewItem("MyGridItem", "GridViewItem", ImageIO.read(this.getClass().getResource("images/Sprite.png"))));
 MySampleUI.AddElement(grid);
 
 game.AddCanvas(MySampleUI);

In addition, we are currently working on a GUI for the engine in which, among other things, the dynamic and static lighting can be edited. You can add any number of lightmaps to a scene. These are then rendered either Dynamic or Static.

Editor

Rework on the Engine

Rework on the Engine

News

We are pleased to announce that for a long time we have decided to revise the engine one more time or to program a completely new version

Beta Release

Beta Release

News

The Genesis game engine is now in beta. By which she was re-programmed with Java it is available on Windows, Linux and Mac.

.Net version ready for beta

.Net version ready for beta

News

The. Net version of Genesis is now ready for the beta phase. Before we publish genesis, however, a version of the engine for java and Android is still...

Animations are now Enabled

Animations are now Enabled

News

Genesis has now also classes for the animation of the sprites and the game objects. The animations can be played in a separate thread with the help of...

Post a comment
Sign in or join with:

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.

Follow Report Profile
Platforms
Windows
Company
Ahead Studios
Contact
Send Message
Release date
Engine watch
Follow
Share
Embed Buttons
Link to Genesis Game Engine by selecting a button and using the embed code provided more...
Genesis Game Engine
Statistics
Rank
116 of 799
Last Update
Articles
5
You may also like
AndEngine
AndEngine L-GPL
libGDX
libGDX Commercial
LITIEngine
LITIEngine MIT
Godot Engine
Godot Engine MIT
Ren'py
Ren'py MIT
Wave Engine
Wave Engine Proprietary