« first day (638 days earlier)      last day (4379 days later) » 

12:43 AM
Bold and spicy baked beans and a glass of milk. I've got it made.
 
still no gajet :(
 
Have you tried calling @Gajet like so?
 
yeh dont think hes been online
 
1:22 AM
Hi
 
hey
 
1:46 AM
Can anyone help me with collision response o:?
 
Ugh, @CodeAssasssin, by now you should now to just ask your question and pray to the ancient gods that someone who has an idea is here ;P
 
Lol
Question is: How exactly do I prevent my object/entity from entering a another entities bounds
 
But handling collision response before it actually moves?
 
I really haven't worked that much with collision so :(
 
In my engine, I check if the next position would mean a collision, and then I change the velocity to just exactly touch the other object.
 
1:59 AM
o: That sounds pretty simple lol - I'll try that!
But without doing it this way - how would you actually prevent the object from going within the bounds?
 
You're asking how to prevent it without preventing it? :s
Isn't that like asking how to prevent intercourse with you already inside the girl?
You already failed a few steps back?
 
LO
LLL
rofl
Lol - I already have collision detection. I'm asking how to make it look like collision is happening.
 
By doing exactly what I just said. :P
Prevent it from entering the bounds by changing the velocity instead of the position.
 
so... Velocity = 0 o:
 
No
Set velocity to the distance between the two bounds.
...
    deltaVelocity.X = verticalWall.Value.BoundingBox.Right - this.Left;
...
That's how I do AABB collision between Tiles and Entities.
That would be whenever I hit an object and I'm moving left.
 
2:09 AM
2 days ago, by Moshe
I'm eating too much junk food.
 
3:11 AM
@James I saw your Minecraft Survival Video o:
 
@Moshe Have you considered not doing so? :P
Anyone in here have a good understanding of the MIT License?
 
@WilliamMindWorXMariager I'm part-lawyer
:P
It's not that big lol.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
 
Well, yeah, I know the license. I'm just curious how it works.
Am I allowed to add it to my closed source project?
 
Perhaps this might help you:stackoverflow.com/questions/2469038/…
"This state might or might not include the source code." - Tadeusz A. Kadłubowski
So -I'm pretty sure you can use this.
DISCLAIMERZ: I iz not proffesinalz!
@William Did that link help? o:
 
3:23 AM
Lol - I'm not even focused on a license in my development process... at least not yet :P
Right, now I'm just fleshing out the good ideas from the bad - and trying to get core game-play down.
 
Oh, I'm just looking at what I need to do with this Lidgren thing I'm using.
 
Ah - it's a network library! o.o I have never done Network Programming before lol... is it hard?
 
Lidgren does simplify a bunch of things.
It's geared towards network protocols with lots of smaller packets.
Which is common in most games.
At least, in action games. :)
 
@WilliamMindWorXMariager Action Games FTW. Slow paced games can get on my nerves - but I can appreciate a good plot :)
 
3:48 AM
Finally passes a level on SMB(Super Meat Boy) - Woot!
aaand - I'm going to go :(
Lol good bye everyone.
 
4:07 AM
@CodeAssasssin For TFCraft?
 
5:00 AM
fixed that single issue, you were right @Kikaimaru
i had added something then changed it from const to public without realizing
that it would affect my serialization
 
yeah errors in content pipeline are not so good :)
 
well i fixed it, which is nice
 
i hate it that you can't rewrite anything from write step...
its so frustrating...
@JMRboosties oh yeah, thats nice :)
 
@Kikaimaru yea thats really annoying.
ok now i have movement down. i need to implement collisions
 
by the way, its possible to write content reloader, that will automaticaly reload your map for example into a game
but you probably dont need that right now, its kind of complex and for now you can just restart game :)
oh, did you read that wiki link i send you?
but you would need to draw all collisions by yourself, if you set tile properties on tile you dont need that
 
5:10 AM
i did @Kikaimaru
tile-based collisions are pretty easy
i added a boolean to the layer element in the xml file for the map
if its a collision layer or not
so every time you move it checks if the tile you're moving to has a texture on one of the collidable layers
 
oh i see thats what you meant by layer element :)
 
yea
its a pretty good system imo
it just does a foreach on the layers and checks if its collidalbe, and if so checks if if it has a non null tile on that coordinate
if it does you're kicked out
rather, denied the movement
but i dont have any speed control right now
i need to slow it down
 
