gabereiser
gabereiser on Hacker News
Unity is just the loudest, they certainly aren’t the first and they definitely didn’t invent the paradigm. ECS/ECBS is a pretty common construct.
This wiki is the Bible for ECS/ECBS systems: http://entity-systems.wikidot.com/
To echo others, it’s against policy. Not that we don’t care (we do) but that it’s better covered (and serviced) elsewhere, this isn’t the forum for those kinds of discussions.
ECS is different. Systems coordinate entities, entities have components, some of them can be behaviors, some of them are not (vertex data). You would need to provide something that a component can inherit to derive that it’s a behavior. Unity does this by calling it a MonoBehavior (not Mono as in singular, mono as in Mono runtime, the name stuck).
Having an ECBS system: one could model all the permutations as described while keeping code concise, shareable, and non-repeatable. Unity is really an ECBS.
Inheritance vs non is as old as OOP vs functional. Each has their place, each has their pros and cons. Having functional components and behavior traits attached to object inheritance based entity nodes is probably the best of all composition. Entities can get more and more complex with inheritance chains (further classifying what components can be attached), components can include behaviors, data, events/triggers, sub-components. Behaviors (triggering events or waiting for) is where your game logic would mostly reside.
Yes. I can confirm it’s regardless of SKU
I'm sure the author would accept pull requests if you've got the time to show ValWithPtr safety.
Often what is “approved” and “delivered” conflict. In this case, they approved a part, a genuine part, but got a fake part, unbeknownst to them at the time.
One could say the fake part was not “approved”.
At least he offered a salary. I once was offered only equity in a non-formed dream corporation with the promise that "once we have a product"...
I stand with the equal human rights crowd. Chik-fil-a is not one of us. Their stance on LGBTQ+ folks is clear. I’m not LGBTQ but I believe we all should be allowed to live the lives we choose so long as we don’t harm others or break the law (which normally are designed to protect others).
I do love their chicken though.
It’s not invalid because a string is a string. You didn’t invent a new type.
I mean, if(len(O) == 32) technically is a validation but you’re right, by default it just fits for size.
>”Learning assembly language is basically useless at this point.”
I whole heartedly disagree. There’s an entire class of performance tuning you can do to math intensive applications that absolutely require knowledge of assembly to squeeze that last 0.5% out of the machine.
Video Games, Video Editing, Image Editing, Simulations, Scientific applications, all benefit from having some assembly sprinkled into their algorithms for speed.
Because of this, I don’t need crates or packages to do things for me, I’m capable of doing it on my own. I’m capable of building a 64kb demo scene executable. I’m capable of building a hardware accelerated video decoder. I’m capable of parallel vector operations because I can haz assembly. I can disassemble and reassemble binaries, libraries, files, stacks. I can even inject my own code.
If you have no need for speed and efficiency, then I’m sure a browser-based desktop app with some JavaScript will be fine for your use case.
alias and type redefinitions are conceptually the same. int and int_t are conceptually the same. I’m going to assume it’s my type, as defined in the signature of my method you’re calling. If you don’t adhere to the contract then the onus is on you. I’ll check existence, I’ll check conformity, but I won’t check that your string = my string.
This is the way. Look not at the characters but at the hex.
Stored in binary format, validation, more efficient due to non-cast, faster access due to non char*, being able to split the high-low, indexing and uniqueness at the byte level.
Both of which were developed more than 20 years ago. I also think they knew the ask since they made games prior. I can see how words are confusing and math is hard.
There in lies the problem. With shifting priorities and shifting strategies I don’t see them actually knowing what their market is.
We all know the Vorbis is supreme. Get out of here with your 15 year old DRM compression riddled subpar listening formats. OGG is all that matters. Without it… we wouldn’t have Spotify. <leaves before shoe is thrown>.
Yeah and Ultima Online was the same. I’m not talking about 1999’s definition of an MMO, when people were still using dialup.
Except in Minecraft, the world is voxel so to sync destructible terrain I only need to send the x,y,z of the block removed.
Going by my logic, there are MOG’s and there are MMOs. Guild Wars 2, World of Warcraft, EverQuest 2, games where thousands of people can be on screen at once, where that server instance is synchronized with the rest of the cluster, for one seamless virtual experience. I’d say half of the self-proclaimed mmos ever really reach massively-multiplayer status. Games like Dota 2 and CS2 are played by millions but I wouldn’t say it’s an MMO because each match it’s 5v5.
Realm vs Realm or World vs World mechanics explain my perspective perfectly.
While I commend his efforts, it’s not even remotely MMO. A few thousand can be handled by one server. One beefy server, but one server nonetheless.
I’m talking about 10,000+ players. Where you need clusters of servers and synchronization techniques.
There have been some small multiplayer games that have tried to pass as mmo’s but without the player base in the 10k+ range, you never encounter certain classes of engineering problems.
In this example, *cptr is a color by contract. A Color is a type alias of a string. *cptr is a string. Interfaces match.
It is enforced by the compiler, what it doesn't do is guarantee it at runtime. I agree with you on the enums. Go doesn't have a reliable enum construct. But the argument that I, the library author, must validate and check against any possible type of "color" you, the program author, can come up with is just crazy talk. I'll provide a Color type, I'll even pre-define some colors for you, but if you send me a Color that's rainbow, I'll panic.
‘type Color string’ is just a type alias for string.
Likewise GLint is just a type alias for int. There are only value types (str, int, float, etc), everything else is a construct. The only true types are those value types (and pointers to them). If you call a type a Color and I call a type a Color, you are using my lib to build a program (not me using yours), you must adhere to my contract of what a Color type is to my API. Period. You can not call a function with an unknown type and expect it to behave properly.
If it panics, it’s your fault.
On the backend, you aren’t limited to sub 16ms frame rates and can use languages that provide more productivity vs performance. I have infinite cloud compute, but you only have 4ghz and 16gb ram. I’ll send you highly optimized c++ and use ruby as my cloud language, it doesn’t matter.
You’ll frequently find Java, C#, Go, and Python as backend rpc/tcp game servers.
Oh I feel for the author. I’ve made games. I’ve made distributed web platforms. I have profound respect for modern mmo architectures because of one, nasty, “I wish this wasn’t a thing” class of data. State. Who, where, what animation, what modeled entity, is in my party, on my screen, under my axe. Synchronized playback of my swing to my party members so we all yell in excitement at the same time when the boss falls. This level of synchronization across shards (server clusters of servers) is enormously complex. Not to mention just writing “net code” in general. Network speed is the biggest issue and often TCP isn’t enough. You need network prediction. Where will they be based on position, direction, etc until I receive the next packet. I can then error check the prediction with the actual and correct. If UDP is available to you, you use it so you can deliver that state as fast as possible, with no ACK back and forth. A combination of UDP state transfer peer2peer for animation and basic state, TCP network connections for services and server state, REST for that auction house. SQS or pub/sub for that item delivery and party/match making/world chat. It’s a beast of a problem.
Rewind 15-20 years ago and all the folks who wanted to make a game, their first game, and they want to build an mmo. None of them succeeded. Not 1. The only ones since were from people who knew the ask. Or had a crowdfunded ponzi scheme.
This is where battery and storage comes into play. We aren’t limited to harnessing power the moment we need it, we can store it for later.
Potential and realized are different things. I could potentially run at light speed…
“My truck is so badass you can feel the ground shaking.”Such a Texas thing to say.
I had my fair share of wind turbines on my sailboat. Nothing this guy is taking about is 1) new. 2) novel. 3) revolutionary.
What he’s trying to do is white-wash and “patriot”ize a simple existing technology. Only with half a brain cell so he thinks he’s solving the worlds energy crisis.
Wind turbines are loud. The faster they spin, the louder. The faster they spin the more potential for hazardous blade separation. I once sliced right through a dinghy with one. Imagine if that was little Melody with her stuffed animal.
The future of energy is not physical force pushing propellers to drive alternators, it’s capturing (and harnessing) the power of the sun. Solar panels provide 2-3x the output, none of the physical dangers, and are quieter than an ants whisper.
It’s actually not and is one of those Java isms that have made its way into generalized software engineering.
If I write a function that takes Foo as an argument. I have a Foo implementation exposed elsewhere in my program. It is absolutely expected that I mean MY Foo, not your Foo. If you pass me your Foo, you will get unexpected results that are not a bug, not a side effect, not my responsibility. It’s yours, the caller, to adhere to the contract.
There are valid reasons to not adhere. To pass your own implementation. At that point, you are responsible for its use. Not me. If it adheres to MY Foo’s interface, you might get by, but it’s is not my responsibility to validate all permutations of unknown types to ensure you’re passing me mine. In go, it’s perfectly valid to return structs but accept interfaces as arguments so that you, the program author calling my api, can craft the correct program flow.
So please, leave that runtime type check reflection for Java and C# and the land of JS. We have no need for it here in machine code land.
Find starting point in dungeon. A* to every room. Rooms with a large distance (iter count) and with only one or two paths out (choke points, use graph to see edges) become potentials, every potential that is _far & narrow_ is flagged “enclave” with rewards increasing by distance to start.
This is one way to approach the problem. The other way is to do prefab rooms and when generating your dungeons, randomly select one or two prefab enclave rooms to throw into the shuffle. Shuffle the rooms and spread them out then connect hallways and such. This is the approach that Enter the Gungeon took.
Another approach is what @otikik describes. Tracing the walls buy assigning a value to the cells that can then be scored. Minesweeper style.