Wednesday, 28 July 2010

Engine Update: Shaders & Editor Additions

It has been a while since my last update. The image below shows some of the things I've worked on these past few days...


So what's new? First off, the shaders might have caught your attention, the lava is flowing and the arrows are flashing which you can't see in the still image unfortunately, I'll make sure to include them in the next video. They were really just experiments to get some practice with shaders and was hoping to use it for a material editor I was working on (had to put it on hold for now) Still, I think they look pretty cool (especially when you see them in motion)

The next thing you can see on the image is the ContextMenu (pop-up menu that appears when you right-click) Its part of the Editor and is rendered inside of the XNA Game window. XNA is still running as it is used to, winforms is added to the XNA window not the other way around.
As you can see there are several useful options inside this pop-up window. You can quickly add new Entities, add selected entities to your current script and continue playing or restart the level using the changes you made in edit-mode.

Hopefully I'm able create another video soon, showcasing some other additions that were added over the past couple of weeks. In the meanwhile I'm working on a game prototype, this directly aids in build the engine as well...

Sunday, 11 July 2010

Core Engine: Creating a simple level (Video)

I'm back with another video, this time I'll show you the creation of a (very) simple level. With The purpose of demonstrating some of the new additions, including the Animation Editor and the updated Visual Scripter. The video playback speed is set to x2 to reduce the overall length. Hopefully you'll enjoy watching and get a bit of insight in the engine's development capabilities.


The menu system shown in the video above is a WIP, originally all level objects were added at build-time. It's a big change in overall engine design to get these things working flawlessly with the new system. The core is aimed at rapid development and tweaking of the game/level while playing. It's been like that since day one and the new system should compliment that, increasing flexibility of the engine and speeding up the overall process of creating games.

Thursday, 8 July 2010

Visual Scripting Editor (Video)

It's 6:45 in the morning and the scripting editor is finally ready for a short demonstration. Spend most of the time cleaning up the node-system and made it a LOT easier to add additional node types in the future. The scripts are now directly stored inside the level file and can be stored separately if desired (for re-use in other levels)

In the video you will see two simple scripts, one animating a box and the other toggling a point light on and off. You'll also see the new Level Manager window, more on that later.



(Watch in HD & Fullscreen!)

Monday, 5 July 2010

Scripting for Artists (and programmers)

My last entry was over a week ago, but I've been very busy with C# nonetheless. The most interesting (to me at least...) is a visual scripter I've worked on for the past 4 days. It's supposed to work very similar to UE3/UDK's "Kismet". If you don't know what Kismet is, don't worry it is explained a little further in this entry. Although the visual scripter or artist-scripter (as it would be most useful to non-programmers) is not the only thing I've worked on (Animation Editor is another thing that is currently WIP), but I'll only talk about scripting for now.

The past couple of days I used MEL (scripting in maya) Unity Scripting and Dragon Age scripting. They all are terrible to get into. They are probably great if you spend a lot of time learning them, but I usually spend only a very limited about of time on any of those scripting languages. Now for "us" programmers it's not that hard to learn a scripting language if you take the time, but for artists and level designers whom only occasionally need to write a script it's very helpful to have a tool like Kismet. See below...

Example script made in Kismet.

Kismet is not designed to replace the regular scripting language in UE3...it's a tool to help create simple (and sometimes more complex) scripts for level specific behavior. The more complex and game wide scripting can only be done with the regular scripting language. Even though I'm a programmer and can probably live without this tool, I still decided to create something similar, as a challenge, a cool new feature and because it could prove to be very useful when working on our next game...

So far, the basic system is in place and working properly. I hadn't really worked with Winforms nor Event driven programming before, so this was a great way to get into that.

My own visual scripter implementation (visually still very unpolished)

Progress so far: A new script can be created at runtime, nodes can be dragged around, connections between nodes can be created and the whole script can be saved and reloaded to and from the hard drive. A few simple scripts have been created so far (ea. playing an elevator animation when the player enters a volume)

Similar to Kismet, you can load an animation file (previously created in the Animation Editor, more on that later) and play it when the assigned trigger is fired (Can be something like a level has completed loading or the player entered a trigger volume).

I should be able to demonstrate all this in a video shortly, first I'll continue working on essential usability features...
Be sure to keep an eye on my YouTube Channel if you'd like to get an early glimpse of the Scripter in action (I'll upload a video as soon as I feel it's ready to be recorded)

Monday, 28 June 2010

Post-Processing Volumes

This time I'll keep the words to a minimum and let the images speak for themselves...(more info below)

Base Image

Increased black-point

Cold tint

Warm tint

