« first day (2399 days earlier)      last day (2915 days later) » 

00:00
My sons bedtime is in 30 minutes
Lol
 
5 hours later…
04:34
1
Q: unity 5.x performance

Nickafter I downloaded unity 5, it became very consuming, my pc becomes hotter and makes a lot of noise. also building, compiling, baking of game takes a lot of time, I am making multiplayer game and need to build game almost on every change, but it takes hours or sometimes it doesn't even build a ga...

 
12 hours later…
user92578
yeah
ahaha
I don't remember having seen the chat quiet for that much time!
No chat Tuesdays
I don't recall ever seeing "12 hours later..."
16:39
Nor 17, if we count the FIP out.. :P
oh shit you're right
16:53
Today smells like summer!
Hot girl posted on Instagram that she beat the new Zelda in 40 - 50 hours
Decent.
Hot girl plays through Zelda in 2 days. Marriage material right there man.
17:19
HOLY FUCK
UNITY BOUGHT TEXT MESH PRO. IT IS NOW FREE.
8
Not sure what that is, but it sounds useful!
It is what @PearsonArtPhoto just paid 100$ for.
Star that shit man. People here are gonna wanna know this shit.
can some1 help me with mysql need a query to generate 100-200 new rows name password can be same the only thing is important is playRegion randomaly 1-5
17:34
@yahoo5000 you can look that up on google pretty easily/quickly
keyword ?
how to generate new rows using a query?
Not really surprised they bought TMP.
I only spent $60 for it, I think.
@PearsonArtPhoto kinda sucks for you though. you just bought it not too long ago, no?
Yeah, especially as I didn't really need it yet. Oh well...
17:36
Ouch. Well, you should be able to make that back quickly, right? :P
Hopefully.
One good thing is, I understand TMP, so...
@dcfyj would that work ?
Truth be told, I used money I essentially got for free to buy it, so...
INSERT INTO user_acc(username, password,playRegion, firsttimelogin) VALUES ([test],[test],[1-5],[1])
On the plus side, it wasn't more expensive than $60 ^^
@yahoo5000 um, if you're using [1-5] as a random generator, I think you'll be disapointed.
17:38
live very disapointed ?
@yahoo5000 this might come in handy. Although a little google work is all that was needed to find it
@yahoo5000 the easiest way to call a query inserting a single row 100-200 times
yea i am doing it now
or a single query could do...
DECLARE x INT;
SET x = 1;

WHILE x < 200 DO
INSERT INTO `user_acc`(`username`, `password`,`playRegion`, `firsttimelogin`) VALUES ([test],[test],[RAND() * (6)+1],[1])
SET x = x+1;
END WHILE;
what about this ?
i also got syntax error on line 1
17:54
gamedev.stackexchange.com/a/138026/10408 <- Enjoy this physics simulation!
DELIMITER //
DECLARE x INT DEFAULT 0;
 SET x = 1;

 WHILE x  < 200 DO
INSERT INTO `user_acc`(`username`, `password`,`playRegion`, `firsttimelogin`) VALUES ([test],[test],[RAND() * (6)+1],[1])
SET x = x +1;
 END WHILE;
