Live data from Hacker News

Game Programming Patterns – Bytecode

gameprogrammingpatterns.com

71–73 of 73 posts

Re: Game Programming Patterns – Bytecode

#71

Earlier quoted context omitted.

I wrote a chapter on that too! http://gameprogrammingpatterns.com/component.html

You might want to look at how people are approaching components now. Instead of components containing logic, components only contain data. You then have systems that operate on the components. This solves the problem of needing components to interact with each other, since a system can look at as many components as it wants. https://en.wikipedia.org/wiki/Entity_component_system http://t-machine.org/index.php/2007/11/…

Yeah, I'm aware of that approach too (all of those links are already gray for me!), but I wrote the chapter before that became as popular as it seems to be now.

I say seems to be because while ECS is clearly being talked about a lot, I'm not sure how many shipped games are actually architected around it. The blogosphere doesn't always accurately reflect reality.

I've looked at a few ECS implementations and many of the ones I saw had such bizarre implementations that they more than nullified the performance benefits of components.

I do see the advantage of systems that work on multiple components, but I think some proponents are starting to cargo cult this model. That happens frequently in games because you have so many amateurs that want to know the "best" way to do things, and the constraints are challenging.

Hmm, this ended up sounding overly negative which I didn't intend. I think ECS is interesting, but I'll be interested to see how it matures over time. Right now it feels a bit like the OOP fads of the 90s to me. There's good ideas in it, but any good idea can be taken too far.

Re: Game Programming Patterns – Bytecode

#72

Earlier quoted context omitted.

What is a good embeddable Forth for a game?

Not embeddable, from the start

Is this a viable suggestion, though? Correct me if I'm wrong but I imagine that developing the entirety of your video game in Forth for anything but desktop operating systems would mean writing your own tooling and API bindings, if not your own Forth compiler.

Re: Game Programming Patterns – Bytecode

#73

Earlier quoted context omitted.

Not embeddable, from the start

Is this a viable suggestion, though? Correct me if I'm wrong but I imagine that developing the entirety of your video game in Forth for anything but desktop operating systems would mean writing your own tooling and API bindings, if not your own Forth compiler.

It is pushing the the machine model to where it is most appropriate, on the iron. No different from choosing Javascript because it is cross platform, just someone has already done lots of the base work.

Forth has strengths and weaknesses, lack of wide use on modern platforms is definitely a weakness. There is still plenty of Win waiting in there.

Post reply on HN