« first day (2875 days earlier)      last day (2135 days later) » 

1:30 AM
@AlexandreVaillancourt eh... you can see the whole terrain on top of a mountain in the corner of the island. Also, I have began work on another island! You can go there, but it is pretty blank :/
 
1:56 AM
Am I alone?
 
not alone
i'm here
 
Ok. Cool. What have you been up to?
 
not a lot
sister visitng
shopping, board games, VR stuff
you?
 
Working on my RPG. Began on another island (plan on having a thrid). About to add a dungeon.
 
oh cool
:)
 
2:14 AM
It is coming along very far. 2 quest (harder to add than Elder Scrolls makes it look!) 6 enemies, 10ish NPCs and 4 dungeons!
 
 
9 hours later…
11:09 AM
@TheMaskedRebel There's different methods of vector multiplication; you'll want to be sure whether you want the cross product or the dot product. Then look that up on wolfram mathworld or wikipedia or other sources as might help explain it.
 
12:03 PM
hi
 
user92578
hey
 
how are you
in Chat feedback, 20 secs ago, by The Masked Rebel
how do I create a chat room
 
user92578
12:18 PM
doing okay, playing some dota before getting into some programming
 
@Tyyppi_77 Could you help me with my aabb vs aabb collision response
 
user92578
what did we talk about the editing of ping messages?
 
user92578
but yes, I can try
 