DELIMITER ;
not working no error nothing but he doest do anything
18:40
MSSQL D:
mysql :P
Huh? Never seen the [] notation in MySQL
i remove them but still there is
i got them by default
Never had to work with loops in MySQL, sorry
looks scary
Sounds like you're doing something the wrong way
18:57
hmm i was askign this question on stackoverflow , havent got any good answer yet onde dude said should using mysqlslap because the current code is not supported or something
loops on data are not how to use SQL
you're using the wrong tool
how should i do ?
you would generate your random data somewhere else then use an SQL query to enter the data into the db
don't do the logic in SQL
SQL is notoriously difficult to debug.
18:59
i could do that in c++ but was hoping easy way
doing logic in SQL is not "easy way"
it would be kind of like using C++ to make a website
wrong tool
I'd create a python script that generates the SQL queries, output that in a file and run that file..
yea but as far as i know i can use c++ to make website :D
oh cool, free text mesh pro
I guess they will fix it now so that it actually works, ffs
You can, but that's not the point.
19:02
yea i am trying to run shell on mysql and then use mysqlslap but all passwords wrong
@yahoo5000 You can also make games in php
yea some people are doing it :D
Or anything in Java, but you really don't want to
@yahoo5000 you can. but it would be really stupid to do it that way.
yea did knew that was hoping would be faster then write in c++ but the time i spend already coudl right it many times so far
19:08
@jgallant It has this huge downside with Unity UI that it breaks the UI instancing, our UI takes more than half of our drawcall budget in our mobile game
instancing, or batching
@Lasse Tried to split up UI to different canvas?
The text has to be separated to it's own tree of objects so it can batch properly
Never used it.. Does it break all canvas?
it's horrible manual job / spaghetti code if done by code
it has to change material in between drawing the UI elements and the text, so yes
Whaaat
19:10
@yahoo5000 mySQL is still the wrong tool to use.
mySQL stores data, and retreives it.
it should not be used for more than that.
it's possible to do so. But that's like emptying your bathtub with a spoon instead of just pulling out the plug.
@Almo I agree'); DROP TABLES;
I should note that "just" storing data and retreiving it is immensely complicated, when considering that multiple processes can be accessing the same data for read and/or write at the same time.
ok fuck mysql doing in c++
and it took 5minutes
19:28
@Lasse I think you are doing something wrong, they are suppose to be way faster than the built in Unity Text renderers
@jgallant well they are
It's even more horrible with the Unity UI own text
haha
20:19
uint16_t type;
std::copy(p.buffer[0], p.buffer[2], &type);
cant convert from std::vector<utin8_t> to uint16_t why ?
Because you usually dont want that
how can i do this then ?
why cant i copy 2 bytes into two bytes i dont see any conversion
std::copy(p.buffer[0], p.buffer[2], &(uint8_t*)type);
I think
Also Im lazy and using C-style cast, you shouldn't
still error doing this way
u mean memcpy ?
20:27
what about this ? (int16_t)&p.buffer
wtf is going on here lol
are you guys trying to memcpy(p.buffer, p.buffer + 2, 2) or something?
yea
i did with memcpy cuz std::copy was giving conversion error
actually std::copy works differently
std::copy(int first , int last , dest);
std::copy uses iterators
yea i know
20:37
I personally hate the living fuck out of the iterator paradigm completely, and have never in real life seen a single example where it made any program design more efficient or convenient. Actually every single time ever period I've found that either it's tedious to type out, or introduces an auto which is convenient but somewhat ambiguous leading to bugs when less experienced devs touch the code.
with that said though, the error with that std::copy above is trivial, put the & in the right place
std::copy(p.buffer[0], p.buffer[2], (uint8_t*)&type);
std::copy(&p.buffer.front(), &p.buffer.front() + 2,& type);
i have tried (uint8_t*)&type was giving error
well I think the first 2 arguments are broken also
tbh this entire thing is frustratingly horrible
this works
std::copy(&p.buffer.front(), &p.buffer.front() + 2,& type);
std::copy(&p.buffer[0], &p.buffer[2], (uint8_t*)&type);
Beat me to it..
In actual reality, the obviously correct solution is type = *(short*)p.buffer
But that's not standard compliant C
(Though it's used in real life extensively, and works efficiently and reliable on fucking every desktop ever)
Obviously that works lol
20:43
1 min ago, by Hjorthenify
std::copy(&p.buffer[0], &p.buffer[2], (uint8_t*)&type);
But holy fucking god that's ugly code, you know?
std::copy(&p.buffer[0], &p.buffer[2], &type);
this works too
still ugly as fucking hell
yea but this is better then memcpy
and i was need just for debugging
type = p.buffer[0] + p.buffer[1] * 256;
which is still ugly as fuck but at least standards compliant
if it's for debugging why are you screwing with standards when you can just do type = *(short*)p.buffer.data();
20:45
i dont like bitshifting :D
i was doing this (int16_t)&p.buffer
Well that's severely broken
why its seems same as (short)p.buffer.data();
You're converting the pointer to the std::vector to a ushort
@yahoo5000 Because it is
That's basically just a random number
You want to dereference the pointer, to get the data it points to
But before you do that, you want to get the right pointer
The pointer to the std::vector structure is probably not the same as the pointer to its data :P
20:48
but its same as .front ?
or [0]
I'm not sure if those are defined explicitly as giving a suitable pointer to the entire buffer
Though it'll work in real life, but if you're trying to use standards you're supposed to be using .data() for that
And even that might be relying on C++0x
.data() is C++11 I think
hmm i see
So if you want it to be "technically correct" under vanilla C++, then type = p.buffer[0] + p.buffer[1] * 256; is the "correct" solution anyways
actually... type = p.buffer[0] + p.buffer[1] << CHAR_BIT; is technically correct
But since fuck standards. real life. Why use the long ugly code?
yea but thats looks shit :D i rather do std::copy or just as u mentioned *(int16_t *)p.buffer.data()
20:52
Why would that be more correct than just memcpy?
Because the memcpy approach assumes that std::vector keeps all elements in a contiguous buffer, which I think is only guaranteed after some revision of C++0x or C++11
I mean I don't think there's any STL insane enough to do anything else, but we're being pedantic here, not realistic :P
Right. The bool template kinda ruins that assumption :P
user4704
vector<bool> not needing to be contiguous doesn't prevent the standard from guaranteeing that vector<not bool> is.
user4704
vector's contiguous nature is guaranteed from C++03 on.
So it's guaranteed for all others?
user4704
20:55
Yup.
user4704
It's std::string that didn't have that guarantee until C++11.
@JoshPetrie sweet thanks
@JoshPetrie So what approach would you chose in Yahoo's place?
user4704
What's he trying to do?
Merge two uint8 into a uint16
20:57
(where the two bytes are at the front of a vector)
copy 2 bytes from std::vector<uint8_t> to int16_t
user4704
uint16 result = (upper << CHAR_BIT) | lower;
Booooom son!
:D
i will stick with Mick way anyway look nicer :D *(int16_t *)p.buffer.data()
I like that way because it's more obvious what's going on, and would use it for debugging without a second thought, but I gotta emphasize it's technically incorrect lol
21:00
@yahoo5000 Did you just defy the advice of our almighty C++ god?
i did not :D but i like nice looking code :D not some ulgy :D
btw Josh's version is actually the most ideal so far, because | (instead of +) could possibly be more efficient on some processors
Though I'd be horrified if any complier produced anything other than mov reg16, [ptr]
@jgallant just booted gorb I love the :o on they sound sliders
hmmm any possible reason why winsock send() could stuck on sending 22 bytes ? and never finished never returns from send() function
Wasn't that your suggestion?
21:10
@yahoo5000 You're using a blocking socket and the other side stopped sending ACKs?
my server using blocking socket client using nonblicking
If the output buffer gets full, send will block
output buffer whats the size of it ?
Don't worry about that
I mean, come up with a solution that doesn't depend on the output buffer size, since the user can change it arbitrarily
hmm i believe this is same problem i had before , i just skip it for now . Switching to non blocking socket would solve everything right
?
21:14
Probably not, a non blocking socket will just throw away data in the same case a blocking socket would halt
You have to check when you send on a non-blocking socket, to make sure it'll actually send
i am checking but its never gives me returncheck
bool Server::SendAllBytes(std::shared_ptr<Connection> connection, char * data, int totalbytes)
{
	int totalBytesSent = 0;
	while (totalBytesSent < totalbytes) // while full buffer not send keep sending
	{
		int ReturnCheck = send(connection->socket, data + totalBytesSent, totalbytes-totalBytesSent, NULL);
		if (ReturnCheck == SOCKET_ERROR || ReturnCheck == 0)
		{
			return false;
		}
		totalBytesSent += ReturnCheck;
	}
	return true;
}
so if send success then returns true if socket error or send 0 will fail
I think that should "work" but it'll smash the CPU with 100% load if you hit the limit but it's non-blocking
That code is clearly meant for a blocking socket
Also the real problem is that your output buffer is full
output buffer what is that ? i mean i am sending 22 bytes , what does output buffer storing ?
and when does he gets cleaned
i had similar problem when i was sending 70k bytes it might fill output buffer not sure
21:20
if it really "never" returns, then somehow the client is not receiving the messages and winsock is stuck waiting and retrying until the clients sends an ACK for the first thing in the output buffer
So did you kill the client quietly after it accepted the connection?
once i kill client i got failed to send packet
until then he gives nothing in return
just stuck in send function
Ok then are you actually reading the data on the client side?
i also was debugging and when step into send function it just stuck
Or is the client also stuck waiting for a send?
its reading
output buffer gets cleaned once client reads data right ?
21:23
Yes, it should stay in the buffer until the client sends an ACK packet to tell you they got it
I'm assuming you're using TCP
hmm then output buffer should by clean , because client have read all data so far i send to him only those last 22 bytes
yes
and client still trying to recv those 22 bytes
it could be the last problem i skiped have to do with it . because i was sending 70k bytes and was having issue tu recv them all it might still by on output buffer :/
Well it's not enough information, you're leaving an important detail out somewhere and I can't guess where
thats all i know my self
The only other guess I can make is that you need to flush somewhere because of Nagle's algorithm, but that's a stretch and I don't think it's what's going on here
Make a tiny program that causes the same glitch and share it
Just copy paste the broken part and not much else, only the minimum to re-create the situation
u mean on pastebin ?
ok will do
will just clean my server and client to make them tiny
@yahoo5000 I just got the feeling I should mention that when I said should "work" earlier, I put scare quotes on it because it'll return false even when things are fine, if you send anything bigger than the output buffer, since send() will return 0 as soon as that's full
not that it matters so much, I wanted to gloss over it to stay on topic, but you should notice still
OMG Putin wears his watch on his right wrist! WTF man.
22:02
I'm starting to get fed up with stupid fucken users of picross Touch
hahah
what now
Like I'm ready to start telling people to fuck off
No auto save. 1 star
If you turn off the game in the middle of a puzzle it doesn't save the progress
Are you fucking with me?
haha
I wish I could revoke access for certain accounts
heheh
22:07
I haven't been sleeping properly for the past week and quite frankly I have a short fuse right now
:(
And I just got a 5 star rating
Thanks random guy
I'm not saying you should make the official complaint process "Step 1. Blow me. Step 2. Please wait." but I am saying those words
I have his google account and name. Let's wreck his life. Lol
Jj
Jk
jk - just killing
22:10
Jk Rowling
She tweeted that pewdiepie is a racist
I used to have no opinion of her, I can forgive her for harry potter, but recently I saw her making some kind of ignorant noise
yeah that's what it was!
And the context didn't matter
She stated context does not matter.
Like what? Really?
Take a really fucked up line from one of her books and attribute the quote to her
Context doesn't matter.
This girl called out idubbz for saying the N word
He found footage of her saying it on 3 occasions
lel
22:13
His video ripped her apart
@jgallant lmao
He went to her show and waited in line for a meet and greet
Hilarious
Stupid link but video us hilarious
That looked somewhat like gay porn intro
Idubbz is by far the best YouTuber
The frame rate though, is silky smooth
22:20
And yeah his content cop intros are pretty strange.
Well he is pretty strange
Everything he does is strange
@MickLH i think i made exactly same story just tiny client and server but this time instead of stucking he returns me -1 return check and failed to send same packet .
witch error code 10054
22:46
@yahoo5000 Then that tells you that you have to look at something you didn't expect
like what ?
And that's pretty common, actually one of the reasons I ask for an SSCCE is exactly because it forces people to find out for sure if they are looking at the right piece of code at all
i got same error code on my normal server when i close client
@yahoo5000 Well it means that whatever causes it to hang, is not part of what you thought should go into the SCCEE
So you should look at other things, start with the most related bits of code
hmm i am checking it now , removing mysql part and will run once more
22:49
It could be very simple, maybe the size of the send data is really big unexpectedly
It could also be very complex, maybe you have memory corruption and the debugger is lying about where you've crashed
You might be able to find the issue easier by making a copy of the entire source tree, and then removing as much as you can from it until it stops hanging
That should give you a good hint at what's going on, once you find that point
yea thast great idea i am currently doing it now tnx Mick ;)
23:04
how to find errors like this ?
@yahoo5000 Are you linking against user32.dll?
ok i was fucked up my project settings was missing %(AdditionalDependencies)
Took me a while to figure it out was looking problem not where she was :D
23:19
Girlfriend's phone died in middle of picross puzzle.
It didn't save.
hahahahahaha
fucking lolll
For crying out loud
I'm still laughing ty
Lol same
Man, I should probably ask my doctor why it hurts to laugh so much
23:32
Herpes
... the pope's got it and so do youuu!...
I guess I could ask WebMD what it mi-CANCER.
Don't worry about it
that's mostly what I do, I always ignore the issue until it's absolutely unbearable lol
why do anything when it'll probably be magically fixed tomorrow morning
(or in this case, a moment after I stop laughing)

« first day (2399 days earlier)      last day (2915 days later) »