Jump to content

Blogs

More amazing things you can do with Lua in Leadwerks 5

Our implementation of Lua in Leadwerks 5 is shaping up to be a dream come true. Below are some of the great improvements that are being made. Access STL Containers in Lua You can access STL containers directly from Lua: for n = 1, #entity.kids do entity.kids[n]:Move(1,0,0) end while #entity.kids > 0 do entity.kids[1]:SetParent(nil) end In fact, verbose commands like CountChildren() and GetChild() are no longer needed at all. On the C++ side you can use this: for (int n=0; n<entity->kids.size(); n++) { entity->kids[n]->Move(1,0,0); } while (entity->kids.size()) { entity->kids[0]->SetParent(nullptr); } Note that in C++ arrays start with 0 and in Lua they start with 1. This also allows us to return STL contains from functions or accept them as arguments. No more ForEachEntity... callbacks are needed: local aabb = AABB(-10,10,0,5,-10,10) local entities = world:GetEntitiesInAABB(aabb) for n=1,#entities do entities[n]:AddForce(0,10,0) end Super Pro User-defined Values There will be no more self.entity or entity.script conventions in Leadwerks 5. Functions and user-defined values will be attached directly to the entity itself. The example below shows user-defined values that persist even when the entity goes out of scope of the Lua virtual machine: --Create child local a = CreateBox(world,1,1,1) --Set a user-defined value a.health = 100 --Create parent local b = CreateBox(world,1,1,1) --Set parent a:SetParent(b,true) --Let child go out of scope (parent keeps it from being deleted in C++) a = nil --Collect garbage collectgarbage() --Get the child local c = b.kids[1] --Check the value print(c.health) --prints '100' In Leadwerks 4 an entity script might look like this: function Script:Update() self.entity:Turn(self.speed,0,0) end In Leadwerks 5 it is simpler because self is the actual entity: function Entity:Update() self:Turn(self.speed,0,0) end In Leadwerks 4 you have to check to see if an entity has a script attached and us that to store all user-defined values: if world:Pick(v1,v2,pickinfo) then if pickinfo.entity.script~=nil then if type(pickinfo.entity.script.TakeDamage)=="function" then pickinfo.entity.script:TakeDamage(10) end end end Leadwerks 5 is a lot simpler. You just check if the functions exists on the entity and then call it: if world:Pick(v1,v2,pickinfo) then if type(pickinfo.entity.TakeDamage)=="function" then pickinfo.entity:TakeDamage(10) end end You can even assign custom properties to entities without worrying whether they have a script attached: function Entity:Collision( collidedentity, position, normal, speed ) collidedentity.lasthitobject = self --No script? No problem! end In fact all a script does is attach some functions and values to an entity and then it is gone. There is no fundamental difference between a scripted and non-scripted entity. Casting Objects Casting objects in Leadwerks 4 uses syntax that is a little awkward. I actually had to look up the tolua.cast function just now because I couldn't remember the order of the arguments: local a = Model:Box() local b = Model:Box() a:SetParent(b) local entity = b:GetChild(0) local model = tolua.cast(entity,"Model") Casting is simpler and more intuitive in Leadwerks 5: local a = CreateBox() local b = CreateBox() a:SetParent(b) local entity = b:kids[1] local model = Model(entity) If the entity is not a model then the casting function will just return nil. A big thanks goes out to the developers of sol2, an awesome modern Lua binding library with support for C++11 smart pointers.

Josh

Josh

Lua binding in Leadwerks 5

