« first day (1105 days earlier)      last day (4211 days later) » 

16:00
@Almo feel better?
user4704
It's just text substitution, it doesn't cause the compiler to "remember" that it has seen symbols elsewhere and use those.
hmm... I never really thought how source files worked so no wonder I got confused
user4704
At the crux, you probably have a scenario like this:
user4704
Two headers, both of which include eachother for some reason.
user4704
16:02
Each individual header looks fine, if you at them alone.
@JoshPetrie visual studio is good for this, if you try and create a circular reference it slaps you and doesnt let you do it
user4704
@RhysW No it doesn't. You can create circular includes in Visual Studio, and it's fine.
user4704
But if you include A.h (only) from some .cpp file, you get odd errors in B.h about how the base class (A) doesn't exist. Often this confuses people because they think include guards solve the problem, and B's header says "include A" so everything should be fine, right?
@JoshPetrie im talking c#,
if you try to make two things reference eachother, it doesnt allow it
user4704
@RhysW Well, we're not, so that's irrelevant.
16:05
jeez ok, i was only saying...
user4704
But including A causes B to be included before anything else, and B tries to include A (and aborts, since A's guard symbol was defined). The resulting TU begins with:
user4704
Which is clearly impossible to compile
Ah I see... that makes sense
user4704
IDEs don't feed compilers header files.
16:08
thanks for clearing things up for me
user4704
They feed them source files only; the preprocessor pulls in all the headers to create a TU which is compiled in isolation. (Generally, feeding header files to your compiler is a bad idea.)
user4704
@RhysW You can still, even in C#, create circular references between interfaces. You can't create circular references between assemblies, and that's not a feature that VS alone provides (it's a feature that is mandated by the CLI specification).
user4704
It is much easier for C# toolchains to handle because they are allowed to use a far more advanced and modern compilation model than C++ uses.
user4704
C++'s model (which is basically C's model) is from the dark ages.
I hate doing things in a circular way but that's the only way I see fit to have managees reference their owner manager to get necessary data
16:13
forward-declare A?
user4704
@MrPlow You could avoid that relationship altogether.
@JoshPetrie this is pretty much what i was trying to say, yeah
user4704
The existence of a thing called "manager" is often an indication of a half-solved problem.
so managers are bad?
user4704
And when something like that does need to exist to help maintain or control the lifetime of subordinate objects, generally the subordinate objects should not know about what manages them.
user4704
16:15
@MrPlow They are generally a sign of bad things.
@JoshPetrie So my Entity Manager in my ECS implementation is a bad thing?
@JoshPetrie in an ECS system i thought the whole point was that they used managers?
I figured as much, but I don't know how else to store entities and access them by ID.
user4704
@ShotgunNinja Maybe, without knowing more about it I can't say, but more often than not the answer is "yes, it's bad."
Well, it's a singleton.
There's one way.
user4704
16:16
@ShotgunNinja Even worse :(
user4704
@RhysW No, not at all. The whole point of a component-based entity system is to represent entities as aggregations of components.
user4704
Nothing about that means you need to have a "FooManager" for every FooComponent.
@JoshPetrie and then have one thing to manage each compoment isnt it?
user4704
No.
How else would you propose retrieving the components for an entity by its ID? I have entities as bags of components, stored within the entity manager.
16:17
how else could you organise all of the components without something to manage the components? e.g a manager for sound components?
Game system loop looks up entity from manager by ID, pass it to system, system checks components for match, then processes update.
user4704
(That doesn't mean you don't need something to control the lifetime of some types of components, but having the thing that does that be called "FooManager" often means you didn't think about the problem well enough because that responsibility can be taken on by other aspects of the higher-level API)
@JoshPetrie so in shotguns example, how else would he retrieve the enties by ID to find the components to update?
user4704
And even then, there's nothign about that relationship that requires a circular reference (back to the manager from the component)
@JoshPetrie My Manager simply contains Entities, and provides lookup and ID registration.
user4704
16:19
If nothing else, "manager" is just a shit name because it doesn't tell you what it actually does.
Well, I'm open to suggestions for a better name.
controller xD
Perhaps World?
The world contains Entities
you can certainly make it that way
user4704
If you have a thing that stores only the live entities (presupposing you store components themselves outside the entity object itself, which is what you should be doing), then all you have is a repository or database of entities.
16:20
Controller is another shit name, though...
world which encompasses entities and systems
@JoshPetrie ah i see your point, its not really managing its storing ID's something that could be done by a dictionary object higher in the API and closer to its useage
user4704
Both "manager" and "controller" names that imply verbs; specifically the ability to federate some verb across all the owned instances.
user4704
But all you are doing with this list-of-active-entities is storing exactly that.
@JoshPetrie I have my entities own their own Components. If this is wrong, how should I have them contained?
user4704
16:22
@ShotgunNinja Components should be owned and managed by the system that provides them.
user4704
For example, a physics system should provide the physics components and be responsible for their update.
user4704
This gives you better parallelism and better locality-of-reference.
I feel like I'm way out of my league here
What if components are used by multiple systems, ie. PositionComponent?
@MrPlow nah jump right in, i havent even made an ECS and im learning stuff from here xD
@ShotgunNinja its used by multiple but only provided by one system right?
user4704
16:24
@ShotgunNinja There's several options there; one is to not have position components.
user4704
One is to create a system specifically for providing them (generally you'd integrate this with the factory for that component).
@RhysW the thing is I've already made all of my code using managers so to change all this would take time which I have less and less of
user4704
@MrPlow Don't change everything, just stop making new ones.
user4704
And refactor the existing ones as you need to.
But if, say, the rendering system and the physics system both use the location of the entity...
16:25
@ShotgunNinja then they contact the position system to find out
user4704
@ShotgunNinja Do they?
user4704
Always?
user4704
Can you imagine a world where physics and rendering may have slightly different positions? This is the other option: you give each system its own position if it needs it.
@JoshPetrie Well, the rendering system only reads the position, it doesn't modify it.
user4704
Unless you have a visual effect on an entity that displaces it but doesn't modify it for collision or logic purposes.
user4704
16:27
(Logic should usually be based on physics, not render data).
user4704
So, for example, if you have a locally interpolated position for client prediction, versus an authoritative but delayed position from the server.
Oh, it's lunchtime. Can this wait until I get back?
@ShotgunNinja even more reason to have it contact the position system then right?
@JoshPetrie This isn't a client-server architecture; I'm making a local-only game.
user4704
@ShotgunNinja So? There's nothing you lose from duplicating the data except a few bytes of space.
16:28
@JoshPetrie How do I keep the render component's position in sync with the physics component's position?
user4704
I can still think of scenarios this would be useful localy, too, mostly having to with the visual effects
user4704
Some higher-level system (the game, usually), is responsible for providing a way to keep the two data sets in sync.
user4704
This could be as straightforward as foreach (object) { copy render position to physics position } in the main update loop
Yeah, I guess that works
user4704
Or as sophisticated as building a pseudo-shared memory architecture for your component objects, which allow them to act like they are distinct from the perspective of their owners while allowing the game to set some of them up to share memory
16:31
But then the game has to have specific knowledge of those two systems...
user4704
The game has specific knowledge of everything.
@JoshPetrie Doesn't that get into the God-Object issue?
user4704
It knows what it is, and it's main responsibility is to be the game-specific bridge between every other more general system.
user4704
No.
user4704
Your game already knows about rendering and physics.
16:31
@JoshPetrie but then if that executes every update cycle what's the point of having them separate in the first place? The only thing the other one does is copy the first. Unless you provide some separation mechanic but then they're out of sync
user4704
Unless you don't have either.
user4704
@MrPlow That's the most trivial example; a real-world example would exclude objects that need to keep the data distinct somehow.
I just can't seem to wrap my head around it, I'm still too green for things like that I guess
user4704
For example (this isn't ideal, but it is illustrative) if you wanted to keep rendering idle "breathing" animations while the logic is paused, you may mark all objects that would have idle animations in some fashion, and exclude those from the copy while the game is paused
I'm just uncomfortable with having my game do stuff with specific systems when I've tried to keep them as generic as possible, and put the selection of components for each system up to the system itself.
user4704
16:34
@ShotgunNinja But somewhere your game says "render all the things," no?
user4704
Somewhere that game creates the renderer.
@JoshPetrie Not yet, actually.
I have to get to lunch. I'll be back later.
user4704
The game is the highest-level object you have, and it's always going to have visibility on everything else.
I'll be back later. Explain it to me then, please.
@JoshPetrie could you perhaps recommend any books which touch upon this topic? I'd love to learn more but I seem to be missing quite a few things to grasp it as you are presenting it right now
user4704
16:36
There's even an argument to be made that duplicating the position data in this fashion decouples rendering and physics even more, because they could be used completely independently without having to rely on some third-party system to provide them position data (or whatever else).
user4704
@MrPlow Which topic specifically?
user4704
Component stuff? API design?
well both
user4704
There are no good books about component object design.
user4704
The "Little Manual of API Design" is a good read: ignorethecode.net/blog/2013/02/28/api_design
user4704
16:38
This post on outboard components is worth a look too: gamedev.net/topic/…
@JoshPetrie thanks for the links. Should help. Though I don't feel like refactoring the whole ECS, although when I get better at this stuff I'll probably remake it with components separate from entities and with fewer managers
16:55
Speaking of entity systems, I've been wanting to try the components-on-systems approach where the entity is just an id and nothing else.
It forces the systems to control what's exposed. So if you want access to an entity's position, you have to ask the physics system and it'll only give you what it wants to share.
With a system where entities are just filled with components that have data, all data is completely accessible from everywhere.
You'll find that "everywhere" is really just the systems, which need access to the data anyway
at least that's what I've found
Yeah, and that works fine when you're the sole developer. But if that's the case you could as well keep everything public.
An exaggeration I know. :P
I know I must have non-system code, but there's not actually a lot of it.
My Scenarios aren't systems, but they also need access to the components
I'm back~
Quick - someone write a book on ECS
user4704
I got asked to once.
user4704
17:06
Writing technical books is a losing proposition these days.
Why do you think so?
user4704
Because they become outdated very quickly.
user4704
And they rarely yield (for the author at least) a reasonable rate of return.
<3 Hello peeps tips hat
17:11
and it seems like that article advocates that systems don't match up perfectly with components.
61
Q: Role of systems in entity systems architecture

bio595I've been reading a lot about entity components and systems and have thought that the idea of an entity just being an ID is quite interesting. However I don't know how this completely works with the components aspect or the systems aspect. A component is just a data object managed by some relev...

no one-box?
weird
accidental period
17:19
It's Byte56's "key" analogy answer.
My code is essentially based on that design, borrowing some implementation details from the one that @MrPlow was working on yesterday.
Until I find some reason to explore a design where components are not stored in the entity, I will stick with what I have already.
Quick question: Generally, how much space do things take up (such as a List or an object) in C#?
@ShotgunNinja I should note that my design also doesn't necessarily match components to systems. It may be a 1:1 relationship, but it's often not
@Garan Space?
As in memory?
@William'MindWorX'Mariager Yes
Depends on the size. But I guess at least a few references and a few integers.
17:23
@JohnMcDonald Interesting. I'd like to take a look eventually and see how yours is structured.
I need to know what amount of certain type of object I could realistically instantiate
@ShotgunNinja yeah, it also doesn't have an entity container, but I guess you could say that my Dictionary<int, List<Component>> is pretty close
user4704
Outlook doesn't consider mailing lists I own under my "Member Of" contact tab :(
Out of curiosity, what language is your ECS written in, @JohnMcDonald?
17:25
@Garen, For an object, it depends on the type. class is ByRef which means there's a 4/8 byte reference and then whatever data is inside it. struct is ByVal which means it only takes the space it needs for the data.
@William'MindWorX'Mariager What exactly is the difference between the two? I only just started C#
Okay, mine is in Java...
@Garan Do you know C++?
@Garan How they're treated in memory. There are few differences you'll notice.
@Garan, But if you need lots of objects in a small space, you should use structs in an array. That's how I'm storing my tiles.
You should use what you find comfortable.
@ShotgunNinja Only from reading, never actually done anything with it. @William'MindWorX'Mariager Tiles?
What sort of game?
17:27
@Garan A 2D sandbox game of mine.
With tiles that had two bytes. One for background and one for foreground, I could have billions of tiles in memory if I needed.
byval stuff, such as primitives and structs, are fully copied into new memory for method calls. byref stuff is on the "heap" (essentially), and references to the same object are copied into new memory for method calls, while the object those references point to remains in the same spot.
@ShotgunNinja So are byval stuff essentially immutable in that way?
@Garan Not quite, but when they enter a new stack frame, a new copy is created, which is destroyed when the program exits that stack frame.
@Garan ByVal act just like basic types. So if you pass an integer to a function, changing the integer inside the function doesn't change it outside the function.
They are mutable within that stack frame.
17:30
Ok
That's what I meant
Then yes.
Immutable is the wrong term though
I'm not sure of the term for that.
byval? heh
Wouldn't that mean that byval stuff could only be modified by their own member methods?
Oook
That's an issue
But, they still only modify the copy if passed around. :)
ByVal couldn't even be modified by its own member methods, if you want the changes to persist outside of the function
if it's a value type
if it's a reference type, then "byval" means the reference is passed byval
Ok my first ECS version is finished, though now that I've had that convo with @JoshPetrie I think I've spent so much time on something so flawed and generally bad
I'm still sticking with my design; it may not be perfect, but it should be adequate for my purposes.
17:34
Often a basic inheritance approach is adequate. But ECSes are interesting to try.
Right now, learning a whole new design paradigm would undo what work I've put into the game so far.
17:51
Here's the github repo of my ECS if anyone's interested . Any feedback is very welcome. Atm there are no comments but a generic example can be found in main.cpp
Yeah, sometimess I regret the ECS
heh, for me, it has been one of the best moves I've made
I'm a fan of learning by problem discovery. so I'm not going to ECS until I run into pain with inheritance.
My biggest pain with ECS is trying to keep things logical
That being said, I have "Systems" already since stuff like resources, models, events, messages, etc need their own processing and storage
17:52
The blob was so easy ;)
@VaughanHilts F# has this DLR feature I wish C# would add as well, where myEntity?DynamicProperty resolves to myEntity.Resolve("DynamicProperty")
which I imagine makes Entity System code look a lot prettier
Entity sy stems are alrady pretty clean
entity.Get<TransformComponent>();
Syntax-wise, at least.
so what do you mean by logical
I never said logical?
Oh
Above
i.e: everything that can move is proccessed
Before, I had to have very tighly built trees
And do a lot of class casting
like is ISpatial
@Jimmy Couldn't you use dynamic for that?
Then you just implement a resolving function and you get neat looking code.
18:01
yeah but then your myEntity is now declared dynamic myEntity
the ? operator is more of a "resolve this call as dynamic, but don't throw away my type"
That's pretty cool.
or actually, not even dynamic, it's "resolve this call however I define the "?" function"
You still lose strong-typing, though.
18:02
I also like the syntax is different. Not a fan of dynamic since there's no way to know if you're looking at a dynamic member or an actual member from reading the code.
It's still a guess fest, I guess.
is it just me or is Byte's spaceship game a lot like this other flash game that was posted here a while back
Haven't seen said other flash game
It reminds me of a simple little thing I wrote once with Love2D
Jun 12 at 21:16, by Byte56
That's a fun little game: http://www.captainforever.com/captainforever.php
18:11
why isn't there a cloud version of visual studio yet?
Looks like he be cloning.
stupid c key only works half the time
@ClassicThunder Cloud version?
https://www.humblebundle.com/

Humble Origin Bundle:

-Dead Space [Origin + Steam]
-Burnout Paradise: The Ultimate Box [Origin + Steam]
-Crysis 2: Maximum Edition [Origin + Steam]
-Mirror's Edge [Origin + Steam]
-Dead Space 3 [Origin]
-Medal Of Honor [Origin + Steam]

Beat the average:

-Battlefield 3 [Origin]
-The Sims 3 + Starter Pack [Origin]
bf3 for $5 lol
@ClassicThunder doesn't M$ support c9.io on Azure?
18:14
Do you HAVE to use origin?
for the origin only games yes
I don't mind though, I already have bad company 2 on origin
Shittty.
BF3 = origin
And EA makes sims
So Origin
it says to the left of each game I mentioned whether or not it requires origin
Yeah, I see them
to the right*
18:17
@Classic also, at least they're rolling out more syntax highlighting: hanselman.com/blog/…
How is BF3?
well, fun, it's a Battlefield game
it doesn't have any sort of real competition in its own niche
No, Origin is not in fact bad enough not to pick the games up and you are talking out of your arse if you believe otherwise
^ I find this to be true.
Origin is pretty bad but not a bad price to fire up to luanch a game
18:23
Oh that's cool. All of the money goes to a tax writeoff for EA. Charity
@Noctrine lol
I wonder if Dead Space 2 will unlock next week
perhaps they might unlock Sims 2 as well
@AlexM. Is that @Blue? :P
it's a sort of Blue but a lot less cool
it's Totalbiscuit
I really shouldn't buy games tho :\
67% untouched
18:28
Hah
You think that's bad
Time to show Noctrine up.
gonna get a new gpu soon
My hour count is waay off too. The top 3 games I've all fallen asleep on
I'm gonna buy all games I can for as cheap as I can
18:29
Oh no wonder
My bro plays on my account, too
lol @ Alex's steam account net worth
Mine was around that but all my games are old now. I'm about 4 years behind in whats out.
lol 550 dollars
for some reason steam for ubuntu won't let me activate the keys
it's stuck at "scanning for game updates" when I click on the option
oh well, I'll just activate them on windows
perhaps the client is outdated or buggy
@AlexM. I love you for that comment
awww :*
18:36
HOW DOES IT KNOW MY NAME
didn't you paste in your steam profile?
how do you have bastion, braid, and terraria and never played any of them?
there is something wrong with you people :p
Never played bastion
own it
I have terraria, but I have 234 hours in it
Mostly because I accidentally left it open for a week and a half
18:44
lol I have 300+ ligit hours in terraria
I probably have around 20-30 legit hours of it
yello
@VaughanHilts its good
Too bad it isn't able to count how many hours of Morrowind I've played from a disk
That would legit be over 500
I set up a server and me and my sisters played on it. bought them both the game when it was on sale at 2.50
In the steam summer sale two years ago?
Yep
18:49
@ClassicThunder Got it in the humble bundle, played DRM free
guess who is back at work again :(
oops, wrong chat client
i got Lunar Flight in a Steam Sale
It appears I don't have the patience for detailed flight sims anymore :(
I used to play submarine sims
and helicopters and jets
@VaughanHilts HOLY crap mine is much higher than i thought it would be xD
I used to play SimCopter!
18:51
@Almo so you find LoL Tribunal a funner game than Lunar Flight.
1218 dollars of games.
@William'MindWorX'Mariager i just about top that
It's a shame they don't calculate how much you actually spent
$1385.29
haha I have a managerial streak in me
18:52
Only the price of the game at the time you check
so I like swinging the banhammer, even if it's only one finger on it among many.
steamdb.info/calculator/… Also feel free to add me
Air traffic control sim: youtube.com/watch?v=WxlfVXupmwA
played that a lot
18:53
almost 300 hours of Mount and Blade....
that vid shows an easy level though
it was really hard in New York.
so many poeple at around 1k dollars xD
Actually, how moddable is Mount and Blade: Warband?
18:53
@ClassicThunder \o/ Someone has more hours than me!
Because it would be awesome if you could play that in a CKII map
(excluding the 500 hours of DoD pre-steam, 400 hours of BF3, and countless hours playing M&B and OpenTTD pre-steam)
Actually, looking at my data some of the playing times are incorrect
lol I was playing 20 or so hours of starcraft a week when I was in masters and I did that for months
hey guys
18:56
adding sc2 + minecraft would prolly triple that :/
Anyway, does anyone know a way to do initialization AFTER content loading in XNA?
@ClassicThunder heh, yeah
Because apparently Texture2D's are byval
Huh>
Classes are passed byref by default
= by ref
classes are references passed byVal >:(
18:58
i just had the most crazy idea how to make a dirt cheap waterfall
So.. pointers.
lol
yes
Fancy, fancy pointers.
Man
Hush you C++ programmers
@Jimmy I posted by reference on SO once.. I got downvoted to -10
All beause of that minor difference >_<
18:59
hah
ic
perhaps because that explanation works for 90% of the time then someone asks "but what happens when I pass a class byRef if it is already byRef"

« first day (1105 days earlier)      last day (4211 days later) »