Quick demo video of my Utility and Needs Based UI test framework.
Click to see video on workshop
This is a quick demo video of my Utility and Needs Based AI test framework.
There are several things going on here to cause the AI actors to decide what to do:
- A scoring function runs every tick that updates the score for each available action. The top scoring action is marked as the active mode; if the mode changed since the last tick, s
In Leadwerks GUI, any widget can be the child of another widget. If the child goes outside of the parent widget's area it will be clipped for both rendering and mouse events. Below you can see the button in the upper-left corner and the progress bar and slider on the right are clipped by the parent tabber.
A parent widget can also have a padding value which indents the area. The tabber uses padding on the top to display the tabs and make sure children don't appear on top of the tabs.
The slider widget is used for scrollbars, trackbars, and steppers. It has a lot of style options, so it's really six different widgets packed into one. (In Leadwerks Editor, a slider and textfield widget are combined to make the numerical entries you use to adjust positions and other values.)
To create a new slider you just create a widget and set the slider script:
local slider = Widget:Create(230+40,140,20,20,panel)
slider:SetScript("Scripts/GUI/Slider.lua")
You can then se
I've started on my quest to make a full C++ has started today. I've noticed that LEX2 via the project manager didn't copy over as clean as it should, so I had to make the project from scratch which wasn't a big deal (for me). I should look into a way of getting that fixed.
After setting the project up, I noticed a few errors I was getting after I commented out the LUA_GAME preprocessor. It was a quick fix, and development went under way after that.
For this project, I'll need things tha
The combobox and listbox widget scripts are now updated. The combobox is presently using a more game-like style that jus shows the currently selected item. You can change the selection by clicking on the widget with the mouse, pressing keyboard keys, or scrolling the mouse wheel.
The listbox includes a slider that automatically appears when needed. In order to make rendering faster, the draw function calculates the first and last visible items, and only iterates through those items while
I wanted to give you an update since this blog post and let you know how well (or not) I'm following those plans.
Blue Portals: Anniversary Edition (Skip this if you don't care..)
Sunday I pushed a long over due push to Steam for beta testers to play and give feedback. I don't like to push to Steam often as my connection isn't that strong so any uploads bigger then a few megabytes causes an upload failure, I usually split updates into multiple pushes to prevent such problems but sometime
It took a few hours to add scrolling to the textfield widget. Now when the caret moves beyond the bounds of the box, text will slide over to keep the caret visible. This really isn't much different from a full text editor. The script is available now on the beta branch on Steam and presently weights in at 381 lines of Lua code.
The Draw function is pretty short and easy to understand. I think most people will customize the appearance of these widgets more than the behavior:
f
I've added a textfield widget script to the beta branch, and a new build, for (Lua interpreter, Windows only, at this time). The textfield widget allows editing of a single line of text. It's actually one of the more difficult widgets to implement due to all the user interaction features. Text is entered from the keyboard and may be selected with arrow keys or by clicking the mouse. A range of text can be selected by clicking and dragging the mouse, or by pressing an arrow key while the shif
Through out the Leadwerks community you'll find two types of users. You'll find a large portion of the community using lua, and a small dosage of them using C++. This makes sense as people are more often going to purchase Leadwerks without any DLCs (including the Professional Edition), and get into developing. From experience, Leadwerks at the moment puts it's primary focus on Lua scripts with it's script editor and debugger, flowgraph editor, and the script property system. Everything is pretty
Now that you've had time to get acquainted with Leadwerks, it's time for the Summer 2016 Game Tournament.
WHEN: The tournament will start Monday, July 25, and end Sunday, August 21th at 11:59 P.M. (Pacific Standard Time).
HOW TO PARTICIPATE: Publish your summer-or-other-themed game to Steam Workshop or upload it to the games database before the deadline. You can work as a team or individually. Use blogs to share your work and get feedback as you build your game. If you need models for
Have a simple portal door system working with an interior map I've just started working on today.
One issue I'm running into with this setup is that the exterior map is completely unloaded when moving into an interior map. This causes a huge load time when you exit the building. I'd really like to be able to optimize some of that but so far I'm pretty much drawing a blank. Maybe it's a bit too late, will think on it more tomorrow.
I've added an optional radius for rectangle corners, for use with the DrawRect() command, along with a new gradient mode that uses a second color to draw a linear gradient on primitives. I like the interface for the program Vue, and I am modeling my default widget scripts after this style.
Here it is rendered at 800% scale. This is rendered directly on a window and sub-pixel antialias is used (Microsoft ClearType):
The appearance of the button widget at this point is somethin
A year has passed, time for an other update.
Exspecially in the last weeks, I have been thinking and working onmy Game for long hours.
yay !
A Video from exactly a year ago shows the early Game functions which no longer will be as they are in the final game, unfortunately. (Youtube: Slastraf)
Today I am focusing on Game Art, not as much as -programming , just because when I got into making Games, I started off and like to work with 3D programs such as Blender or Designing Levels with the bui
I've updated the beta branch (Lua on Windows only) with a new build that solves the DPI scaling issues I previously described. Widget creation still works the same, using the same coordinate system regardless of GUI scale. Widget scripts must use global coordinates in the drawing commands, which means calling Widget:GetPosition(true) and Widget:GetSize(true). Here's the very simple panel script, which simply draws a solid block on the screen to frame child widgets within:
function Script:D
At 100% scaling this image appears correctly:
At 200% scaling it falls apart. The line points are in fact scaled correctly, but they are not surrounding the shape as intended:
So I think instead of converting the coordinate system back and forth between scaled and non-scaled coordinates, the creation function needs to multiply the coordinates by the scaling factor. That means if you create a 70x30 pixel widget and the GUI is using a 200% scaling factor, it will actually create a 14
I've implemented DPI scaling into Leadwerks GUI (beta branch, Lua on Windows only).
To set the GUI scale you just call gui:SetScale(scalefactor). A scale factor greater than one will make it bigger, a scale factor less than one will make it smaller. There is no limit to the range you can set, but negative numbers are probably not good.
Scaling causes the GUI to be drawn at a different size, but widget dimensions and mouse events are still interpreted as though they were at their origin
Leadwerks GUI is now functioning, on the beta branch, Windows only, Lua interpreter only.
GUI Class
static GUI* Create(Context* context)
Creates a new GUI
Widget Class
static Widget* Create(const int x, const int y, const int width, const int height, Widget* parent, const int style=0)
Creates a new Widget. Widgets can be made into buttons, dropdown boxes, or anything else by attaching a script.
virtual bool SetScript(const std::string& path, const bool start = true)
Se
Starting out a new work log here with a screenshot from my new project. Except for a few models this is entirely created with Leadwerks' Constructive Solid Geometry tools, using textures from Game Textures and terrain generated by L3DT.
WorldSmith is a very ambitious First Person Role Playing Game. I am essentially obsessed with a particular post-apocalyptic action RPG series and figured I should channel some of my creative energy into an attempt to create my own vision of something in a sim
To provide support for advanced GUI rendering, some of the features I implemented in the refactored window class are being brought into the 2D drawing command set. This includes a lot of text rendering features like word wrap, multiline, horizontal and vertical centering, and viewport clipping.
A new text drawing function includes additional parameters for better control:
Context::DrawText(std::string text, int x, int y, int width, int height, int style)
The style parameter can be
An update is available on the beta branch. This adds the Window::Center style back into the new refactored Window class, and adds a missing header file in the Professional Edition.
If you'd like to try out a basic implementation of the new GUI, download and extract the attached scripts:
Scripts.zip
This code will create a GUI on the rendering context. It simply consists of a solid background filling the screen and a textless button.
--Initialize Steamworks (optional)
Steamworks:Ini
The beta branch on Steam is updated with a new build. This uses the refactored Window class, on Windows and Linux. The GUI and Widget class are also added, although they are highly experimental and still in development. Both the engine and editor are using the refactored Window class, so please report any erroneous behavior your detect.
Leadwerks is now using GDI+ for some GUI drawing commands, on Windows. You need to update your existing project by modifying the "Linker \ Input \ Additi