A first-class Entity System for Unity3D
Unity is a great 3D engine and a good editor – but the programming environment is 10-15 years behind the curve. Entity Systems are a much better way of writing games, but they are surprisingly difficult to add to Unity.
I’ll bring the latest in modern ES techniques to Unity, turning parts of it from a “weak” programming environment into “one of the best”. In game-engine terms, this will put it far ahead of the pack.
This blog post is testing the waters:
- You can give me direct feedback on the proposed contents/scope
- I can start to see how much interest there is in making this
First round of feedback
A lot of people read this and got the impression I was going to charge them extra for the final product, and provide a library with no tutorials. Big confusion and misunderstanding! So, I’ve reworded those bits to be clearer.
Kickstarter: planning the campaign
Target Audiences (Expected)
I think I have four target audiences:
- Newbie devs, and non-programmers (artists, designers), who find the “coding” parts of Unity overwhelmingly difficult today
- Unity devs who’ve never used an Entity System on a real game project, and don’t know what they’re missing. They may have a lot of experience (shipped multiple games), or none (University/College students).
- Small Indie teams / sole coders who’ve used Entity Systems elsewhere, and feel that coding in Unity is slow, error-prone, boring, frustrating, and time-wasting by comparison
- Large Indie teams whose games won’t work in Unity because Unity is so bad at scaling to large projects. They’ve already re-written or replaced substantial chunks of Unity’s core so that it’ll work fast enough / reliably enough.
Types of Reward
Reward type 1: Discounted License
Everyone who backs the KS gets a copy of the library / license to use it. By backing the KS (at any level) you’re getting a substantially cheaper purchase compared to the final launch pricing on the Asset Store.
There might be some options here for different team sizes, different levels of support, etc.
Reward type 2: Expert Knowledge
When you have non-trivial questions about ES design and usage, it’s hard to get the attention of experts. They’re usually experienced, older, programmers with young families, or working in senior jobs. They have little free time.
Big developers fix this by hiring experts for a few days at a time. But small teams/individuals can’t afford the “entry” cost – as a Consultant, you need to charge at least $5,000 per engagement to cover all the admin overhead and hidden costs.
So, we have some options here to give everyone this kind of access.
Reward type 3: Source Code
In mainstream IT, when you purchase a library you rarely (if ever) get the source code. If you find bugs, or missing features, the vendor works hard and fast to fix them for you.
In the games industry, it’s the other way around: vendors take no responsibility for the code they’ve sold you, and in return … they give you full source access. “Fix it yourself, dude!”
If I let everyone have source, it raises my support costs. With each change, it won’t work for some people – because they’ve modified their copy – and I’ll have to help them update it.
On the flip side: Source code is your “Plan B” in case I get sick, or sell-out, or lose interest in the project, etc. It also gives you an easy way to add features of your own and send them back to me (which I then take on responsibility for maintaining).
I’m offering this, but it’ll be a high-cost. The teams that really need it should have no problem justifying the cost.
Types of Stretch Goal
To clear up confusion: these are things that would be present in the core product (e.g. the GUI is going to be a major part of the library!), but stretch goals would allow me to add extras to each of them.
Goal type 1: Editor GUI
In my experience the biggest effect on programming speed – once you get past your innate ability + level of experience – is the quality and “friction” of your tools.
As soon as you go beyond the simple stuff it’s damn hard to extend the Unity editor. But I’ve been hacking the Editor for a few years now, and I’m willing to do pretty much anything. Especially if it makes it easier to make games with!
Goal type 2: Example Games
The core will have some form of tutorials, but it probably won’t have a complete demo game.
Writing a game just to demonstrate an API is extremely time-consuming, and it’s not what you’re paying for when you buy the library.
But … it’s also a great idea: it improves the quality of the API, by giving me a reference product to check everything is as easy-to-use as intended. So I’d like to write one (or several), but I can’t do that on the base funding.
(Aside: If I ran the technology division at Unity corp, they’d be writing and publishing games every quarter)
Goal type 3: Tutorials
There will be tutorials with the core library. They’ll cover the basics of how to use it.
But … I’d like to go further, and do tutorials for every aspect. I’d like to do a written tutorial for everything, and I’d like to ALSO do a video tutorial for everything (some people only use written tutorials, other people only use videos. I’d like to make it great for both groups).
With a new library, tutorials are extremely expensive to write. Minor changes to the API – bug fixes, refactorings, feature additions – invalidate whole pages of tutorial at one stroke.
Pricing and Funding levels
These are approximate based on extrapolations of cost and expected “version 1.0” feature-set.
- License: $50-$150 (after launch, general public can buy at $200-$400 in Asset Store)
- Source code: $300-$1000 (various amounts of support)
- Access to experts: $150-$750 (various levels of privacy + interaction)
UPDATE: One person has stated they would “never pay these prices”. That’s fine – they’re way outside my target audience. I’m more likely to increase these prices than decrease them. If you know what an ECS is, and understand the value, this is probably too cheap already.
This is what it’s going to cost to build:
- Minimal version that’s usable in most game-dev: approx. $15,000
- My preferred v1.0: approx. $75,000
- High-quality version for large games: approx. $200,000
I can write-off about 50% of the cost as this is a project that I need and will use myself – and it’s a labour of love. I can also add a %age in expected additional sales that happen naturally after the campaign has ended (from the Asset Store, etc).
But Kickstarter takes a cut, and the government takes a cut, and Amazon takes a cut. In the end, I need a KS campaign to raise something like:
- Minimal funding: $5,000
- Preferred funding: $30,000
- High-quality funding: $75,000
Who are you, anyway?
In case you don’t know … I’ve run Technology/Development for a couple of game companies (e.g. Mindcandy, NCsoft Europe). My StackOverflow score is somewhere north of 20,000. I’ve contributed to a few open-source projects, but the one I’m most active on is the SVG rendering library for iOS and Mac, where I’m the project lead and one of the top 3 contributors.
I started writing about Entity Systems back in 2007, mostly because I was frustrated that so many game studios were “doing it wrong”.
What I’m doing now
I teach non-technical people how to program. I work with schools, teachers, and directly with children/adults. I invented a new system of programming using physical objects and toys.
Working with a local school, I’m making a new course where I’ll be teaching children “how to make games with Unity3D”. I’m particularly interested in what I can do to the Unity Editor to make it more user-friendly and better for use in the classroom.
Depending on how this goes, I have a few people in mind I’ll hire to share the burden of writing this library. It’s something I need both in my day-job and in all my personal game projects. Doing it as a Kickstarter gives me the excuse to spend 100x as much time and effort on it as I would otherwise, and gives me a much better library than I’d get on my own.
I suck at Marketing. The biggest risk factor to this project is that I fail to make enough noise, and hence there’s too little money coming in to pay for the ongoing development and support. As a result, dev gets sidelined while I pay the bills.
A Kickstarter is my way of testing “can I find a critical mass of people who need this project, and get them to put their money where their mouth is?”.
It’s going to be hard – I suck at marketing – but to be honest I’m leaning heavily on the idea that this is something people want badly enough they’ll help me market and promote it. With KS, there’s no risk to you for helping here … if the campaign fails, you pay nothing. If it succeeds, I get enough cash (and enough users!) to guarantee development through to a production-ready version.
Are you in?
Support me on Patreon, writing about Entity Systems and sharing tech demos and code examples
7 replies on “Kickstarting Entity Systems in Unity3d – What to include?”
Exciting! From my own perspective, having full-fledged editor support would be nice, but not critical – introspective capabilities are more important. I want to see entity composition and component values in the editor, as this tends to be the first systems I throw into my projects.
Source code access from $300 is still within the affordable range for some smaller indie/hobbyist devs. Mostly flying solo, $300 is on the higher end, but it’s in the same ballpark as what I expect to dish out for essential tools, jetbrains’ IDE:s etc. Even read-only access to source code would go a long way. Black boxes make me uneasy.
Serialization is pretty important, but I suppose initial versions could ship with an “inferior” or ad-hoc approach. At least in my artemis fork, implementing a proper de/serialization mechanism has been the single biggest time investment, after compile-time bytecode optimizations. Then again – prefabs/blueprints probably already cover a lot of common ground.
Summer is coming soon – I’m not sure if that affects success rates of KS campaigns (prob not for games, but tooling)? Feels like it might adversely affect the outcome, but it’s only a hunch.
If you want to mockup the kind of interface you’d like (even in MS Paint), I’d be interested to see what you’re thinking of.
You’re probably right about Summer – I went to a talk by one of the KS founders where they warned that a few holidays (especially December) tended to make it considerably harder to hit funding.
If you’re not good at marketing, you won’t succeed on Kickstarter. If you try to raise $XX,XXX on KS without an audience willing to pay you, you will fail.
Isn’t Unity already an ES or ECS?
How is your proposal different and what will it add/change?
What in Unity makes you think it’s an ES/ECS?
Unity indeed has entity-component-system architecture with problems being: it’s half-assed and it’s not much advertised as the next big revelation or software architecture. Neither has it clean, nicely named and minimalistic abstractions for it. The GameObject (agree or not) stands for entities. The Component (and its subclass MonoBehaviour) stands for components. There are unfortunately no base classes or interfaces for systems. Which can be made via systems being entites too (yes, yes, all those countless _Manager things). There is also barely any clean vision of querying entities that satisfy a certain combination of components. There is only the ugly Find( ). Before you write your own framework, you might want to study Wooga’s “Entitas” C# framework (which is also ported to Swift I think). It has a fairly clean (cleaner than Unity at least) architecture and naming, and also (at least so claimed) better performance. It’s also somewhat Unity-agnostic in the way that you can create render-less simulation by defining entities, components and systems and run it both on the front- and backend. With the only difference that the frontend “projects” the yet render-less simulation onto the scene hierarchy by creating game objects etc. They also have corresponding editor tools to support the advertised workflow. Wooga actually had a speech about it on Unite 2015 in Amsterdam the day before yesterday. Hopefully the video is posted on youtube the next days. The link: https://github.com/wooga/Entitas-CSharp
@Stephan – yep, I’ve been watching Entitas for a while. It’s got some nice coding, but it’s IMHO short of the ‘standard’ we see in normal Entity Systems. Too much proprietary stuff (e.g. relying upon a code generator – ouch).
Also, from a Unity perspective, IMHO it’s only a fraction of what could be achieved.