Categories
Unity3D Unity3D-tips

#unity3d #missingdocs: CanvasRenderer.SetMesh() – making it work (mostly)

This once-obscure method, that – I guess – is the low-level call used by most of the new Unity GUI … is now the only way of drawing meshes in GUIs. The previous options have been removed, with brief comments telling you to use .SetMesh instead. Half of the DrawMesh / DrawMeshNow methods have also been removed (no explanation given in docs), which were my other go-to approach.

Unfortunately, no-one has documented SetMesh, and it has significant bugs, and breaks with core Unity conventions. This makes it rather difficult to use. Here’s the docs I’ve worked out by trial and error…

Categories
Unity3D

What one #unity3d private class should be made public? @shawnwhite

Shawn asked on Twitter:

We only get to pick ONE? :).

How do we decide?

There’s two ways to slice this. There’s “private APIs that would hugely benefit us / our projects / everyone’s projects / 3rd party code that I use (e.g. other people’s Asset Store plugins I buy/use)”. We can judge that largely by looking at what private API’s I’ve hacked access to, or decompiled, or rewritten from scratch.

Then there’s “what CAN’T I access / hack / replace?”. That’s a harder question, but leads to the truly massive wins, I suspect.

Stuff I’ve hacked access to

The Project/Hierarchy/Scene/Inspector panels

So, for instance, I made this (free) little editor extension that lets you create new things (scripts, materials, … folders) from the keyboard, instead of having to click tiny buttons every time.

There are no public API’s for this; that’s a tragedy. Most of these Unity panels haven’t been improved for many years, and are a long way behind the standard with Unity’s other improvements. They “work”, but don’t “shine”.

What could I do with this?

Well … a few studios I know have completely rewritten the Scene Hierarchy panel, so that:

  • it does colour-coding of the names of each gameobject
  • clicking a prefab selects both the prefab and any related prefabs, or vice versa, or hilights them
  • added (obvious) new right-click options that are missing from default Unity Editor
  • automated some of the major problems in Unity’s idea of “parenting” (parenting isn’t always safe to do; you can enforce / protect this with a custom scene hierarchy)
  • made it put an “error” icon next to each gameobject that is affected by a current error.
  • …etc

All massively useful stuff that helps hour-to-hour development, reducing dev time and cost.

It’s all “possible” right now by writing lots of horribly ugly and longwinded boilerplae code, and using the antiquated Editor GUI API.

But to make it play nicely with the rest of Unity requires also hacking Unity API’s for the various panels/windows, and detecting popups (and adding your own popup classes, since Unity keeps most of theirs private), and detecting drags that started in one panel but moved to another, detecting context-sensitive stuff that is not exposed by current API’s, … etc.

A better List editor

The built-in sub-editor (like a PropertyDrawer – see below) is very basic – really a “version 0.1” interface.

There is a much nicer one, that does what most Unity developers need – but it’s private and buggy (last time I tried, it corrupted underlying data. That’s presumably why it’s still private?)

Editor co-routines

Co-routines work perfectly in the Editor. (EDIT: thanks to ShawnWhite for the info): Unity doesn’t use co-routines outside of runtime; what appears to use them is OS-provided multi-threading. Strangely, when using that, I haven’t seen any of Unity’s ERRORs that are usually triggered by accessing the Unity not-threadsafe code from other threads – something weird happening in the OS?

Why doesn’t Unity support co-routines in the Editor?

I’ve no idea. There are many people who’ve re-implemented co-routines in editor, exactly as per Unity’s runtime co-routines. As a bonus, you end up with a much better co-routine: you can fix the missing features. But there’s some strange edge-cases, e.g. when Unity is reloading assemblies (which it does every time you save any source file), for a few seconds it presents a corrupt data view to any running code, and you if start running a co-routine in that time, it will do some very odd things.

Unity recently exposed some API’s to detect if Unity was in the middle of those reloads, but last time I tried it I couldn’t 100% reliably avoid them. An official implementation of Unity’s own co-routine code, that was automatically paused by Unity’s own reload-script code, would neatly fix this.

