[Development] Presenting my project! Engine for making games like WC3 custom maps

Level 4
Joined
Oct 19, 2017
Messages
37
Haha, that's what I like to hear! :grin:

Graphics will be improved. I'm hoping to add better materials, ambient occlusion, particle effects, post processing (bloom/glow), etc. All of that is definitely possible for a solo dev/small team, but it'll be a while until I can do more focused work on graphics.

And good timing, an update is coming in just a bit!
 
Level 4
Joined
Oct 19, 2017
Messages
37
Update 5

The script editor is DONE! This time around, I decided to make a video update:


I hope that makes sense. I think I'm done with editors for now, and from here on I'll be working more on gameplay-oriented stuff. There'll probably be stops here and there for more engine work (e.g. particle effects, audio and such). I'll try to keep updates coming more frequently.

As a bonus, I wrote a wall of text well structured document with details about the script editor if you're curious:

Variables
  • Support for local & global variables.
  • Variables can be single items or lists.
  • You can set initial values for each entry of a list.
  • You can easily iterate over a list with the "Foreach" action. It goes over each entry in the list in turn, placing it in another variable, and executes a set of actions. This is what I use to move the bats in the video.
Events
  • The current system supports only one event per script. The upside of this is that the system will know which event arguments are relevant for the script, rather than prompting you in the comments to use "Triggering Unit" or such. Context sensitivity ftw.
  • There is support for event arguments, e.g. the "Unit Enters Region" event lets you know which unit entered.
Conditions
  • Conditions are supported. They work pretty much exactly like in SC2, e.g. all conditions must evaluate to "True" for a script instance to run.
  • There is support for And/Or/Not logical operators.
  • Comparisons: Compare two arbitrary arguments. Can use e.g. functions and context info for this, for comparisons like HeathOf(TriggeringUnit) < 10.
Map markers
  • The editor supports simple regions (for now, only rectangular boxes) and points.
Expressions
  • This was so much fun to work with :) Any numeric argument can be an expression, e.g. "x + y * 2". You can then go ahead and set X and Y to whatever you want it to be by just clicking the arguments.
  • Current supported operators are: +, -, /, *, and exponents (^).
  • I hope to add functions here later, e.g. square root. I might also add constants like Pi, Tau, etc.
Quality of Life
  • Smart (?) default values: The system tries to assign values to arguments when types match. For example, in the video, when I create the "Move Units" action within the foreach loop, the editor guesses that you want to use the "Item" variable as the argument deciding which unit to move.
  • All actions, functions, events and their arguments have descriptions.
  • You can create folders and comments in the script list in order to organize things neatly.
  • Run the game directly from the editor by pressing Ctrl + R.
Code Generation
  • The editor outputs all scripts to a single C# code file.
  • The code is compiled along with all the other mod code, and will be compiled to machine code by the Just-In-Time compiler. In other words, scripts should run very fast.
  • The compiled code should generate little or no garbage, so you probably don't have to worry about garbage collector pauses or memory leaks from your scripts.
  • Coroutines are supported, i.e. you can pause a script in mid-sequence by inserting e.g. a Wait() action.
  • If/Then/Else actions are supported, letting you do conditional branching within a script.
  • Calling other scripts is supported.
  • I've tried to make the generated code as legible as possible so you can debug it easily.
 
Level 4
Joined
Oct 19, 2017
Messages
37
Update 6

Last update for 2019! :D

I've moved on to gameplay-related work (more on that next update), but for now I'd like to show you my progress on pathfinding. I.e, the problem of getting units from point A to point B without looking overly stupid. I'm not interested in doing anything revolutionary here, so I've followed the model they use in StarCraft 2 (see this excellent presentation). Basically, it creates a triangle mesh that roughly matches the world geometry and then "walks" between triangles to find a path between two points. Here's how it looks in my testbed:

navigation_testbed.png


This is a top-down view of a "map" where the boxes with dark lines are impassable objects or walls. The green line shows the computed path between the start and end (green circles).

Tech stuff: I use Constrained Delaunay Triangulation to create the triangle mesh. This took a while to do, since all implementations assume that you have floating point values, and I wanted to do it with only integers (both for speed and for the lockstep network model). I then search for the path using A-star, and smoothen out the path using the Funnel algorithm. I've done some tweaks to the Funnel to allow for units that have a radius.

Here's how the navigation mesh is mapped to a simple ingame map:

navigation_ingame.png


The walls create impassable barriers and makes units navigate around them. I made a quick video to show how the navigation looks in action:


The big chunk of work missing in my implementation is all the steering algorithms needed to make units move around other units intelligently. For now, I don't even have unit-to-unit collisions. I'm hoping to make some interesting gameplay without having to delve deeper into that particular rabbit-hole, but we'll see where it goes.
 
