• Register
Post news Report RSS 3.9.1 release (new light engine, more samples, more fun)

In this update I added new sample projects, what includes sample GUI project, sample networking project and sample physics and light engine project.

Posted by on

So, first thing I need to say that now I am very very close to start adding support for web platform. I made some big changes in source code structure what will enable me to do it without much pain.

GUI module

So first thing on what I was working on in this update was GUI system. I decided to use immediate mode GUI system, because for simple 2D games retained GUIs are overkill imo. New GUI module currently supports only few widgets:

  • Button
  • Label
  • Text area
  • Horizontal scroll bar
  • Vertical scroll bar

Also, for simplicity, new GUI module do not ships with ANY default renderer, you need to create your own one or use renderer from GUI example project what can be found on GitHub or using gen:gui task. You can for example create label renderer like this:

this.label = function(id, text, x, y) {
    var color = graphics.getTint();
    graphics.tint('white');
    graphics.print({text: text, position: [x, y]});
    graphics.tint(color);
};

Here is small GIF demonstrating new GUI module:

GUI system update

New example projects

Many people asked me how to do that and how to do this in Non, so I decided I need to create more example projects. Creating example project is simple, you can do it via Nide:

New sample system in Nide

or via gen: task. Current samples included in Non are:

  • require - demonstrates "require" method and modules system
  • GUI - demonstrates GUI system and widgets, comes with nice renderer (you can see it in GUI GIF what I posted above)
  • network - demonstrates networking engine with simple client/server connection
  • physics - demonstrates physics and lights engine
  • pong - demonstrates input and shape rendering

Here is bigger GIF of physics sample:

Light engine

So, for now it is all.
You can download new update from official site or browse the source code.

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.

News
Tags
Release, Update
Browse
News
New
Post news
Report
Report
Share
Related Engines
NÖN
NÖN MIT
Related Groups
Codeindie
Codeindie Developer