Until we have something like that, we’re forced to write two copies of every algorithm (C# doesn’t allow co-routine code to be run as a non-co-routine) so we can test in Editor, do level editing, debug and improve runtime features, etc … which is silly.

Stuff I CANNOT hack into/around

Serialization

Unity is the only engine I’ve worked with where the core data structures and transformations are opaque, hidden, can’t be extended, can’t be debugged. Tragically: also has many missing features, bugs, and serious performance issues.

There are good reasons for why this remains in such a bad state (It’s hard to fix. Meanwhile … it sort-of works, enough to write games in – you just have to occasionally write a lot of bad code, have to rewrite some ported libraries, have to know a lot of Unity-specific voodoo, etc).

But if it were exposed – we could (I would start on it tomorrow!) fix most of the problems. I’ve done proof-of-concepts with some terrifying hackery that show it’s possible – and a lot of the architecture is well explored, other ways it can be implemented, that could be given to developers as options (some would work better for your game, others might not; but you could pick and choose).

It’s too much to ask for (it intersects so much of the engine, and it would unleash a horror of potential bugs and crashes), but my number 1:

Callbacks for ALL core Unity methods

This sounds small but would have positive impact on a lot of projects.

c.f. my reverse-engineered callback diagram for EditorWindow in Unity:

…but we have the same problems for MonoBehaviour, for GameObject, etc. Not only are lifecycles poorly documented, but they’re inconsistent and – in multiple places (c.f. above diagram “Open Different Scene”) – they’re not even deterministic! It’s random what methods the Editor will call at all, let alone “when”.

Under the hood there must be reliable points for doing these callbacks … somewhere.

Undo

Undo has never worked in Unity. The worst stuff I narrowed down to ultra-simple demos that Unity’s own code was broken, I’ve logged bugs and Unity fixed them – but the current system is a horrible mess, much too hard to use. Many methods only randomly do what they’re supposed to, and there’s no way to debug it, because the internals are hidden.

If Unity exposed the actual, genuine, underlying state-change points, we could correctly implement editor extensions that support Undo 100%. I’d be happy to also use them to write an Asset that implements “easy to use Undo”, based on how other platforms have implemented it (e.g. Apple’s design of NSDocument is pretty clear and sensible, based on lists of Change Events).

Unity could then make “Undo that works” a mandatory requirement on the Asset Store. Currently it’s listed as mandatory, but no Asset has ever been checked for it (so far as I can tell).

Not least because Unity’s own code has had such problems supporting it!

PropertyDrawer: doesn’t quite do what it claims to (yet)

Recall what I said above: most of the Editor GUI/UX itself “hasn’t been improved for many years”. Unity made it user-extensible/replaceable many years ago – so in theory you could update / replace whatever you want. There’s a huge amount we’ve been able to update and customise (although it’s very expensive in coding time, due to a lack of modern GUI API’s, sometimes it’s well worth it).

But you can only replace the Inspector for a particular Component/MonoBehaviour. You cannot say “I want to replace the Inspector for GameObject’s that have Components X Y Z”.

Worse, if you wanted to replace e.g. the part of the Inspector that automatically draws a Vector … you can’t.

Unity had a great idea to solve one of these: Property Drawers. These would let you customise the rendering of sub-parts of an Inspector – the rendering of individual labels for member variables, list items etc.

IN THEORY this would let you write your own list-renderer that would work everywhere, and make lists very easy to use in the Editor – but only write the code once.

IN PRACTICE it was only implemented in a very basic way, and most of the things you want to use it for are blocked / inactive. There is NO WAY to fix this in user code.

(well, actually there is … c.f. . But this is a horrendous amount of work – AI’s author did a Herculean task! – and means you’ll never the benefit of future Unity UX / GUI updates, if there are any).

So: big upvote for exposing more of PropertyDrawer

Categories
server admin

How to fix: upgrading Apache to 2.4 / PHP 7 breaks WordPress

WordPress had a critical update recently, and I got tonnes of emails (one from each blog I run) demanding I upgrade NOW. So I did, and upgraded Apache to latest while I was at it.

Oh dear. All sites offline. First:

Unable to connect

…then, when I fixed Apache, I got:

“Your PHP installation appears to be missing the MySQL extension which is required by WordPress.”

What happened, and how do I fix it?

Apache 2.4 upgrade is a bit dodgy in Debian

The Powers That Be decided to mess around with core parts of the config files. The right thing to do would have been to add some interactive part in the upgrade script that said: “By the way, I’ve made all your websites broken and inaccessible, because they need to be in a new subfolder. Shall I move them for you?”

Here’s the reason and the quick-fix too

Apache 2.4 brings in PHP 7.0, replacing PHP 5

PHP 5 is old, very old. Historically, PHP has also been managed in a fairly shoddy manner, very cavalier with regards to upgrades, compatibility, safety, security.

So … the standard way to run PHP is to have a separate folder on your server for each “version” of PHP. Everyone does this; PHP is so crappy that you have little alternative.

But this also means that when Debian “upgrades” to PHP7, there is no warning that the new config file – speciic to PHP7 – has been created and ignores the existing config file

This is wrong in all ways, but it’s forced upon linux user by the crapness of PHP. If PHP weren’t so crap, we’d have a single global PHP config file – /etc/php/config.ini – and maybe small override files per version. But nooooooo – can’t do that! PHP is far too crap.

(did I say PHP is crap yet? Decent language, great for what it was meant for – but the (mis)management over the years is truckloads of #facepalm)

So, instead, you need to copy your PHP5 ini over the top of your PHP 7 ini – or at least “diff” them, find the things that are “off by default” in PHP 7 but must be “on” … e.g. MySQL!

Enable them, e.g. change this:

[bash]
;extension=php_mysqli.dll
[/bash]

to this:

[bash]
extension=php_mysqli.dll
[/bash]

…and restart Apache. Suddenly WordPress is back online!

[bash]
/etc/init.d/apache2 restart
[/bash]

Categories
PHP programming

WordPress plugin: insert link to latest post (in category) on your menu

Instructions:

  1. Copy/paste this into your functions.php (TODO: convert it to a standalone php file, and make it into a plygin you can activte/deactivate)
  2. Create a new menu item of type “custom URL”
  3. Make your URL “http://#latestpost:category_name”
    • where “category_name” is the name of the category whose latest post you want to link to
  4. Make the name whatver you want to appear on the menu
  5. Profit!

Based on an idea (with some upgrading + bugfixes for latest WordPress in 2016) from http://www.viper007bond.com/2011/09/20/code-snippet-add-a-link-to-latest-post-to-wordpress-nav-menu/

[php]
/** Adam: add support for putting ‘latest post in category X’ to menu: */
// Front end only, don’t hack on the settings page
if ( ! is_admin() ) {
// Hook in early to modify the menu
// This is before the CSS "selected" classes are calculated
add_filter( ‘wp_get_nav_menu_items’, ‘replace_placeholder_nav_menu_item_with_latest_post’, 10, 3 );
}

// Replaces a custom URL placeholder with the URL to the latest post
function replace_placeholder_nav_menu_item_with_latest_post( $items, $menu, $args ) {

$key = ‘http://#latestpost:’;

// Loop through the menu items looking for placeholder(s)
foreach ( $items as $item ) {

// Is this the placeholder we’re looking for?
if ( 0 === strpos( $item->url, $key ) )
{

$catname = substr( $item->url, strlen($key) );
// Get the latest post
$latestpost = get_posts( array(
‘posts_per_page’ => 1,
‘category_name’ => $catname
) );

if ( empty( $latestpost ) )
continue;

// Replace the placeholder with the real URL
$item->url = get_permalink( $latestpost[0]->ID );
}
}

// Return the modified (or maybe unmodified) menu items array
return $items;
}
[/php]

Categories
games design

Better than Civ6? Bookmarkable links for Civ4 mod: Master Of Mana sources

Master of Mana was a great game – much better than Civ5, and from what we’ve seen of Civ6, Firaxis is still playing catch-up in a few areas :).

The author has disappeared, and his website has been taken over by scammers (not even going to link it), but the community has kept going the SourceForge-hosted copy of the source and continues to update it. The files are ordered confusingly (inherited from previous projects, and Civ4 itself, which was mainly shipped as a commercial game, not as a moddable game!). Here’s a few key links to find interesting / useful game-design gems:

Categories
Uncategorized

The age-old question of Civ games: Roads and rivers in center of tiles, or edges?

Centers of tiles Edges of tiles
Screen Shot 2016-04-18 at 22.31.21

Screen Shot 2016-04-18 at 22.31.10

Pros and cons

  • Centers gives you STRAIGHT things (on a hex grid, it’s the only way to get straights!)
    • Roman Roads
    • Canals
    • Large rivers
  • Edges gives you meandering things (on a hex grid, centers only give wiggles at very large scale)
    • River valleys
    • Realistic medieval roads
    • Modern roads in mountains and hills (tend to wiggle crazily)
  • Movement is simplified with centers: If you’re on the tile, you’re on the road/river
  • Inhibition of movement is simplified with edges: Civilization games have traditionally given a move penalty AND a combat penalty to any tile-to-tile move that crosses an edge containing a river

My leanings…

One thing in particular that struck me from looking at the pictures:

Straight roads look so terrible that every single Civilization game since Civ1 has artifically wiggled them when rendering!

In particular, with 3D games (Civ4, Civ5 especially) this actively damages gameplay – it’s much too hard for the player to see at a glance which tiles are connected by roads, and to what extent. So much so that they cry-out for a “disable the wiggling effect on road-rendering” setting.

Also: I’m happpy to solve the “movement” problem by saying that if you’re in a tile that borders a road or a river, you are assumed to be “on” that road/river, with special-case handling under the hood that handles cases where two roads/rivers border the same tile. It increases the connectedness “for free” – but that’s how Civ games tend to do it anyway: encourage the player to put roads everywhere!

Thoughts on a postcard…

Categories
Unity3D-tips

#unity3d remove yellow warnings you don’t need #unitytips

Screen Shot 2016-04-16 at 11.48.08

Warnings are very, very important in any compiled language: they tell you that the computer has checked your code and realised you “probably” created a bug; they even tell you something about what the bug might be.

..but the computer isn’t sure – if it could be sure, it would be a compiler Error (in red). So (in Unity) it’s yellow, and “optional”. But in those cases where it’s not a bug – and you know it! – it’s very annoying. Most IDE’s let you turn them on and off, Unity doesn’t … here’s how to fix it.

Categories
games design Unity3D

Simple #civ5 clone in Unity: hexes, movement, unit selection

Current features

commit 26eafb7865965fd5ef5ee3ad4863f00acf8d10a2

  • Generates hexes landscapes, with heights (Civ5 bored me by being flat-McFlat-in-flatland)
  • Every hex is selectable, using custom fix for Unity’s broken mouse-click handler (see below)
  • Any object sitting on landscape is selectable (ditto)
  • Selected units move if you click any of the adjacent hexes (shown using f-ugly green arrows on screenshot)

The green “you can move here” arrows look like spider-legs at the moment. #TotalFail. Next build I’m going to delete them (despite having spent ages tweaking the procgen mesh generation for them, sigh) and do something based on wireframe cages, I think.

Screen Shot 2016-04-11 at 22.59.25

Techniques

Hexes

I started with simple prototyping around hexes, but soon found that it’s worth investing the time to implement all the primitives in Amit’s page on Hexagon grids for games: http://www.redblobgames.com/grids/hexagons/

In practice, especially the ability to create a class that lets you do “setHex( HexCoord location, GameObject[] items )” and “getContentsOfHex( HexCoord location )” and things like “getNeighboursOf” … is very rapidly essential.

Mouse clicks in Unity

IMHO: work pretty badly. They require the physics engine, which – by definition – returns the WRONG answer when you ask “what did I click on?” (it randomises the answer every click!). They also fundamentally oppose Unity’s own core design (from the Editor: when you click any element of a prefab, it selects the prefab).

So I wrote my own “better mouse handler” that fixes all that. When you click in scene, it automatically propagates up the tree, finds any listeners, informs them what was clicked, and lets you write good, clean code. Unlike the Unity built-in version.

Procedural meshes for arrows

With hindsight, I should have just modelled these in blender. But I thought: I want a sinusoidal curve arrow; how hard can it be? I may want to animate it later, by destroying/adding points – that would be a lot of work with Unity’s partial animation system (it’s great for humanoids, less great for geometry) – but animating points in a mesh from C# code is super-easy.

In the end, I spent way too long tweaking the look, and on having 2-sided polygons that broke the Unity5 Standard shader by being too thin (on the plus side: I now know what that mistake looks like, and I’ll recognize it in future Unity projets. It has a very peculiar, unexpected, look to it).

I should have just made them in Blender, and – if I got as far as wanting to animate them – re-modelled in source code later (or found a “convert blender file to C vertices array” script, of which I’m sure there are hundreds on the web. Doh!

#lessonLearned.

Categories
advocacy fixing your desktop project management startup advice

Office suites (Word, Excel, Apple, Google) in 2016: Power-user experience

Every week, I have to use six different Office Software Suites:

  1. At school: Microsoft Office 2013
  2. At university: Microsoft Office 365
  3. At work: OpenOffice
  4. At home: LibreOffice
  5. Everywhere: Apple Keynote
  6. Everywhere: Google Docs

As an expert computer user (former SysAdmin), I’m often asked for help by people with non-computing backgrounds. When they see how many different suites I’m using, they’re … surprised, to say the least. Here’s a quick snapshot of what and why.

Categories
Unity3D Unity3D-tips

What makes a great #Unity3d asset? Which do you recommend?

Unity is still the only major game-engine with an effective, established Asset Store. This is an enormous benefit to game developers – but do you feel you’re making full use of it?

I’ve bought and used hundreds of Unity plugins, models, scripts, etc from 3rd parties. I’ve found some amazing things that transformed my development.

TL;DR: please share your recommended assets using this form: http://goo.gl/forms/G3vddOdRL3

Things we want to improve

This is a shortlist; if you’ve got areas you want to improve, please add a comment.

Categories
entity systems games industry programming

Which languages need Entity Systems libraries right now?

A few months ago I ran a survey to find out which programming-languages people were using with Entity Systems:

https://docs.google.com/forms/d/18JF6uCHI0nZ1-Yel76uZzL1UfFMI21QvDlcnXSGXSHo/viewform

I’m about to publish a Patreon article on Entity Systems (here if you want to support me), but I wanted to put something up on my blog at the same time, so here’s a quick look at the stats.

Categories
entrepreneurship games industry marketing and PR programming project management recruiting startup advice

LFG: I’m looking for CTO/TechDirector/Head of Mobile/Consulting roles in CA, TX, London, and Asia

TL;DR: experienced CEO/CTO/TechDirector with long background in programming, sales, and business management (Corporate, iPhone/Android, Games, Education) looking for strategic roles in USA, UK, and Asia.

After a year-out to do a post-graduate degree in Education, I’m looking for something new and exciting to do next. My primary goal is to boost a company or team rapidly and show significant outcomes – increased revenue or other KPI’s – either through Consulting or full/part-time senior leadership.

Categories
Unity3D

Trying to paint an in-editor Mesh in #unity3d: harder than you’d expect

A modest desire

The red pyramid in this image is a custom handle (3D) that you can grab, drag, and move around the screen. When it touches another GameObject, it finds any Sockets on that object, and attempts to rotate + move + scale the first object so that they connect together, like magnets.

Screen Shot 2016-03-13 at 11.20.55

Categories
games design Unity3D

Improved interactive GUI for Snap-and-Plug (glue/vertex snapping for complex objects in #Unity3d) #screenshotsaturday

Some screenshots from today’s improvements. I’m moving gradually towards releasing version 2. Shortlist of changes/improvements below…

From this mess … to this:
Screen Shot 2016-03-12 at 14.59.24 Screen Shot 2016-03-12 at 20.43.32
Building some odd machines to test it works:
Screen Shot 2016-03-12 at 15.00.21 Screen Shot 2016-03-12 at 19.50.44

Features and fixes recently added

  • Use shaded, materialed meshes for in-editor handles, instead of flat ugly rectangles and tris
  • Click/tap a socket’s handle to directly select it in the Scene view
  • Meshes are resized to fit the user-selected “socket size” variable
  • Only handles that are facing you are rendered; HUGE improvement for complex levels/machines/buildings/etc
  • Only handles you can see are clickable/draggable; HUGE improvement for complex scenes (where accidental clicks happened too often!)
Categories
games industry

An easy “solution” to the pre-owned games problem that’s destroying #gamedev

In case you weren’t aware, in a nutshell:

  • Dev writes game, gets share of profits when sold
  • Publisher manufactures game ($10 loss)
  • Publisher sells game to retailer at $30 ($20 profit)
  • Retailer sells game to public at $60 ($30 profit)
Categories
Uncategorized

Making a night-vision shader for animals in #unity3d

In the FPS roguelike I’ve been working on, a core feature is that each ability modifies how you interact with the world – you see things differently, you move differently, etc.

Night Vision

I’m working on a tiny level demo to show some of my ideas together. I want one character that can see in the dark, something like the “InfraVision” of D&D.

Spec:

  • Character can see independent of the existence of lights in scene
  • Vision is imperfect, significantly weaker than daylight vision, in terms of details, colours, etc
  • Vision enables easy location + identification of other creatures

Screenshots

Here’s my orc (a test avatar I already had) sitting on top of a building:

Screen Shot 2016-01-19 at 03.23.56

Step 1: cancel the lighting

We use Unity’s “GetComponent.SetReplacementShader( Shader, “” )” to change the shader to a simple “Unlit” shader (Unity provides a built-in one).

[csharp]
[ContextMenu("Enable dark vision")]
public Shader shaderDarkVision;

public void Start()
{
if( shaderDarkVision == null )
shaderDarkVision = Shader.Find("Unlit/Texture");
}
public void EnableDarkVision()
{
GetComponent<Camera>().SetReplacementShader( shaderDarkVision, "" );
}
[/csharp]

Screen Shot 2016-01-19 at 03.23.45

Step2: Add a vignette to nerf it

I want the DarkVision to be significantly less perfect than daylight vision, so let’s add a simple vignette (Unity has downloadable examples of this shader in their docs, but I only found it after I’d got mine working!).

This took me a long time to get working, just to get accurate screen-positions of shader pixels – so much of Unity’s semi-proprietary Shader language is still undocumented, after many years. I knew all the maths, and had implemented the effect in OpenGL / GLSL in minutes, but it took an hour or so in Unity. And once it was working, I got sidetracked in tweaking the exact curve of darkness of vignette.

Screen Shot 2016-01-19 at 03.24.22

Step3: Convert to grayscale (infravision should be colourblind)

This was easy – simply average the r/g/b components of your Color, somethign like:

[c]
avg = (color.r + color.g + color.b ) / 3f;
color = float4( avg, avg, avg, color.a );
[/c]

Screen Shot 2016-01-19 at 03.21.43

Step 4: several hours of experimenting with wild effects

I had some problems with this:

  1. It was too easy to see “everything”
  2. With no lighting-calcs, it was fugly
  3. With no lighting-calcs, it was VERY hard to do depth-perception. In a complex street, you got lost trying to tell which objects were near, far, blocking your way, or not.
  4. WAY too much detail on the textures is showing through: DarkVision should lose most detail, while keeping overall shapes clear

Here’s some of the things I tried and discarded. Note how the screenshots are from many positions – I ran around a lot, testing how effective the different shaders were for hunting a quarry (or fleeing an angry mob of AI’s).

Screen Shot 2016-01-19 at 02.57.08 Screen Shot 2016-01-19 at 01.34.27 Screen Shot 2016-01-19 at 02.26.02

Step5: FAILED: use depth-buffer shading

Unity staff: please write clear, correct, up-to-date documentation on depth-buffering as supported (or not) by your proprietary Shader Lab language, and with clear details on how this works in Unity5, not some hand-waving Unity4-maybe-Unity5-not-sure gumph.

I simply couldn’t get it to work. Using the proprietary built-in depth-buffer samplers either failed outright (0.5 across the sampler), or gave bizarre results.

Rumours suggest that we have to write 3 shaders: 2 for your proprietary system, and a third where we re-implement depth-buffer access by hand. This seems to me unlikely – I am sure Unity can handle that for you. This is the kind of feature that Unity’s ShaderLab does well (but no-one documents, and so it goes under-used by devs).

When you find or reverse-engineer instructions, ShaderLab is excellent. It’s such a pity that so often … you can’t.

Step6: Combine object-normals with plain greyscale

Ultimately, I fell back on “Fine, I’ll use the most basic bits of Shaders that even Unity can’t make confusing” – object normals. I faked shading Old Skool: each surface is darkened by dot-producting the forwards vector ( which by definition is (0,0,1) after the MVP multiplication stage) with the normal vector. That gives a float from 0 to 1, showing how much the surface is facing towards/away from the viewer.

Screen Shot 2016-01-19 at 03.26.07

I’m not delighted with this – it’s not quite the effect I was aiming for (I REALLY wanted to wipe more of the diffuse detail, but…). However, it does work quite nicely, and for now it’s more than good enough.

Benefits of final version

Here’s why I like it:

  1. Runs 100% independently of my main lighting – I never have to re-write it when changing lighting.
  2. Provides huge advantages at night time, or in low-light situations. More so the less lighting there is
  3. Provides depth-cues to the player, so that running quickly through streets (or tunnels) is still pretty easy to do
  4. Limits the over-powered nature by cutting down peripheral vision
  5. Runs very fast on GPU, despite crappy hand-written shader code (mostly because it doesn’t use any lighting calculations)
Categories
entity systems

Survey: which language(s) do you use along with an #entitysystem in #gamedev?

A lot of us have been looking at alternative engines recently, and for me the biggest challenge is that the intersection between “game engine I can use easily” and “programming language I am willing to use” is quite small.

That got me thinking: if you started a new commercial ES today, what language does your audience want?

Short Google form

FYI: I picked the top 10 global languages by popularity, and then cherrypicked from the next 50 or so on http://sogrady-media.redmonk.com/sogrady/files/2015/07/lang-rank-615-wm.png – favouring ones where I have met people that I know are using them in gamedev today.