well its kind of wastefull to use ints to store boolean collision, and whats more have it loaded some texture, but whatever its probably nothing :)
can you change tile size of just one layer?
 
no you cant
 
well thats sad :)
 
5:24 AM
why would you wanna do that?
 
you could make collision layer two times smaller
 
@WilliamMindWorXMariager Asura is not that bad either
 
ehm
was just playing asuras wrath, im kind of messed up :)
what is it called... :)
ASIRRA :)
i got same game 3 times in 5 reloads .)
 
6:21 AM
@Kikaimaru the collision layer still draws stuff
 
6:40 AM
@JMRboosties What? Why? what stuff? :)
 
like, buildings and stuff
instead of having two map objects, one drawn and one for collisons
i just combined the two
a layer with collidable objects like houses and stuff cant be passed through due to an xml attribute
its working great now.
what i need to do is implement a movement speed
 
6:59 AM
and is everything working fine? :)
 
 
1 hour later…
7:59 AM
Hi
 
Hi
superuser.com/questions/419070/… john carmack on stack exchange :)
 
8:18 AM
He's crazy lol
 
 
1 hour later…
9:33 AM
Is it good to make the UI scalable(pos and size in percentage, not pixels) or am I just wasting time?
Mostly things on the UI I'm doing in percentage and applying offsets
This way I dont get buttons are always the same size, but windows are proportional.
 
0
Q: handling "feature like game X"

gardian06I have been seeing some questions that refer to some gameX. in some cases I have heard of, or even played the game in others I have not, and I feel the OP does not explain what the feature is, or even give information about the game itself. like this question, or this before edit In the second e...

 
9:56 AM
oh wow, good morning. i am not a game developer, but in next time i want to start it. just want to say hello here :)
 
hello :)
 
@brush51 Why wait? Start now :)
 
@Damir i wish i could. recently i am working on "normal" ios apps, current project is with TTS.
@GustavoGtoknu hi
@Damir so i have to do a lot of research, after i am ready with my current project
 
hi
 
10:09 AM
@Kikaimaru Hello
 
@Kikaimaru hai
Need some tea to start the day lol, back in some minutes.
 
@Kikaimaru hi
@GustavoGtoknu i am from germany, i need something to eat, it is 12:12 PM
 
@Dave @tylerrrr07 I weren't here for 3 days but now I'm back!
 
@Gajet so, welcome back and hello :)
 
I was participating in an GDC
this time it stands for "game development competition"
 
10:20 AM
and did you win? :)
 
nope, but I think it was mostly because winners were chosen before competition
I mean the competition itself didn't had anything to do with winning it!
but that's only my conclusion (and my teams), so we might be wrong
anyway bbl in 40min
 
@brush51 heh brazil here, its 7AM
 
@Gajet Doesn't sound like a lot of fun then. In any case, did you produce a cool game?
 
@Gajet great! I love these competitions and jams
Guys, I'm working on a little characters editor for my game and I'm working on GUI, quick question for you: Do you prefer a HUE color picker like the Photoshop's default, or a Saturation color picker like MS Paint's?
 
@GustavoGtoknu Are you sure asking programmers is right thing to do? :)
 
10:33 AM
@Kikaimaru I thinks it's good to listen to some opinions :) Better than make something that's fixed on just what i think is the best.
 
@GustavoGtoknu Just do the one you like more. You can add/change later if you get complaints :P
 
I think I'll put 3 bars for RGB as old games do then
the easiest solution
 
Use property grid that will allow you to write r,g,b,a, you can later add editor using some winforms attributes :)
 
What kind of game are you working on?
 
3D RPG
mouse's available, but any GUI Component I'll have to make myself,
 
10:37 AM
what is character editor? something for designer or for player? :)
 
both :D
like edit your character hair color, etc
and is also the same editor as the designer may build npcs
 
for that i would use set of predefined colors, with rgb bars
 
Good, but which predefined colors?
just make a loop on the Hue wheel?
 
there must be some theory behind what colors mspaint uses :)
 
well, i was seeing it, and doesnt appear to have any relation
actually some have. other dont
i was studying the color picker of PS, and it appear that the colors are organized as
(1.0, 0.0, 0.0) -> (1.0, 0.0, 1.0)
(1.0, 0.0, 1.0) -> (0.0, 0.0, 1.0)
(0.0, 0.0, 1.0) -> (0.0, 1.0, 1.0)
(0.0. 1.0, 1.0) -> (0.0. 1.0, 0.0)
(0.0. 1.0, 0.0) -> (1.0, 1.0, 0.0)
(1.0, 1.0, 0.0) -> (1.0, 0.0, 0.0)
this gives a good set of predefined colors
but, withouth light variance. As the mspaint ones have
 
