4 ms·
Flash was my 2nd programming language (after VB6) back when it was still Macromedia. I had a lot of fun making really crappy minigames and learning the basics o
by dontwearitout 4y ago
Flash was my 2nd programming language (after VB6) back when it was still Macromedia. I had a lot of fun making really crappy minigames and learning the basics of coding. This article brought some good nostalgia and plenty of astonishment at the lengths you went to.
Your writing itself is great. A lot of writing linked by HN seems too verbose because people try to sound smart. Yours is succinct while engaging. Right length, just technical enough, and interesting. I really enjoyed this, thanks for writing it!
Also:
> Object-orientation is not fashionable right now in gamedev circles
Can you elaborate on this?
- BlueTemplar 4y agoProbably how OO teachers and mentors failed horribly (AFAIK we still don't warn new students about the pitfalls of inheritance ?), so ECS got popular as a better alternative to shitty OOP code ? https://www.gamedev.net/blogs/entry/2265481-oop-is-dead-long-live-oop/ https://www.gamedev.net/blogs/entry/2265481-oop-is-dead-long...
- stelonix 4y agoNot only that, but due to CPU caches and memory alignment issues, ECS have better performance than inheritance; also because most ECS systems ditch virtual function calls.
- cogman10 4y ago> ECS have better performance than inheritance Can have. Whether or not an ECS will actually be faster depends entirely on the type of game and access patterns of the inheritance structure. Further, it matters how you are doing inheritance (LTO can eliminate a lot of the pitfalls even if you use virtual function calls). This is nothing against ECS. I just find the current claims of performance dubious and potentially flat out wrong given modern compiler optimizations and changes in CPU caches (mainly that they got a LOT bigger).
- stelonix 4y agoI believe claims of "compilers getting faster/bigger enough" are the exact reason we have ECS now. It surely depends of the kind of game, but games with any kind of entity which isn't unique should feel the performance improvements. Ideally, compilers should be able to transform classes into ECS layout when generating code. Shouldn't be hard to have a pass before compilation, if we use clang.
- japhib 4y agoObject-orientation is kind of the old-school way of doing things, these days it's all about ECS - entity component system. This is a more data-oriented approach that has the potential for much higher performance when you have thousands of objects that need updating in your game. It's similar to how OO languages like Java/C# are going out of style and more (nominally, at least) data-oriented languages such as Go or Rust are in style.
- pjmlp 4y agoUnity isn't going anywhere, and programming to interfaces is just as doable in Java and C#.
- whostolemyhat 4y agoUnity's been working on an ECS option for a while now
- pjmlp 4y agoWritten in C#.
- lewispollard 4y agoYeah, "OO is going out of fashion" is a common phrase in gamedev, but what's actually meant is "deep class hierarchies defining the behaviour of game objects is going out of fashion". Most ECS code is still written in OO languages and makes heavy use of OO features.
- throwaway2037 4y agoIs ECS similar to Data Oriented Programming? I watched this talk years ago: CppCon 2014: Mike Acton "Data-Oriented Design and C++" I was very impressed by the ideas presented. Java/C# can be used to write a program with "just a bunch of structs + static methods". Isn't that data-oriented enough? Ya, I know we can do 72 levels of inheritance also... for ignore that for a moment.