Live data from Hacker News

Invisible Bunnies That Power World of Warcraft (2017)

kotaku.com

61–70 of 104 posts

Re: Invisible Bunnies That Power World of Warcraft (2017)

#61
post #10

I think the prevalence of these sorts of issues is why ECS is such an appealing architecture in game design. OOP seems to always devolve. A new feature is needed for the game, the feature breaks some well established design rule, it's challenging/slow to refactor everything to make sense while considering the new feature, and so a kludge is implemented where existing objects are forced to be more flexible than planne…

I had to look that up. From Wikipedia: Entity component system (ECS) is a software architectural pattern mostly used in video game development for the representation of game world objects. An ECS comprises entities composed from components of data, with systems which operate on entities' components. ECS follows the principle of composition over inheritance, meaning that every entity is defined not by a type hierarchy…

I asked ChatGPT 4 for an explanation and came up with this analogy,

Imagine all in-game characters have their data in a database. The database might have one or more tables representing an objects ID or another reference, its position, its health points, and image data representing how to draw the object. These three things are "components" and the IDs and references are "entities."

A system is anything that manipulates one of these components. Thus, a function that manipulates a component is a system.

Re: Invisible Bunnies That Power World of Warcraft (2017)

#62

I think the prevalence of these sorts of issues is why ECS is such an appealing architecture in game design. OOP seems to always devolve. A new feature is needed for the game, the feature breaks some well established design rule, it's challenging/slow to refactor everything to make sense while considering the new feature, and so a kludge is implemented where existing objects are forced to be more flexible than planne…

Another recent example is from Starfield, where shops inventories are handled by a physical chest hidden underneath the shop. You can use noclip to loot the chest and get shop items for free.

(Off topic to ECS) This description is kind of funny to me. If you’re using noclip, who cares about how much things cost? You’re already cheating.

Re: Invisible Bunnies That Power World of Warcraft (2017)

#63
post #34

Earlier quoted context omitted.

ECS makes sense in games because OOP enforces lots of rules downstream in your inheritors, which is good for GUIs, but bad for games when producers keep asking for that one npc or boss to do something special that breaks the rules. ECS is just so much more flexible which is good for some design systems and bad for others.

E.g. react does just fine with functional components; I'd say it does much better than with the old class-based ones. Inheritance works well enough in exception classes, e.g. I can catch OSError and specifically handle FileNotFoundError differently on a language level, but it's nothing composition couldn't handle, either.

I disagree re: React.

To me, class-based has one advantage over functional. A component is an object and therefore perhaps ought to be represented by a class.

That being said, functional maybe is a bit simpler.

Re: Invisible Bunnies That Power World of Warcraft (2017)

#64
post #10

Earlier quoted context omitted.

I had to look that up. From Wikipedia: Entity component system (ECS) is a software architectural pattern mostly used in video game development for the representation of game world objects. An ECS comprises entities composed from components of data, with systems which operate on entities' components. ECS follows the principle of composition over inheritance, meaning that every entity is defined not by a type hierarchy…

For what it's worth, I'm not aware of anyone who believes inheritance "ontologies" was a good idea, nowadays. Interfaces sure, but composition is just better for this reason. ECS is a formalization of that, and probably even perpetuated the idea, but it's everywhere I look now.

> I'm not aware of anyone who believes inheritance "ontologies" was a good idea, nowadays.

like, all of anything you could program, ever? for any purpose?

Re: Invisible Bunnies That Power World of Warcraft (2017)

#65
post #10

Earlier quoted context omitted.

I had to look that up. From Wikipedia: Entity component system (ECS) is a software architectural pattern mostly used in video game development for the representation of game world objects. An ECS comprises entities composed from components of data, with systems which operate on entities' components. ECS follows the principle of composition over inheritance, meaning that every entity is defined not by a type hierarchy…

For what it's worth, I'm not aware of anyone who believes inheritance "ontologies" was a good idea, nowadays. Interfaces sure, but composition is just better for this reason. ECS is a formalization of that, and probably even perpetuated the idea, but it's everywhere I look now.

Inheritance works for essential things and composition for accidental things. Use both together to get the full Aristotelian deal.

Re: Invisible Bunnies That Power World of Warcraft (2017)

#66
post #54

Earlier quoted context omitted.

You seem to have deep fundamental misunderstandings about ECS systems. You can absolutely access multiple components in a system, for some reason you think a component and a system must have a one to one relationship, when really it’s many to many. The only caveat is that you have to think carefully about the order that some of your systems are executing in the game loop, since you want to make sure component data ha…

> ECS is really the best way to make games. A little bit of nuance would go a long way. Even in games where ECS is a good match, having to implement a boss with ECS is wasteful in terms of dev time and performance: You have to create components and matching systems unique to the boss, where with a traditional approach you just have to create a single Boss class.

I suppose it depends on how the ECS is coded.

You could create a database table called "Boss," that contains all the Boss components. Then for each system, you create a function that operates on a Boss.

Re: Invisible Bunnies That Power World of Warcraft (2017)

#67
post #10

Earlier quoted context omitted.

I had to look that up. From Wikipedia: Entity component system (ECS) is a software architectural pattern mostly used in video game development for the representation of game world objects. An ECS comprises entities composed from components of data, with systems which operate on entities' components. ECS follows the principle of composition over inheritance, meaning that every entity is defined not by a type hierarchy…

For what it's worth, I'm not aware of anyone who believes inheritance "ontologies" was a good idea, nowadays. Interfaces sure, but composition is just better for this reason. ECS is a formalization of that, and probably even perpetuated the idea, but it's everywhere I look now.

Except of course for all the ontologies in your language's standard library that you don't even notice. Your IO hierarchy, exception hierarchy, your collections hierarchy.

As long as you don't kingdom of nouns everything any repeat the mantra: "classes are just interfaces with code reuse" you'll be fine.

Re: Invisible Bunnies That Power World of Warcraft (2017)

#68
post #34

Earlier quoted context omitted.

E.g. react does just fine with functional components; I'd say it does much better than with the old class-based ones. Inheritance works well enough in exception classes, e.g. I can catch OSError and specifically handle FileNotFoundError differently on a language level, but it's nothing composition couldn't handle, either.

I disagree re: React. To me, class-based has one advantage over functional. A component is an object and therefore perhaps ought to be represented by a class. That being said, functional maybe is a bit simpler.

> A component is an object and therefore perhaps ought to be represented by a class.

That's what those who ditch inheritance altogether when designing languages challenge and it turns out not much of value is lost :) 'Component is an object' is something you'd hear from an OOP practitioner which isn't exactly convincing to people thinking functionally.

Re: Invisible Bunnies That Power World of Warcraft (2017)

#69

I think the prevalence of these sorts of issues is why ECS is such an appealing architecture in game design. OOP seems to always devolve. A new feature is needed for the game, the feature breaks some well established design rule, it's challenging/slow to refactor everything to make sense while considering the new feature, and so a kludge is implemented where existing objects are forced to be more flexible than planne…

[deleted]

Re: Invisible Bunnies That Power World of Warcraft (2017)

#70
post #36

The only thing that bugs me about this is that they used bunnies rather than making a specific "spell effect/scripting" NPC. (I mean just one type to be used everywhere rather than bunnies, not a new one for each use.) It's common enough of a pattern in other games, and the #1 bug is that someone forgets to click the "invincible" checkbox somewhere, your scripting 'bunny' dies, and then the game just breaks. If you c…

I recall a story where the camera kept "dying" from explosions but I can't find it.

Under "Camera obscura" here: https://www.gamedeveloper.com/design/more-dirty-coding-trick...
Post reply on HN