10:41 AM
but pure red and colors like that does not look good on hairs :)
 
@GustavoGtoknu wow, very early in the morning
 
hmm, rct3
 
1 was best :)
 
10:44 AM
we have the same opinion then haha
 
you can use colors that you have in Colors static class :)
 
Im not using XNA
But nice idea! I will take a look on the meta reference
nice
 
11:45 AM
Morning.
 
Morning.
 
Morning :)
 
12:24 PM
regrets eating junk food last night
 
how can i convert DataInputStream into string without using ReadLine() method
 
@kikaimaru - Modding RTC3? Awesome!
 
using java btw
 
From the docs:
Deprecated. This method does not properly convert bytes to characters. As of JDK 1.1, the preferred way to read lines of text is via the BufferedReader.readLine() method.
I guess you could also use readUTF()
 
readUTF doesn't return enything for some reason
 
12:43 PM
a readUTF call have to exist for each writeUTF call
That is, readUTF will only read valid data written by writeUTF
(it might read others as well, but it works better with it equivalents write/read methods)
 
@Liukas Its not called converting, but reading
@Liukas Someone posted you method here yesterday
 
anyway, can you remember why using BufferedReader.readLine() is bad?
 
because you might want to send other things containing \n's
 
you mean if i'll send "hello my \n name is Liukas \n" i'll receive:
hello my
name is Liukas
?
 
almost this, the case is worse.
it will read
"Hello my ", read space as a opcode, and the rest is unknown.
 
12:50 PM
so how should i receive the message then?
 
... Can someone explain it to him again? gtg for a hour or two.
 
readUTF?
i can't use writeUTF in my client
 
byte[] buffer = new buffer[stringSize];
inB.read(buffer);
String myString = new String(buffer);
or else
inB.read(buffer, 0, buffer.lenght);
bu it should guarantee the same result
im out, cya
 
how can i get the string size?
 
this probably wont work because of encoding
 
1:08 PM
it does work, but i dont know how to get the size of a message that i didnt received
 
what<
when you are writing string, you will write string.length and then foreach char and write char as byte
when you read string you will read length and then read each char as bytes
this will only work for ascii
 
ascii?
what is the reference?
 
string is stored as array of chars (which are two bytes) because there are special characters like "č" that you dont find in ascii
 
@eBusiness I guess so. at least we had fun while developing it
 
ascii strings are stored just as array of bytes because ascii has only 256 different characters
wiki...
 
1:22 PM
"when you read string you will read length and then read each char as bytes" how can i read leght if i havent read the string yet?
byte[] buffer = new byte[stringlennght];
inB.read(buffer);
String message = new String(buffer);
s = message;
]
 
1:40 PM
when you write string you write length first
you can read anything you wrote
 
@Kikaimaru ascii only has 128 different characters
everything beyond 127 is extension to original ascii
 
2:11 PM
@Kikaimaru ok so how can i read the length?
 
@Gajet Is it available anywhere?
 
@eBusiness I don't think so,
I don't have the game right now either
but we planned to release it on some site in internet (maybe kongregate)
 
2:28 PM
Kongregate needs more APIs.
That site could grow awesomely if they made an API for Unity.
And maybe even Silverlight, though it's not that widely used.
 
@Kikaimaru inB.read(buffer, 0, buffer.lenght); buffer.lenght part should set the lenght, but it doesnt
 
@WilliamMindWorXMariager I thought they do have Unity support...
 
I'm pretty sure I've seen badges for Unity games
 
I admit it has been a while since I last checked.
 
2:31 PM
I know that they do support Unity games...I am just uncertain whether they have badges for them.
Looks like they do.
 
@Liukas no it shouldnt...
 
@Kikaimaru so how can i get the lenght? XD
 
yeah they have support for unity games
that's the sole reason I though of adding our game to that site
 
@Gajet is back!
 
I wan't gone that long!
only two and a half days
and last night also I logged in announcing I came back!
 
2:43 PM
I saw that :)
Dave missed you. I wasn't worried
I knew you'd be around
And I wasn't looking for you either...
 