The Leadwerks 5 API uses C++11 smart pointers for all complex objects the user interacts with. This design replaces the manual reference counting in Leadwerks 4 so that there is no Release() or AddRef() method anymore. To delete an object you just set all variables that reference that object to nullptr: auto model = CreateBox(); model = nullptr; //poof! In Lua this works the same way, with some caveats: local window = CreateWindow() local context = CreateContext(window) local world = CreateWorld() local camera = CreateCamera(world) camera:SetPosition(0,0,-5) local model = CreateBox() while true do if window:KeyHit(KEY_SPACE) then model = nil end world:Render() end In the above example you would expect the box to disappear immediately, right? But it doesn't actually work that way. Lua uses garbage collection, and unless you are constantly calling the garbage collector each frame the model will not be immediately collected. One way to fix this is to manually call the garbage collector immediately after setting a variable to nil: if window:KeyHit(KEY_SPACE) then model = nil collectgarbage() end However, this is not something I recommend doing. Instead, a change in the way we think about these things is needed. If we hide an entity and then set our variable to nil we can just defer the garbage collection until enough memory is accrued to trigger it: if window:KeyHit(KEY_SPACE) then model:Hide()-- out of sight, out of mind model = nil end I am presently investigating the sol2 library for exposing the C++ API to Lua. Exposing a new class to Lua is pretty straightforward: lua.new_usertype<World>("World", "Render", &World::Render, "Update", &World::Update); lua.set_function("CreateWorld",CreateWorld); However, there are some issues like downcasting shared pointers. Currently, this code will not work with sol2: local a = CreateBox() local b = CreateBox() a:SetParent(b)-- Entity:SetParent() expects an Entity, not a Model, even though the Model class is derived from Entity There is also no support for default argument values like the last argument has in this function: Entity::SetPosition(const float x,const float y,const float z,const bool global=false) This can be accomplished with overloads, but it would require A LOT of extra function definitions to mimic all the default arguments we use in Leadwerks. I am talking to the developer now about these issues and we'll see what happens.

Josh

Josh

Visual Studio Code for Leadwerks