Here is the code
float[] distances = {
			(aabb.entity.getMax().x - entity.getMin().x),
			(entity.getMax().x - entity.getMin().x),
			(aabb.entity.getMax().y - entity.getMin().y),
			(entity.getMax().y - entity.getMin().y),
			(aabb.entity.getMax().z - entity.getMin().z),
			(entity.getMax().z - entity.getMin().z),
		};

		int faceIntersected = 0;
		float depth = 0;
		Vector3f normal = new Vector3f(0,0,0);

		for(int i =0; i < 6; i++) {
			if(distances[i] < 0.0f) return false;

			if((i == 0) || (distances[i] < depth)) {
@Tyyppi_77 the problem is that the collision doesn't seem to register
 
12:37 PM
@TheMaskedRebel your thing returns false the moment any distance is less than 0, that doesn't seem right
 
user92578
I'm not sure if I understand what your distances denote
 
@doppelgreener I got it from @Tyyppi_77 link
 
is this LWJGL?
 
ok, so .scale() does mutate the object itself, good
 
12:44 PM
@doppelgreener Do you want the source code
for lwjgl
@Tyyppi_77 I'll have to find that link you sent me to the gamedev post
 
I was just making sure I had the right reference
(sorry for the edit ping)
 
@Tyyppi_77 they represent the distance of collided box to the face.
 
user92578
seems kinda odd to calculate distances from corner to corner
 
user92578
This also seems like something that will break at high velocities
 
@UriPopov hi
 
12:52 PM
@TheMaskedRebel hi
 
@Tyyppi_77 Thats what the link said
@UriPopov How are you
 
user92578
yes I can see that
 
user92578
I wish you put some thought into pasting stuff here, it's super annoying to have to manually fix the indentation
 
do you want the normals too
 
user92578
no
 
12:54 PM
@TheMaskedRebel good I got a inverstor meeting tommorow. Feeling kinda nervous.
 
user92578
mmhm I think doppel is right, the return seems suspicious
 
user92578
I don't really know if I can be helpful, you just gotta do some debugging with a very simple test case
 
yeah, set up a very simple (two object) collision situation, set a breakpoint, and step through the code and observe debugger output to see what's going on and try to find what doesn't look right.
physics code is also an important place to have unit tests, because when one tiny thing goes wrong it can be hard and time consuming to track down because it will make several other things go wrong.
so you need unit test code coverage.
 
@doppelgreener do you have aabb vs aabb collision response code
 
user92578
I think you need to just focus on your code or just pick up one of the many existing physics/game engines
 
1:03 PM
@Tyyppi_77 i think Ill find a physics engine
 
Bullet is good
 
@TheMaskedRebel yes, i think so, buried somewhere in a project i wrote a few years ago. I could look into how to share it on Gamedev.SE since it doesn't appear to have a dedicated answer about that yet, and I had to work through several bugs and edge cases (like clipping) in order to get there.
I was writing a platformer so I wanted my own simplified physics that I had control over
 
1:23 PM
@TheMattbat999 Yeah, that's kind of what I figured. And simulating earth's curvature might be overkills :P
 
1:49 PM
Speaking of which, simulating nitrogen haze to indicate distance is itself important
In our world, things that are very far away are also proportionately faded
When things are not faded at all it makes them look like they're very nearby
Games leverage that nitrogen haze to help us understand distance, but also because they must because it would look wrong to have far-away terrain that is not faded at all
 
It can help also with LoDs and reduce the polygon count to draw.
 
@AlexandreVaillancourt I don't think the game world is big enough for that anyway!
 
@TheMattbat999 Not yet! :P j/k You'll figure that out when it comes.
 
2:03 PM
@AlexandreVaillancourt ok. Well, I gotta go!
 
Later :)
@doppelgreener Do you know if it's possible to add latex in code chunks (e.g. for here)?
 
2:38 PM
@AlexandreVaillancourt nope, code blocks are plaintext. (I mean, people are using them to share latex code plaintext, so it'd be a problem if that stuff rendered.)
I suggest writing math separately and finding a way to make your pseudocode represent the math in pseudocode. the idea there would be to treat your pseudocode as a way to help people understand how the math gets implemented in code.
It may help to do something I did in this answer here: I added a \tag{#} to my block ($$ ... $$) equations, which is the (0), (1), (2) etc floating off on the side of those equations. Then in the code sample below, I used comments to reference the equation I was implementing.
 
@doppelgreener Yeah, in this case the author would have to through implementing it and the either post the code or some pseudocode.
 
Maybe I should add an answer to our mathjax cookbook about that.
 
@doppelgreener That's an idea, yeah!
 
3:13 PM
@doppelgreener Thank you. I will post a answer on the main site now
 
0
A: Game Development MathJax Cookbook

doppelgreenerTag and reference equations Tagging If you have multiple equations in the same post, you may want to tag them for reference using \tag. For example, \tag{1} adds this floaty \$(1)\$ on the right hand side here: $$ c^2 = a^2 + b^2 \tag{1} $$ $$ c^2 = a^2 + b^2 \tag{1} $$ You can also use let...

no syntax highlighting on meta makes me sad :(
 
@doppelgreener oops I meant a question
@doppelgreener Make a meta post about it
@doppelgreener Can I have the code please
 
0
Q: Can we have syntax highlighting on meta?

doppelgreenerThe following code example on meta renders without any syntax highlighting, despite a syntax highlighting directive: from math import sqrt class Triangle: def hypotenuse(self): # equation 2 return sqrt(self.a**2 + self.b**2) (The directive used here is <!-- language: lan...

@TheMaskedRebel I can dig it up later
 
3:35 PM
1
Q: Can we have syntax highlighting on meta?

doppelgreenerThe following code example on meta renders without any syntax highlighting, despite a syntax highlighting directive: from math import sqrt class Triangle: def hypotenuse(self): # equation 2 return sqrt(self.a**2 + self.b**2) (The directive used here is <!-- language: lan...

 
@doppelgreener LOL @GDSEMeta has posted the post you just posted
 
user92578
yeah bot is slow
 
it's dedicated and stubborn
it'll get there ... eventually ... whether we've already linked to it or not
 
@doppelgreener Than why did you link to it
 
@TheMaskedRebel because the GDSE meta bot may take literally hours to post a meta link sometimes, and because you suggested I open a meta post, so I did so and linked back to it here.
 
3:43 PM
@doppelgreener I'm thinking of another meta post... So watch out @GDSEMeta
 
user92578
3:53 PM
user image
2
 
user92578
My SDL2 ImGui renderer in action
 
@Tyyppi_77 Cool
 
user92578
I wanted to make the code open-source, so here if anyone is interested: github.com/Tyyppi77/imgui_sdl
4
 
I think I know what was wrong with the code I showed up there
 
@Tyyppi_77 nice one :)
 
3:58 PM
I am using the wrong normal
 
user92578
nice
 
I need to find the mass of a sphere and I'm at loss as to how I would do that.
 
user92578
just ask, dont ask to ask
 
I looked on google and everything I saw included the density of the sphere which I don't have
So how would I find the mass of a sphere given a center and a radius
 
Well, what is the sphere material?
 
4:07 PM
@doppelgreener its hollow
 
The reason they include the density is because the mass depends on the material, and the material gives you the density.
 
It surrounds a object @doppelgreener . It is a ollision sphere
I don't know what material that could be
 
Then it is not a sphere you want to calculate mass of.
You are making physics. Not everything has the same mass. Heavier things keep moving and push lighter things out of the way, even if they are the same size.
So to understand how to make things bounce off each other or interact, we need their mass.
 
@doppelgreener Let me show you something @Tyyppi_77 gave me
 
For example, if I have a heavy bowling ball, and another ball the same size made of chalk, the heavy bowling ball is goign to smash through it (probably obliterate it) and keep on going.
 
4:11 PM
@doppelgreener here is a link typpi showed me : gamedev.net/forums/topic/496976-sphere-collision-response
it calculates the sphere's collision using the mass
 
So, that sphere's mass probably represents the mass of whatever it's the collision sphere of.
You cannot do physics without mass.
 
@doppelgreener So what would be the mass(roughly) of a player and an some plants
 
I dunno man, you pick
What are they made of?
Look up the density of wood, of humans, etc
 
@doppelgreener So I define them in my game.
 
Yes
Mass equals volume times density.
A sphere with radius 1cm has volume ~4.19cm³, but this doesn't tell us what mass it has. We need to know what it's made of.
Aluminium has a density of 2.7g/cm³, iron is 7.87/cm³. This means if that sphere is made of solid aluminium, it has a mass of (4.19 * 2.7) = 11.313g. If it was made of iron, it would have a mass of (4.19 * 7.87) = 32.97g.
 
4:14 PM
@doppelgreener Do I actually need the mass to calculate collisions. Can't I just have a set "bouncyness"
 
@TheMaskedRebel I will answer that with a question: If you have an entire truck plow into you, do you expect the truck to bounce off of you, or keep going?
 
@doppelgreener Keep going.
 
Right. But if I toss a tennis ball into you, the ball doesn't just keep going, it bounces off of you.
 
but I'm not making a real life simulator. I'm making a game which isn't realistic
 
Then just set everything to have density 1.
 
4:17 PM
@doppelgreener And calculate the mass with that?
 
Sure, yes.
Density 1 will have the effect of bigger things being more massive (heavier) for collision.
Everything having mass 1 will feel wrong (tiny marbles interact with your player the same way a huge tree does).
(i mean, maybe your platformer wants that, it's not realistic, who knows)
 
Thanks for your help everyone
 
This lets you play around with making things like a beach ball have density 0.25, or a big rock having density 10, to give things the feel of being heavy or light without being exact.
 
@Tyyppi_77 the code that you gave me conserning sphere intersection leaves a massive spher around my object
 
user92578
i have no idea what you are talking about
 
4:22 PM
@Tyyppi_77 You gave me some code about generating a sphere from a mesh
 
user92578
oh yes
 
user92578
it generates one based on the largest distance from center to a vertex
 
it gave a sphere that encircled the mesh but was about 5 times bigger than the mesh
 
user92578
then you have done something wrong
 
    private void create(TexturedModel model) {
    	Vector3f center = Vector3f.sub(model.getMax(), model.getMin(), null);
    	center.scale(0.5f);

    	Vector3f[] vertices = model.getVertices();
    	float radius = 0;

    	for(int i = 0; i < vertices.length; i++) {
    	       float distance = sub(vertices[i],center,null).length();

    	       radius = max(distance,radius);
    	}

    	 this.radius = radius;
    	 this.center = center;
}
 
4:28 PM
thing i do before i post code here: de-indent it a few times in my source code until the indentation level starts at 4 spaces, then make sure I copy the spaces before the function name as well.
 
@Tyyppi_77 that is my code and besides a massive sphere there is nothing wrong with the collision
 
5 times larger would account for: (a) not scaling down the model vertices by 0.5, even if you've scaled down the center; and (b) setting radius instead of diameter
(technically those two would make it 4 times larger though, not 5 times larger)
 
@doppelgreener Do I have to scale down both or just the vertices
 
user92578
that's correct, I don't know how that is too big
 
@doppelgreener What do you mead by setting radius instead of diameter
@TheMaskedRebel *mean
 
user92578
4:35 PM
you need to give us something more concrete if you want help from us
 
user92578
example inputs and outputs or something
 
@doppelgreener What do I set instead
@Tyyppi_77 I scaled down the model vertices and the sphere is much smaller
 
@TheMaskedRebel i don't know. looks like you implemented it correctly according to what tyyppi's saying, so it might not be that.
 
user92578
@TheMaskedRebel why are you scaling down the model vertices?
 
although still bigger than normal
 
4:37 PM
@Tyyppi_77 probably because of what i said
 
@doppelgreener So what should I do instead of setting radius
 
user92578
@doppelgreener he's not scaling the center, thats just how he calculates the center
 
@Tyyppi_77 It worked
 
@Tyyppi_77 ok, gotcha
 
user92578
I gotta say that it was super fun to work on an open-source thing that took about a week to get into a good state that consists of about 600 lines of code instead of a larger game project
 
4:43 PM
@Tyyppi_77 Do you imply that having it open source means you have to make it clean ASAP?
 
user92578
That too, mainly though to just have something open source out there that could possibly be of use to someone
 
Yeah! it would be nice to have feedback or something like a counter of other places it's been used!
 
Hello!
 
5:00 PM
Hi!
 
5:33 PM
How have things been in my absent?
 
nwp
We had lots of parties. Too bad they are over now.
 
:[
I added a new quest to my game!
 
6:38 PM
@TheMattbat999 Bill Gates came here, and he gave us each a million dollars.
2
 
nwp
I missed that one :(
 
@AlexandreVaillancourt haha.
I do wanna ask something: I got this medium sized, stone structure made, and I am unsure of what should I do with it (I will post a pic in a sec)
(The top thing)
 
nwp
6:54 PM
You do know that there is a key on your keyboard for making a screenshot right?
 
I know, but going from computer to phone to SE is a hassle, and it really didn't feel necessary.
 
nwp
Why are you going from computer to phone? Why not SE on computer?
 
@TheMattbat999 Looks like it could be the home of a dumb/primitive species (not built by them, but they found it unoccupied so they used it).
Like some kind of trolls, orcs, and the like...
 
@nwp Ain't got the password to WiFi to hook computer up to SE
@AlexandreVaillancourt I got yetis. They are rare though. Maybe a place where one is guaranteed to spawn?
 
nwp
It needs a treasure inside and a gate that drops down when players try to get it. If they can't get out within a minute an ogre comes and eats them.
 
6:58 PM
@TheMattbat999 this situation gets seems stranger and stranger
 
@TheMattbat999 Yetis would be perfect!
 
@Jimmy full explanation: teen whom hath none of his own money. Father pays for phone. Father no let me use WiFi tho so he has password on it. He put password in every once and a while to update PC. He does not let me see password.
@AlexandreVaillancourt k
 
nwp
I solemnly swear to never do such a thing should I ever be in charge of offspring.
 
(Father somewhat strict cause older brother act stupid alot)
Like alot
@AlexandreVaillancourt ok, yeti spawn set up!
 
nwp
I don't see how giving you internet on a phone but not on a computer keeps you from acting stupid.
 
7:13 PM
Well here we are again... another problem... I have a problem regarding my server side nps... i update them every second once. And theres a little chance for them set their position to a new one. This position is send to the clients for updating the entitys...
Well client side i only move the entity from their old pos to the new one... But there iusses with that... when theres another player nearby he actually already gets the new position of the entitys.
So on both devices the npcs are on different positions, till their the entitys move to their new one ( client side ) ... Futhermore im gonna implement the combat system... and here is the next iusse... Because i do not move those entitys every frame ( server side ), the movement basically happens client side... When the player wents to one of those entitys to attack them and the entity is still moving...
he basically attacks this entity at the wrong position. Other players could possible see this too.... they just see the player standing somewhere in the plains attacking nothing, because the entity is 10 meters left from him...
 
@nwp I think that is more of "I don't want you taking up my bandwidth" now I think more about it...
 
nwp
That sounds more reasonable.
 
@genaray This is a very broad problem that you solve incrementally to get better and better results
for example, start by sending NPC location as soon as they move on the server. Then start sending its intended arrival time and location so the clients are not always trailing a bit waiting on real-time stream of position updates. then once you have timestamps attached to everything you can start doing smart things with extrapolated server-side positions when calculating combat range.
 
Thats a great idea :D So i could calculate the exact point where the entity should stay once my player attacks it, or once the new player enters the zone ... dammit havent thought about that ! Thanks :D
 
@nwp yeah, though some silly rules my father put in place were caused by my brother
Like can't play video games on any night before a school day.
 
7:44 PM
@Jimmy I just rembered vector maths... For example lets say we have this point [51,4500;8,4000] as a startpoint.... the new generated point is [51,4600;8,3000] and my npc can move with the speed of 100 units / s ... [51,4600;8,3000] - [51,4500;8,4000] = [100;-1000] => root of those values for distance = 1004 as distance : speed of 100 units / s = 10,04 seconds to reach my target ... did i made any mistakes ? Should work right ?
 
seems reasonable
 
 
1 hour later…
9:05 PM
Does anyone have an idea what kind of format this is : 2018-06-19T21:03:57.055Z is ?
yy-mm-dd and than ?
 
ISO timestamp
ISO 8601 Data elements and interchange formats – Information interchange – Representation of dates and times is an international standard covering the exchange of date- and time-related data. It was issued by the International Organization for Standardization (ISO) and was first published in 1988. The purpose of this standard is to provide an unambiguous and well-defined method of representing dates and times, so as to avoid misinterpretation of numeric representations of dates and times, particularly when data are transferred between countries with different conventions for writing numeric dates...
 
Thanks :D Now i just need to find the right way to parse it into c# datetime or similar
 
System.DateTime.Parse("2018-06-19T21:03:57.055Z", null, DateTimeStyles.RoundtripKind);
 
@Jimmy Sounds good... but it tells me "String was not recognized as a valid DateTime"
 
works on my machine? and even System.DateTime.Parse("2018-06-19T21:03:57.055Z") seems to work too on my machine
hmm.
try passing System.Globalization.CultureInfo.InvariantCulture instead of null?
 
9:13 PM
The parse with only the dateTime string works... but it seems that it doesnt recognizes the ms... When i outprint the ms its for all the same, even when i receive dateTimes with different ms... Im gonna try the culture variant
 
how are you printing the ms? by default DateTime.ToString() doesn't show ms
 
Doesnt work... the only one that works for me is this : DateTime.Parse("2018-06-19T21:03:57.055Z") but in this case it doesnt outprint 055 ms ... it outprints 901...
By DateTime.Miliseconds
DateTime startTime = DateTime.Parse(startTimeString);


Debug.Log("TEST : "+startTime.Millisecond);
Works now ! Thanks a lot :) I somehow changed the ISO timestamp server side a bit ... which causes it sometimes to work and sometimes not O.o
 
9:49 PM
@Jimmy Still there ? Well... so serverside i assign a StartTimespamp and a EndTimeStamp... i calculate them like i showed above (2 hours ago) ... That worked fine... client side i now calculate the duration between those two timeStamps... and the distance between those two points (start / endpoint distance ) ... than i calculate the entity speed like this : distance / movingDurationInSeconds ...
somehow i get completly different "speed" results... i should mention that i use a different coordinate system client side... but that shouldnt make a difference...
 
uh if the coordinate system is different the speed is likely to be different
unless the systems do not change the scale
 
@Jimmy Well serverside i use a lat/Lng system... and client side the standard unity system... maybe i forgot some sort of stretching...
Till now i generated server side lat/lng pos... and converted them to unity pos client side... but the timestamps and speed are done server side with the other system... maybe theres the iusse
 
there's trig involvd in lat/long to normal coordinates...
actually, nevermind. you can pretend there isn't with some kind of rectilinear projection
 
10:41 PM
@Jimmy Well... i have no idea what i could do now ...
 

« first day (2875 days earlier)      last day (2135 days later) »