I saw his messages
but anyway I'm here for at least as far as I can predict my future!
 
Fantastic
 
3:01 PM
@Liukas @Kikaimaru
String toSend = "Hello World";
outBuffer.writeInt(toSend.lenght);
for(char c : toSend)
    outBuffer.writeChar(c);
then just read as lenght = inBuffer.readInt();
for(int i = 0; i < lenght; ++i)
    ... = inBuffer.readChar();
 
sup guys
 
what about sending like this?
stream.WriteByte(01);
stream.Write(data, 0, data.Length);
because there is no writeInt method in unity
 
You have the code indicating that it is a string, nice, but you also have to indicate the data lenght.
try stream.WriteByte(01);
stream.Write(data.Lenght);
stream.Write(data, 0, data.Length);
 
3:17 PM
okay, but data --> bytes, shouldnt i writ string lenght>
?
 
the same.
 
really?
so 1 char = 1 byte?
 
not always, but generally yes
and in this case, no problem if you know how to read it back, so give it a try.
 
can you expand the reading loop?
now i read it like this:
byte dataIn = inB.readByte();
switch(dataIn)
{
case 01:
byte[] buffer = new byte[1];
inB.read(buffer, 0, buffer.length);
String message = new String(buffer);
s = message;
break;
}
i should cut the message in to 3 pieces: ID, Lenght, message.
but i dont know how to do that
@GustavoGtoknu are you here?
 
int lenght = inB.readInt();
char buffer = new char[lenght];
for(int i = 0; i < lenght; ++i)
{
    buffer[i] = inB.readChar();
}
String message = new String(buffer);
@Liukas Also, don't hurry me. Please.
 
3:29 PM
sorry, i'm not hurrying you, i just tought that you're out
dont know why, but it doesnt work... :/ the message is empty
 
readInt
public final int readInt()
throws IOException
See the general contract of the readInt method of DataInput.
Bytes for this operation are read from the contained input stream.

Specified by:
readInt in interface DataInput
Returns:
the next four bytes of this input stream, interpreted as an int.
Throws:
EOFException - if this input stream reaches the end before reading four bytes.
IOException - the stream has been closed and the contained input stream does not support reading after close, or another I/O error occurs.
@GustavoGtoknu readInt returns next four bytes of the input stream, is that good?
 
yes
see if you are writing a 4 bytes int too.
 
but the message is longer than 4 bytes
 
3:40 PM
switch(dataIn)
{
case 01:
int lenght = inB.readInt();
char[] buffer = new char[lenght];
for(int i = 0; i < lenght; ++i)
{
buffer[i] = inB.readChar();
}
String message = new String(buffer);
s = message;
break;
}
 
do you know that 4 bytes you can actually represent a 32 bit integer, that is 2^32 values
 
values?
 
its actually 4.294.967.296 numbers, or if you have the signed too, you have -2.147.483.648~+2.147.483.647
unless your string have more than 2.147.483.647 characters, its pretty fine.
 
:D
 
this is 2gb of chars btw, you probably doesnt have that much.
 
3:43 PM
btw
i think i know what the problem is
buffer[i] = inB.readChar(); it is in this line
inB.readChar() returns the first character every time
am i right?
 
no, you're wrong.
 
hmm
why?
 
it returns one char and advance one
if you have "hello world"
the first call will return 'h', the second call will return 'e'. etc.
 
you mean the character deletes after reading it and after reading the first char the message is "ello world"?
 
no it doesnt delete
you may go back
it just advances the "pointer"
like when you're on a text editor and press left or right and the caret advances one character
 
3:48 PM
i understand
then the code looks fine...
 
@CodeAssasssin Hello tweak :)
 
@GustavoGtoknu :D Hi
 
Im pretty sure you're not writing the string lenght properly.
@CodeAssasssin did you get my message on gtalk? i wont enter there soon
 
@GustavoGtoknu Yeah I got it
 
this is how i write:
var data = System.Text.Encoding.UTF8.GetBytes(stringToEdit + "\n");
stream.WriteByte(01);
stream.Write(data.Lenght);
stream.Write(data, 0, data.Length);
print("Message sent!");
 
3:51 PM
let me see the documentation of this stream
?
 
ha
i write like this stream.Write(data.Lenght);
there should be another way
can i convert the lenght to bytes?
 
see BitConverter.GetBytes(int) method
 
unity?
 

« first day (638 days earlier)      last day (4379 days later) »