I have been using Visual Studio Code for a couple of years now and it is my defacto text editor next to Notepadd++. I mainly use it however to write Lua scripts.  Opensource Lightweight Cross platform Completely adjustable hotkeys (or automatically map from Visual Studio: https://marketplace.visualstudio.com/items?itemName=ms-vscode.vs-keybindings) Fully customisable theming (with standard themes included) Supports all major languages. Lua is supported via an extension: https://marketplace.visualstudio.com/items?itemName=trixnz.vscode-lua Build in GIT source control Has a huge amount of extensions: https://code.visualstudio.com/docs/editor/extension-gallery Supports creating custom extensions: https://code.visualstudio.com/docs/extensions/overview Supports creating custom debuggers (on top of the ones that already exist).     Leadwerks extension Personally I would love to see it if Visual Studio Code would be the default code editor for Leadwerks (either with 4.x or 5.x). So I got started on working on a custom Leadwerks extension.  You can download it here: https://marketplace.visualstudio.com/items?itemName=aggror.Leadwerks Todo list: Done: Leadwerks extension has a dependency on the Lua extension. So this Lua extension is automatically installed when you install the Leadwerks extension. Done: Snippets. Every time you create a new script in the Leadwerks editor, you get a couple of default scripts like Function Script:Start(), UpdateWorld(), PostRender(context). Using a very simple snippet, these kind of functions can be inserted with ease. prop[type] : Creates Leadwerk editor properties print: Shortcut for System:Print("") lescripts: Inserts all entity script functions (commented) class: Creates a basic class objects with example functions start: Start function of an entity script updateworld: UpdateWorld function of an entity script updatephysics: UpdatesPhysics function of an entity script collision: Collision function of an entity script with all parameters PostRender: PostRender function of an entity script with the context parameter function: Creates a function for either a custom object or for the specific script if for pair ipar For instance: just type 'col' followed by 1 tab and you get:  function Script:Collision(entity0,entity1,position,normal,speed) end   Partially done: Supporting intellisense (sort of) with Leadwerks entities. Lua is a typeless language (not a strong typed language), which makes intellisense not really possible.  VS code is smart enough to recognise some functions that are available in your script, but it is not as complete as when you would work with C# or C++. Done: Generate snippets for the entire Leadwerks API.  Snippets are created per object and a second one without the object. For instance Entity:SetPosition() SetPosition() TODO: Classes with parents, would require matching functions. For instance: a pivot is an entity and thus requires Pivot:SetPosition() Done: parameters into placeholder slots. If I can extend the intellisense so that it recognises Leadwerks entities, perhaps we could see correct variables and functions of those entities. TODO: Loading in the API documentation in a split screen.  The API documentation is written in an XML format which I can retrieve in VS code. I can display it in a splitscreen.  I would have to play with the styling a bit but in general this should work really fast API documentation can be cached if in online mode. Documentation could also be periodically fetched. Moving the API documentation to Github would help improve this process. (newer file versions etc) Debugging Josh stated that he is getting someone to make this for him. So fingers crossed. The biggest issue at the moment is the lack of debugging support. Visual studio has debugging options of course, but it can't communicate with the Leadwerks editor. If you have an error in your script while running from the editor, the default Lua editor is opened.

AggrorJorn

AggrorJorn

Plugins in Leadwerks Game Engine 5

Internally, Leadwerks Editor uses an EventHandler class for every interface in the program. The material editor is a class extended from the EventHandler. So is the little window that has all the controls to calculate normals. So is every viewport. The event handler class has one important function: Event ProcessEvent(Event) Every EventHandler has access to events as they occur. This is how all program actions are handled in the editor. The plugin system will work by hooking into the event system. Each plugin will have a Lua script that receive events before the rest of the program sees them: function Script:ProcessEvent(event) return event end If the plugin makes no changes to the event then it simply returns the original event. The returned event is then sent to other event handlers. Here is an example of a plugin that would disable the close window button on the main window. Because the function returns nil the event is discarded before the main window ever evaluates it: function Script:ProcessEvent(event) if event.id == EVENT_WINDOWCLOSE and event.source == editor.mainwindow then return nil else return event end end Here is an example of a very mean plugin that would make it so that clicking the File > Open menu item in the main window quits the program: function Script:ProcessEvent(event) if event.id == EVENT_MENUEVENT then if event.source == editor.mainwindow then if event.extra == MENU_FILEOPEN then event.id = EVENT_WINDOWCLOSE end end end return event end Okay, now let's see if we can design a plugin for something people would actually want. Let's imagine we have a new visual material design system. The exact details of how it works are not important, it's just a system that overrides the default material editor. The design system would require materials to have a special file associated with them with the extension .DESIGN. If you open the material "brick.mat" we will look for a file in the same folder called "brick.design". If the design file is found we open the material in our special editor. If the design file is missing we will just fall back to the default material editor. Now let's see how our system can handle this: function Script:Start() --Create our interface self.window = CreateWindow("Material Designer",0,0,800,600,editor.mainwindow,WINDOW_CENTER + WINDOW_TITLEBAR + WINDOW_RESIZABLE) end function Script:ProcessEvent(event) if event.id == EVENT_FILEOPEN --Check for material files being opened if ExtractExt(event.extra)=="mat" --Look for design file local designfilename = StripExt(event.extra).".design" if FileType( designfilename ) == 1 then --Load the design file local stream = ReadFile(designfilename) if stream ~= nil then --Display our custom material editor self.window:Show() self.window:Activate() else Print("Error: Failed to load design file.") end --Discard the event return nil end end end return event end As you can see, this approach is extremely powerful. The event IDs and design rarely change, if ever, so this allows a lot of flexibility and at the same time gives us the optimal compatibility as changes are made to the core editor. With this approach to plugins you can literally do anything you want in the editor.

Josh

Josh

Lua table gotcha

I recently was introduced to a bug in my game. I had 20 AI units and only 19 of them were actively doing something. Number 20 was just standing there. The problem eventually lied in using '#enemies' to get the amount of enemies. Here is what happened: A lua table index by default starts on index 1. This in contrary to many other languages where it starts at 0. However, you can assign a value to index '0' if you want. Since I use C# on a daily basis, I am more comfortable using the 0 index as a start. As a result this is my (simplified) code: for i = 0, enemyCount-1, do enemies[i] = new Enemy() end In the AI script I loop over the enemies like this: for i = 0, #enemies-1, do enemies[i]:DoStuff() end This is really basic lua scripting with one tiny gotcha: The '#' is used to get the amount of consecutive keyed items in the list. This I knew. What I did not know, is that there is also the requirement that this order starts at index 1 (or at least not on index 0). It simply ignores the 0 index! Here is a full script to try local enemies = {} local enemyCount = 4 for i = 0, enemyCount-1, 1 do enemies[i] = "I am enemy " .. i System:Print(enemies[i]) end System:Print("#enemiesCount: " .. #enemies) for i = 0, #enemies-1 do System:Print(enemies[i]) end Output: I am enemy 0 I am enemy 1 I am enemy 2 I am enemy 3 #enemiesCount: 3 I am enemy 0 I am enemy 1 I am enemy 2 Problem
So what was happening? I did get the amount of enemies back, except for the one enemy that was located on index 0. I quickly noticed the lower count of enemies, but since enemy number 20 wasn't doing anything I was also looking in the wrong place. It was actually enemy number 1 that was the culprit, even though it's AI was being executed. Solution
It can be solved in numerous simple ways, but I guess best practice is to just stick to Lua's standard and not assign anything to 0. This can really prevent some time being wasted on absolutely silly issues like this.
 

AggrorJorn

AggrorJorn

"Cirque de Jeux" Game Tournament wrapup

The latest game tournament brought in a small number of games, but they more than made up for it in quality. Each title that was submitted was pretty fantastic. The tournament was held during an odd month and there was no banner across the forum to remind people about it, so that is something that can be improved in the future. Each entry will receive an 11"x17" poster in the mail. Please make sure your name, address, and phone number (for customs) are correct and up to date in your Leadwerks account info. Without further ado, I bring you the games: Dwarf Beard A solid base that can be turned into a nice RPG, Dwarf Beard pits you and your beard against a horde of goblin sentries. There are several interesting mechanics and the polish is very good. Zelrio This is a fun adventure game with a and well-done visual style that looks and plays great. Find stars, collect coins, evade monsters, and reach the end goal. I was not able to progress past the first level, so I am not sure if there are more levels or not, but it's definitely worth checking out. House in the Hollow A shooter that is literally on rails...actual rails! Have fun blasting balloons in this spooky funhouse ride. J-Train This is a very interesting learning game that teaches you Japanese characters. The interface still needs some work but it's a very cool idea and the polish and execution are excellent. Also check out "VR testje weer" in the game launcher if you like killing chimpanzee zombies in VR. There's no title image so it does not qualify for the tournament...but it has monkey zombies in VR: http://steamcommunity.com/sharedfiles/filedetails/?id=1305570192

Admin

Admin

Behind Enemy Lines

Hi, the last weeks in office are very bussy. But today i have some time to work on my project. In Akt 3 i  would imlement a Mortar. I found a nice free model that i rework in blender and exported as mdl file also i searched for some sounds and mixed them together. For the sound i use "Audacity" becaus i get some errors in leadwerks with this sound i converted sounds with "Audio online converter" then i work on the scirpts. i use some parts from einlanders grenade script. and changed the projectile script and saved it to Mortal Ammo script. at the moment it is a little buggy and i dont know what i have to chage. i think the problem is in this part: if bullet~=nil then bullet:Show() bullet:SetFriction(10000,10000) bullet:SetCollisionType(Collision.Projectile) bullet:SetPosition(self.muzzle:GetPosition(true),true) bullet:SetRotation(self.muzzle:GetRotation(true),true) bullet:SetMass(1) Force = Vec3(0,3000,0) bullet:AddForce(Force) if bullet.script~=nil then bullet.script.owner = self if type(bullet.script.Enable)=="function" then bullet.script:Enable() end bullet:Turn(Math:Random(-3,3),Math:Random(-3,3),0) the bullet is not always transformed into an explosion when it hits the ground. If it hits the player, then it always works.   here is the result. Sometimes it is funny how crazy the bullet goes. But now i have to look video with my daughter so i will work later on it. if anyone knows how i align the force at the distance of the player, about help or hints i would be glad. Also on a note why the bullet does not always explode on the ground, I would be glad. As always sorry for my english. By the way Act 3 is progressing. Below are a few pictures.    

burgelkat

burgelkat

Announcing Leadwerks Projects

We've added a new website feature called Projects to help teams collaborate on their games. A project can be created with several privacy features so you can use this for public open-source games everyone can participate in, or for your team's secret project. I myself have started a project I intend to develop to demonstrate Leadwerks multiplayer capabilities: You can add a forum, blog, and downloads section to your project and use it to host files, carry out discussions, and post updates to your team. The project creator can also moderate the content and has the ability to invite and approve new members. I hope you find this feature useful for team development.

Josh

Josh

4.6 Beta Available with Multiplayer Support

An update is available on the beta branch on Steam that adds support for multiplayer games with the following features: NAT punch-through with relay server fallback. Connectionless peer-to-peer UDP messages with multiple channels and optional reliable flag. Public server list of available games to play. Voice-over-IP for in-game chat (and taunts). The new multiplayer system will open up a new range of game types that can be easily created with Leadwerks Game Engine. These features are still being tested and are only available in the Windows build right now.

Josh

Josh

Leadwerks Enterprise Edition Updated

The standalone enterprise edition has been updated to the now-stable version 4.5. The new installer is available in the client area when you are logged into your Leadwerks account on our website.

Admin

Admin

Final sound recording API

My Gigabyte Brix pro lacks an audio in port and I was not able to find a USB microphone yesterday. However, I found a cheap webcam with audio support and have been using this to test voice recording, and it works great. Here is the final voice recording API: bool Sound::StartRecording(const int frequency = 22050, const int format = Sound::Mono8, const int buffersize = 20480) Sound* Sound::StopRecording() bool Sound::StopRecording(Lobby* lobby) lobby->SetVoiceFilter(const uint64 steamid, const bool block) And in Leadwerks 5: bool StartRecording(const int frequency = 22050, const int format = SOUND_MONO8, const int buffersize = 20480) shared_ptr<Sound> StopRecording() bool StopRecording(shared_ptr<Lobby> lobby) lobby->SetVoiceFilter(const uint64 steamid, const bool block) The first overload of the StopRecording function will return a Leadwerks sound object you can play, and then second version of the function will broadcast your recorded audio to all players in the specified lobby. The SetVoiceFilter() method in the Lobby class can be used to block some players from receiving your voice audio, so the game can make voice chat private for your team. The lobby and peer-to-peer networking system are also done, so in theory we have everything we need right now to make multiplayer games. An update will be out soon on the beta branch so you can start testing these new features.

Josh

Josh

More voice recording

Previously I talked about a voice recording API done through Steamworks. However, OpenAL already has a simple recording API that handles this. The only thing the Steamworks API adds is compression (presumably OGG) to send the data. I quickly implemented an OpenAL-based recording API, although I do not presently have any recording hardware device to test with. OGG compression can be added with the Ogg library that is already built into Leadwerks. Here is my modified recording API: static bool Sound::StartRecording(); static Sound* Sound::StopRecording(); Or in Leadwerks 5: bool StartRecording(); shared_ptr<Sound> StopRecording(); I'm not sure if I want sound broadcast to be automatic, or if I want this to be a general-purpose sound recording API with an example that compresses the audio data and writes it to a packet.

Josh

Josh

TeamSpeak

Being able to communicate with a gaming headset or microphone is an important part of fast-paced multiplayer gaming. Therefore, Leadwerks 4.6 will feature easy to use voice recording features that allow you to talk to your teammates or taunt your opponents, in addition to a new peer-to-peer networking system. The system is largely automated so that you only have to call a single command: Voice::SetRecording(true) Or in Leadwerks 5: SetVoiceRecording(true) In practical usage, you would just link this to a key press like this: SetVoiceRecording( window->GetKeyDown(KEY_V) ) To prevent opponents from hearing your team's communication you can disable voice broadcast to some users: Voice::SetMemberBroadcast(const uint64 steamid, const bool state) I'm not too sure about the naming of that last function, but you get the idea. That's really all there is too it. The engine will handle recording, compression, and broadcast of your voice so you can easily talk to other players in any Steam-based multiplayer game. When the other players receive the voice data it will automatically be converted into a sound and played. So you can enable voice communication in your game with just one command!

Josh

Josh

Lobbies

Previously, I talked about the new peer-to-peer networking system that handles Nat punch-through and allows a sort of "floating" server that stays alive as long as at least one player is in the game. The lobby system allows you to broadcast to other players that you have a game available to join. The name might be somewhat misleading, as it does not require players to hang out in a chatroom before starting the game. My implementation functions more like a standard game server list. To create a new lobby and tell other players your game is available to join, call the following: Lobby* lobby = Lobby::Create(const int maxplayers = 32, const int type = Lobby::Public) Or in Leadwerks 5: auto lobby = CreateLobby(const int maxplayers = 32, const int type = LOBBY_PUBLIC) You can set attributes of your lobby that other users can read and display: lobby->SetKey("map","SuperArenaOfDeath") Other users can retrieve a list of lobbies as follows: int count = Lobby::Count(); for (int n=0; n<count; n++) { auto lobby = Lobby::Get(n); } Or in Leadwerks 5: int count = CountLobbies(); for (int n=0; n<count; n++) { auto lobby = GetLobby(n); } You can retrieve attributes of a lobby: std::string value = lobby->GetKey("map"); When you find the lobby you want, joining and leaving is easy: lobby->Join(); lobby->Leave(); When you have joined a lobby you can retrieve the lobby owner Steam ID, and the Steam IDs of all lobby members. This is what you use as the message destinations in the peer-to-peer messagng system: int64 steamid = lobby->GetOwner(); for (int n=0; n<lobby->CountMembers(); n++) { steamid = lobby->GetMember(); } Once you have joined a lobby and retrieved the steam IDs of the members you can start sending messages to the lobby owner or to other players in the game. Just like the P2P networking system, if the original creator of the lobby leaves, the ownership of that lobby is automatically passed off onto another player, and the lobby stays alive as long as one person is still participating. Once everyone leaves the lobby, it shuts down automatically.

Josh

Josh

Dwarf Beard

My latest entry for the Leadwerks Tournament "Dwarf Beard". This entry is really the product of a merge of a lot of work I have done over the many years. The code template I used goes all the way back to my first game created in Leadwerks "Mages Alchemy". The Template has seen many iterations, updates as my skills increased or I just work out a more better way of doing things. For this tournament I've made many new improvements focusing on character controls, AI and handling animations. Making both of those changes has really made the character code manageable and readable which was my focus coming back to this code from not looking at it for over a year and re-understanding it. Artwork taken from various graveyards of projects. Its playable now after a few tasks in particular are complete i'll upload the project. For now here are some action screens.

tjheldna

tjheldna

Two ideas I have

Leadwerks Game Engine 4.6 will feature a new peer-to-peer networking system that solves the NAT punch-through problem and provides an easy way to create a public list of game servers. Together with this and Leadwerks GUI which was released last year, we will soon have the tools to make a great deal of new types of games. Previously we have been focused on single-player games but the ability to create multiplayer games with fast reliable networking opens up a lot of new and fun possibilities. In many ways, multiplayer games are actually easier to make than single-player games. Most of your gameplay tends to arise through the interaction of the players, so making things fun centers around creating environmental challenges. Coding-wise, multiplayer games tend to use a small core program and don't need a lot of extensive per-object scripting. Since we have the tools to do it, there are two community projects I want to carry out this year. By "community project" I mean I am going to write the code, put it out there, and anyone who wants to join in is welcome. Gears Arena This is simply going to be a modern version of Quake 3 Arena, with the option to play in VR. It can serve as a basis for many different types of games, and a lot of fun can be had with level design alone. New game modes like CTF can be added, or new weapons. I fully intend to make a gun that shoots chickens that then attack your enemies, a well as a grenade launcher that shoots grenades that split into more grenades. It will be all the fun of modding without having to rip out a lot of pre-existing code from the base game. Gears Rally The code from the previous project can be easily reconfigured into a multiplayer racing game. Maybe we can even add weapons. Now that the base systems of networking and the GUI are nearly in place, both these projects will be achievable in a very small amount of code, and can serve as a basis of derivative games.

Josh

Josh

How CLion saved 2 months of work

Having a good set of tools is highly important. Just ask any mechanic. A good set of tools can save you a ton of time, just to prove this, try changing a water pump with a crescent wrench. The back story...
There is some sort of issue with my project in GIT from the windows perspective in which it doesn't let me add source files to GIT without using the -f option. The last few months of development I haven't been creating "new" things, just working on content. This means that my new changes didn't make it into my version control
I just recently switched to linux as my main OS. I got tired of the instability with windows. With this I started converting my Visual Studio project in to a CMake project, since that's what CLion supports.
While working on a CMake file I wanted to test a compile change, so I decided to "make clean".

Well some how "make clean" removed all my source files.

Since I forgot to add a few source files to my GIT repo manually (the stuff I have been working on for the last 2 months), I was in panic mode. Researching tools in Linux to undelete a file was also difficult.

CLion to the rescue!


Luckily I started up CLion on my project as I use the Jetbrains Suite at work, I figured I should also try it at home. CLion maintained its own local history of my project. With a few clicks of the mouse I could go back and undo the delete. So for any of you making games in a commercial sense, maybe $650 for a good IDE is a small price to pay for saving your *** some day

martyj

martyj

Next Steps

A big bug fix update just came out for 4.5. Unless there are any major problems then I am going to go back to Europe for a while. I will be focusing on multiplayer features, specifically the P2P, lobby, and voice chat features in Steamworks, as well as converting lots of models to make them ready-to-use with Leadwerks Game Engine. I am just going to bring my little Gigabyte Brix mini PC. If I need to I can have my big monster machines shipped to me overseas, but I'll start with this one and see how it goes.

Josh

Josh

Version 4.5 Updated

An update for Leadwerks Game Engine 4.5 has been pushed out on Steam. The following fixes have been made: View projection for Oculus Rift VR headset is fixed. Added VR.AButton, VR.BButton, VR.GripAxis for improved compatibility with Oculus Touch controllers. Fixed terrain collision bug. Added missing Workshop toolbar icons on Linux. Fixed script editor not opening on Linux. Fixed LoadAnimation bug. Fixed missing fall damage on player controller. This update is available now to all users.

Admin

Admin

Introducing the Phodex Framework

Welcome dear reader to my first Blog entry. In the following you will get a first impression of what I am working on. So lets not lose any more time and get started! What is the Phodex Framework? The Phodex Framework is created with the intention to provide common systems and mechanics to be able to create cool first person and especially role playing games within the Leadwerks Game Engine. "Leadwerks Game Engine is the easiest way to make 3D games." and "It's everything you need to make games, all in one place." With the Phodex Framework it try to also follow the general idea of Leadwerks, accessibility, simplicity and power. What does the Phodex Framework provide? Ok now lets get more specific. Here just a few things the Framework consist of: Highly intelligent AI System based on Goal Oriented Action Planning (GOAP) Userfriendly design and focus on accessibility and simplicity High costumization for all systems Questcreation System Different behaviors and designs for nearly every system of the Framework First person player controller with all you need Full-Blown combat system for melee and rangeweapons "Character Set" which lets you costumize every NPC (Combat Style, Behavior, Attributes, Animations, ...) External tools like the Questcreator and Charactercreator to improve accessibility Many common systems, like dialogs, inventories, questlog, levelsystem and more There is much more planned and this list does, of course, not go into detail, but now you can at least imagine what my plan is. How far is the development? I am worked on this since about one year and five months now and I can finally say that the Phodex Framework is finished. I cut off some features and as you may have noticed the direction the framework has changed from beeing a jack of all trades towards a framework for a very specific task, creating FPS and RPG games. Finished in this manner, does not really mean the work is done, I still will improve many systems and will implement some new ones, but the Framework now generally consists of all it needs to get started. Ok enough talk, lets show some stuff. Thank you for reading so far  this is your reward: Of course this is not the final product I imagine, its just some stuff I put together in some lazy afternoons , but I tought it would be unfair to remain you without any visual impressions . The models are from an assetpack I recently bought and as well are not final and are just a placeholder. Anyway I think the scene looks pretty atmospheric . About me: My name is Markus and I am the head of Phodex Games. I am very glad to be able to study "Digital Media", which includes many topics relevant for game development. Besides design and art I am also very interested in technical stuff and therefore studied "Electrical Engeneering" for a while, which I am very glad for as it helped me understanding many of the technical aspects of computers, coding and ultimately in games. This is my second gamedev related project and I really love what I am doing and are passionated to create something good. My aim is to provide the best possible product, I can achieve and to help people by providing games which make them feel good :). Conclusion: If you have any ideas, suggestions, or wishes of what you would like to see in the Framework, feel free to tell me in the comments. If you find any errors, feel free to tell me, as english is not my native language. I wish you a wonderful day and stay cool  . Markus from Phodex