If you've ever tried Post-Process Volumes inside of UDK/UE3 then you'll be familiar with the concept. I've tried to replicate a lot of its features. You can affect highlights, midtones and shadows (as seen in the images above) as well as bloomscale, blur, noise etc. They all react to the position of the player (inside or outside of the volume) and will transistion between the values when you enter/leave the associated volume. I'll upload a video of that later on...On a sidenote, I've made a lot of progress with the animation editor, more info on that will be available later on just like the video :)

Saturday, 26 June 2010

Engine Update: (Finally?) Switching to Winforms

You might argue it's about time the engine got a proper interface, I agree :) I was trying to avoid using winforms (to keep compatibility with Xbox easy and maintainable to name a reason) and using the console for most if not ALL runtime actions (except for the Gizmo) I had my reasons for not using winforms, but after rethinking the overall design of the engine, its time to do things a little bit different...

One of the reasons that got me doubting the usability of the current interface is a new (and still WIP) feature for creating animations at runtime. The goal of the Animation Editor is not to create complex character animations, but rather allow the creation of quick and dynamic animations for rigid objects such as doors and elevators. At first I made it compatible with the Console like any feature prior to this one...It works, but is definitely not the best way to do animations. It's hard to know what keyframes are used, and what the timelines looks like...I made a very simple elevator animation (with acceleration and deceleration) and it does work...however it's not very flexible, at all.

That got me thinking and finally got me to try winforms...After an hour of experimenting, it finally worked. I'm pretty new to winforms, but it surprised me how easy most things can be achieved with very little effort. For starters I made a "Search Actors" window as well as a "Object Properties" window. Both are shown below. (Click on image for full-size)



The Search window can be activated using "Ctrl-F" like many other applications, clicking the "properties" button with an object selected will show its...properties.

I have a few other browsers/windows I'd like to get working on in the next couple of days (Tracker window, Content Browser, Animation Editor) I'm currently looking at UDK (Unreal Development Kit) for inspiration on browsers/windows. Their Content Browser is pretty great, and would really help with game development if Core Engine had something similar.
During development of "Over Night" we did lack a proper naming convention and both the asset naming and asset count quickly got out of hand. In the end it took a lot of time to find the proper texture file or locate a specific model.

I think I've talked enough about winforms for now :) I've got a few other features lined up, most of them are already working properly, but are still in early alpha stage...

Sunday, 20 June 2010

Engine Update: Scripting, ReverbVolume & Tracking Window

The first one is the ReverbVolume as seen in other game engines like Unreal Engine 3. The volume is very useful when defining rooms,allowing you to alter sound properties when either inside or outside of the volume. The volume alternation is already working when inside or outside of the volume, ironically the only thing that is not yet in place is the Reverb effect itself. I'll explain ReverbVolumes a little more in-depth later on once I've completed finished it, hopefully including the actual Reverb effect instead of just the volume/pitch modifiers. In the video on the bottom you can see/hear it for yourself.

The white box is the reverb volume, the blue circles are ambient sounds emitters (or actually the radius of the emitter)

Another concept I've been experimenting with is a sort of Tracking Window (or output/clipboard window) It's an additional (and optional) window that you can use to print out useful information. You can choose to print it as a static string. As a sort of clipboard/memory aid to help with Vector positions or pretty much any piece of info you may need to remember in runtime. If it were nothing more than that, it would pretty much be an in-editor notepad...So I added something I like to call "live-tracking" (or real-time tracking, or just tracking...) You can use the tracking feature to keep track of any property an object may have (positions, rotations, scale, volume, pitch, visbility etc.) the window uses a series of Slots that can be filled with one traceable object each. Most of it is already working, I'll have to spend some more time on it to add every little detail. Eventually I'd like to have each slot assessable and allow user input to change any of the properties that is being tracked by the window. You can see a sneak preview of it in the video below.

The tracker window is tracking the positions of 3 objects in the scene.

The last thing I worked on today was a basic scripting/event system. In both "Needle Juice" & "Over Night" the event code got really messy over time, requiring a lot more time to find anything...which is a complete waste of time, especially when you're nearing the end of a project. In order to prevent this from happening again I need to have a solid and clean system to handle events and scripts. So far I redesigned the TriggerVolume class used for any positional triggers and added support for Enter/Leave Volume events. To test the new system I made a (simple) script that opens and closes a door when the player approaches.

All of the described features above are shown in the short video below. Make sure to turn on your sound, because the reverbvolume can only explain itself with sound ;)


The first sound you hear is that of a bar, the second is a bit more difficult to hear, it represents the streets just outside of that same bar. when you move through the door, the indoor sound will fade to a lower volume while the street ambient becomes more noticeable.