Conversation started Aug 14, 2013 at 22:08.
user4704
Aug 14, 2013 22:08
@MrPlow One day you may run in to trouble with older, cruddy tools that don't like spaces in paths.
@MrPlow i got caught up in a discussion, ill have a deeper look now :)
@JoshPetrie where?
user4704
"My Entity Component System"
user4704
You have some trivial stylistic inconsistencies (mainly, so far, in whether or not you space within template brackets).
oh... yeah... my naming is lousy
Aug 14, 2013 22:09
ok guys serious question here
@MrPlow i still find it understandable, more so now that those ones have full names
user4704
Personally, I'd put the private methods of a interface at the bottom, so a reader sees the public stuff first.
my world is so big i have to use doubles for the coords
but unity only accepts floats
so how do i translate
@Wardy slice it up and have them as different 'areas'?
user4704
You may also want to consider including system headers last, as a convention, to help improve idempotency of your headers.
Aug 14, 2013 22:10
my world is endless
i dont have "zones"
im trying to figure out if i can offset a camera coord with a given world coord
user4704
You can (and should) still chunk it up.
it can still be endless and be chunked
@JoshPetrie Oh.. I thought that system headers should go first. I see
yeh its still bsp managed
user4704
@MrPlow Okay, my first real suggestion for you is to investigate the copy-swap idiom.
user4704
Aug 14, 2013 22:13
Particularly with regard to implementing your operator= overloads.
@JoshPetrie oh.. will do
still cant quite get under 20 on that game vaughn linked
@JoshPetrie though what should I use it for? I'm not passing around my custom objects, instead I'm using smart pointers which have their own move / copy stuff already implemented. The only thing I've created a rvalue move constructor / assignment operator for is the ComponentExtractor class since that ain't being passed as rvalue by default in VS2012 (no rvalue "3.0" implementation in VS2012)
or am I misunderstanding something
@RhysW the lowest I got was 23
@MrPlow i need sleep, but i also need to beat my personal best xD
user4704
@MrPlow Well you have at least one operator=, so you should use it there.
user4704
Aug 14, 2013 22:22
Be careful; don't just throw everything into a smart pointer and assume that will handle all your lifetime issues for you. That's a trap.
hey-oh
@hasherr hey sharky :D
Just got back from the scoolz
ready to write all the codez
@hasherr woop, i have a question for you actually
I have to learn visual basic at school. Not sure if that's a good thing or bad thing.
Go on.
Aug 14, 2013 22:24
your game is about sharks and otters right? so whats with the whale 0.o
user4704
@hasherr Knowing more languages is always a good thing. Gives you perspective.
Sharks and seals, Rhys.
The whale is just a temporary sprite
I didn't want to make a very graphic seal.
@hasherr i was close :(
So I threw something together.
@JoshPetrie Okay.
ah ok, just curious is all :)
@hasherr just be glad youre at a school willing to accept programming should be taught
Aug 14, 2013 22:25
@JoshPetrie 1) "Well you have at least one operator=, so you should use it there." - By that you mean that I have at least one explicitly defined operator= overload or that I'm using more assignment operators for which I haven't made move / copy constructors / operator overloads?
Some of the guys wanted to name the whale, but I told them we shouldn't get too attached because he won't be here for very long.
user4704
@MrPlow The first.
@RhysW Yeah, I'm really really lucky that my school has 1 Algebra teacher who minored in CS in college.
user4704
Maybe the second, I stopped there.
Lulz
Aug 14, 2013 22:26
@hasherr Sebastian, i named him sebastian :D
NO.
WE'RE NOT NAMING HIM.
@hasherr you are, i got taught word for 7 years straight, thats it
@hasherr :O sebastian can hear you! youll hurt his feelings
@RhysW We have a class at school called 'Computer Apps.' They really need to renmae it to 'How to use Microsoft Office 101'
2) "Be careful; don't just throw everything into a smart pointer and assume that will handle all your lifetime issues for you. That's a trap." - If you're talking about my overuse of shared_ptr then I conceed. I'm thinking up a design which would cut down my shared_ptr dependency and allow me to use unique_ptrs
HE'S NOT REAL
Aug 14, 2013 22:28
@hasherr sebastian should atleast be a hidden easter egg an unlockable character!
school ? wtf
long time ago
@RhysW That's a very good idea.
user4704
@MrPlow I'm not saying there's anything wrong with how you've used it now, I haven't analyzed it in detail.
But we aren't naming him.
user4704
But there can be.
Aug 14, 2013 22:28
Yet.
@Wardy shh wardy, you are showing your greys! :P
@hasherr so we arent naming sebastian?
@RhysW im not that old u cheeky git
His name isn't sebastian!
user4704
You can potentially get, if not less deterministic, less obvious destruction behavior if you go overboard with shared_ptr use.
He doesn't have a name!
He's an IDEA! HE DOESN'T REALLY EXIST
Aug 14, 2013 22:29
@Wardy im just pulling your leg! but im being careful, i dont want to put you in a wheelchair
lol
@hasherr sebastian most definately has a name, its sebastian :P
How about this, Rhys.
user4704
If you have, for example, a system that holds an authoritative reference to every object, such that it both creates and destroys all those objects, consider simply returning raw pointers.
If you make me a kick-ass whale sprite, I'll name him Sebastian.
user4704
Aug 14, 2013 22:30
You may not need the overhead of a shared_ptr in that case, potentially.
@hasherr sold!
@JoshPetrie 1) I implemented my operator= overload and rvalue move constructor according to this. Or were you saying that I only made an rvalue assignment operator and move constructor and that I'm lacking the lvalue ones?
Dammit!
user4704
@MrPlow I'm saying copy-swap is better than how that page suggests.
user4704
And it's a useful idiom, so you should learn about it.
 
Conversation ended Aug 14, 2013 at 22:31.