Phodex Games

Phodex Games

"Cirque des Jeux" Game Tournament

Ladies and gentlemen, come one, come all, to feast your eyes on wondrous sights and behold amazing feats! It's "Cirque des Jeux", the next Leadwerks Game Tournament! How does it work?  For one month, the Leadwerks community builds small playable games.  Some people work alone and some team up with others.  At the end of the month we release our projects to the public and play each other's games.  The point is to release something short and sweet with a constrained timeline, which has resulted in many odd and wonderful mini games for the community to play. WHEN: The tournament begins Thursday, February 1, and ends on Wednesday, February 28th at the stroke of midnight. HOW TO PARTICIPATE: Publish your Circus-or-other-themed game to the Games Showcase 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. Games must have a preview image, title, and contain some minimal amount of gameplay (there has to be some way to win the game) to be considered entries. It is expected that most entries will be simple, given the time constraints. This is the perfect time to try making a VR game or finish that idea you've been waiting to make! PRIZES: All participants will receive a limited-edition 11x17" poster commemorating the event. To receive your prize you need to fill in your name, mailing address, and phone number (for customs) in your account info. At the beginning of March we will post a roundup blog featuring your entries. Let the show begin!

Josh

Josh

Oculus Rift vs. HTC Vive: Which is the one true VR headset?