Level 7
Joined
Jul 7, 2011
Messages
243
Cool. You already have some functionality that I used a lot in World Editor.
From some of the things I saw, you didn't forget a few details. Something I'm going to say, when your game and editor gets more ahead a community will be important to provide you with feedback, which will help further detail more your game and editor.

One feature that I will suggest for you to add to your editor is the UI module. To work with resources that user interacted with the such as buttons (buttons for skills), texts (texts informing the character's HP) (how many lives the player has), squares (showing inventory), bars (showing time percentage of something (channeling a skill)).
 
Level 4
Joined
Oct 19, 2017
Messages
37
Cool. You already have some functionality that I used a lot in World Editor.
From some of the things I saw, you didn't forget a few details. Something I'm going to say, when your game and editor gets more ahead a community will be important to provide you with feedback, which will help further detail more your game and editor.

One feature that I will suggest for you to add to your editor is the UI module. To work with resources that user interacted with the such as buttons (buttons for skills), texts (texts informing the character's HP) (how many lives the player has), squares (showing inventory), bars (showing time percentage of something (channeling a skill)).

Glad to hear it! I'll definitely aim to make community-driven decisions. Since the entire editor is part of the mod, it will also be possible for people to make changes on their own.

A UI editor is a great idea - It's definitely something I want. For now, the UI system is available, but it requires coding (C#). It's similar to making a program in Windows Forms or WPF, but without the visual editor.
 

pyf

pyf

Level 31
Joined
Mar 21, 2016
Messages
2,989
Damn, I would be willing to pay tons of money if you made it reality [...]
@Hanman69: why don't you pay tons of money right now?
:wink:
@Ollhax: please, no refunds for him. tia.
:xxd:

It is always a pleasure to read about any new implementation of the voxel technology in software projects (as well as hearing again about MagicaVoxel). It is imho a shame that the 3D hardware industry still does not make them hardware accelerated afaik.

:thumbs_up:
 
Level 4
Joined
Oct 19, 2017
Messages
37
@Hanman69: why don't you pay tons of money right now?
:wink:
@Ollhax: please, no refunds for him. tia.
:xxd:

It is always a pleasure to read about any new implementation of the voxel technology in software projects (as well as hearing again about MagicaVoxel). It is imho a shame that the 3D hardware industry still does not make them hardware accelerated afaik.

:thumbs_up:

Yup, feels like the style is getting more and more popular! In a way, voxel art is very suitable for modern graphics, with more and more focus on e.g. better global illumination and ray-tracing. Both have interesting avenues of optimization for voxel objects. I hope I'll have time one day to put more research into that :)

While I'm at it, here's a mini-update: I'm currently working on physics code. Basically, I need to be able to merge together polygons for all the terrain tile data (e.g. walls, trees, etc) so I have a representation of what is solid and what isn't. Since I'm too lazy to read research papers about it I'm currently integrating this implementation - hopefully I can use it later for other things as well, such as creating complex regions for trigger zones. Work is moving forward! :grin:
 

pyf

pyf

Level 31
Joined
Mar 21, 2016
Messages
2,989
Yup, feels like the style is getting more and more popular! [...]
We can thank Minecraft for that.
:mwahaha:
[...] In a way, voxel art is very suitable for modern graphics [...]
... not to mention truly true realistic physics. Imho voxel objects are so much more closer to their real world counterparts than polygon ones...
[...] Both have interesting avenues of optimization for voxel objects. I hope I'll have time one day to put more research into that :) [...]
Prepare for your Profile to get a little bit spammed.
:wink:
 
Level 4
Joined
Oct 19, 2017
Messages
37
We can thank Minecraft for that.
:mwahaha:

... not to mention truly true realistic physics. Imho voxel objects are so much more closer to their real world counterparts than polygon ones...

Prepare for your Profile to get a little bit spammed.
:wink:

Haha, yup, and MagicaVoxel as well I think. The stuff people create with it is pretty amazing.
 
Level 4
Joined
Oct 19, 2017
Messages
37
Quick update - I'm still alive and the project is moving forward at a steady pace. I've been working a lot with physics and pathfinding, but there's still some work on wrapping that up, so for now I'd like to show you something different. I made a quick demonstration on how to create a life counter using the script editor:

 
Level 4
Joined
Oct 19, 2017
Messages
37
Oh yeah :) It's a lot of fun. The slightly annoying part is the amount of time that goes into groundwork that everyone takes for granted in an RTS, e.g. pathfinding has been a real struggle (and continues to be one). But I have managed to make some progress into gameplay as well, which I hope to show in my next update.
 
Top