I recently picked up an Oculus Rift (CV1) in order to improve our support for this headset. It was easy to make my changes, but having the actual hardware on hand was invaluable in this process, and our support for the Rift is now much better because of this. I have now tried a total of five different VR headsets: HTC Vive Valve's duct-taped prototype that was the basis of the HTC Vive. Oculus Rift DK1 Oculus Rift DK2 Oculus Rift CV1 At one point Leadwerks Game Engine actually worked with the DK2 but at the time I chose not to release this feature. So I've worked with a wide range of VR hardware going back several years, and here's what I think. Ergonomics The Oculus Rift has improved substantially over earlier prototypes with comfortable straps, built-in headphones, and an easy setup. The Rift feels like a polished consumer product while the Vive feels not quite as refined. The most annoying thing about the Vive are the earbuds, which add an extra cord and get tangled up in the headset cord going to the computer. Even worse, one of my earbud covers fell off, I lost it, and now I am using the included smaller set so the headphones tend to fall out of my ears while I am playing. Winner: Oculus Rift Ease of Setup With the Oculus Rift, you just plug the headset into an HDMI port and a USB port, plug both motion trackers into USB ports, and you're done. The HTC Vive, on the other hand, can be overwhelming when you open the box. It uses a base station which increases the number of wires, and the lighthouse tracking units require some thought on how and where to put them. I bought two photography tripods and have my lighthouse units mounted on top of those. The Oculus Rift involves a total of three cables, while the HTC Vive uses twice as many. Winner: Oculus Rift Display Both headsets feature a 2160x1200 OLED screen. I feel like the screen-door effect is less severe on the Oculus but both are good. Contrast in lighting levels can cause reflections in the Vive that form concentric rings around your pupil. The Rift also has reflections but these take the form of "godrays" that appear to be moving in towards your eye. Winner: Oculus Rift Controllers The Vive controller is like a combination of a Wii wand and a Steam controller. It's cool to see the haptic touchpad from the Steam controller onto something else. You can do some cool things like split the touchpad up into four buttons. The Oculus Touch controllers are really nice. You can make several poses with your hands including closing and opening your hands and pointing your index finger. The controllers aren't ambidextrous and they feel very different from the Vive wands. Plus, they only take up about half the space when you set them down on any surface.  However, the pose they force your hand into feels unnatural and I can easily see how these would cause discomfort after extended usage. Winner: Tie Tracking The HTC Vive is built for room-scale tracking. You can freely walk around an area up to 15'x15' and only have to worry about tripping over your cord or running into a wall. The Rift, on the other hand, uses two forward-facing motion trackers with a much smaller 7'x7' area. The most annoying thing about the Rift is you have to keep facing the motion sensors or you will lose tracking. Some games continuously warn you to turn around and face the sensors, which really limits the kinds of games you can enjoy with the Rift. So with the Vive you just have to worry about not running into walls, but with the Rift you have a smaller area and you also have to consider your rotation in VR and in the real world while playing, which really breaks the immersion. Winner: HTC Vive Conclusion Both headsets are good. The Oculus Rift is a polished version of the original Oculus DK1, while the HTC Vive is a less refined headset with more advanced tracking capabilities. The Rift is $200 cheaper and is probably better for seated VR experiences, while the Vive allows room-scale games and experiences the Rift can't match with its limited tracking technology.

Josh

Josh

Another beta update available

A new build is available on the beta branch on Steam. This fixes a couple of issues. Oculus view projection is fixed. Added VR.AButton, VR.BButton, VR.GripAxis for compatibility with Oculus Touch controllers:
https://www.leadwerks.com/community/topic/17052-vive-and-oculus-controls/ Fixed terrain collision bug:
https://www.leadwerks.com/community/topic/16985-character-controller-falls-through-terrain/

Josh

Josh

×