« first day (2864 days earlier)      last day (2146 days later) » 

12:48 AM
Dear Windows 10: I hate you sooo much.
 
 
2 hours later…
2:48 AM
why alexandre?
 
 
8 hours later…
10:24 AM
When i create a new 3d object i place it in the center of my virtual world. What i want to avoid -> when the user creates a other one, then this is also placed in the center. But it should be placed so, that there isnt a collision with existing ones. Need a approach for that.
 
user92578
not sure what you mean?
 
user92578
do you want a circle of items around the center?
 
user92578
or a line of items, first one at center?
 
Exactly...first one in the center and when another one is created its placed around the center so, that there isnt a collision with existing ones. Just a logic to prevent collisions on creating 3d objects.
iam struggling with the approach for the placing
 
user92578
10:46 AM
do you want randomness or a pattern of somekind?
 
i could be random but near the center...not somewhere in the far of the virtual world.
 
user92578
I'd probably just write a routine that generates a random distance and a direction (angle), and repeat that until there are no collisions
 
11:06 AM
o.k. something like locationGenerator()
 
user92578
doesnt mattter what the name is lol
 
it would just return a random translation matrix with that i can feed the transfrom node of to be placed 3d object.....and the check begins again
 
user92578
the downside is that it might take a long time to find one
 
user92578
but if you have a reasonable amount of objects it shouldnt be an issue
 
i dont have so much objects around...
for the randomness i should specify thresholds to keep near to center
 
nwp
11:18 AM
You can also just place the object in the center, pick a random direction and move it in that direction until there is no more collision.
 
user92578
that's also a great approach
 
@cubesnyc It always messes up my language settings. This last time I had to open PowerShell as Administrator and type in commands to fix it. Talk about user friendliness.
 
11:45 AM
@nwp that sounds good
 
12:10 PM
The E3 is coming soon!
 
 
1 hour later…
1:18 PM
@nwp, I tried to implement your solution and it didn't wwork
 
user92578
did you do the one that trusts the center or the one that adjusts the position?
 
user92578
so the one that trusts the center
 
user92578
Contrary to the name and description, this code is not guaranteed to find the smallest sphere encompassing a mesh. As an example, consider 5 vertices located at the positions of the 2, 4, 6, 8, and 9 keys on a numeric keypad. This code will return a sphere centered on the 5 key, encompassing the 1 key as well, when a smaller sphere is available with a center between the 5 & 9 keys. — DMGregory 20 hours ago
 
user92578
1:23 PM
did you see this?
 
user92578
2 days ago, by nwp
I guess what one could do is start with a circle with 0 radius on a vertex, then go through each point and minimallily expand the circle to include that point. That should be easy to implement and always give the correct result.
 
user92578
Did you try this one?
 
no
so what I do is to loop through the vertices,get the first one
I will try write up some code
 
user92578
just wanted to try a brute force solution that is incredibly slow
 
user92578
loop through all positions inside the mesh, and figure out the radius that encompasses all vertices from there, and then pick the smallest one
 
user92578
definitely incredibly slow
 
user92578
of course might be good enough if you'd pick positions on a grid that's sized in a good way
 
user92578
the difference between brute force and your "bad" solution is not very big though
 
user92578
1:52 PM
well, depending on the input it can be really close or a bit further off
 
user92578
 
user92578
green one is brute forced, i.e. the "correct" solution
 
@Tyyppi_77 I cannot see the image
 
user92578
white one is the centered one with max distance calculated
 
user92578
sure the square area gives some bias but I'm like fairly certain that spending time working out an algorithm that gives perfect results in a reasonable time is not worth it
 
user92578
1:59 PM
I wasn't able to get nwp's solution working, I couldn't figure out how to adjust the center properly
 
user92578
what are you trying to accomplish with the sphere anyways?
 
user92578
now I started wondering some sort of division approach would work
 
user92578
first iterate positions in a grid, then narrow down to a specific square that has the smallest distance, repeat until close enough
 
@Tyyppi_77 The code seems to work. It just doesn't return the smallest sphere. I'll use it and fix it as I go along. Thank you
 
user92578
2:16 PM
@TheMaskedRebel yes but what are you trying to accomplish with the smallest sphere?
 
user92578
i.e. why isn't a close enough sphere good enough?
 
@Tyyppi_77 i suppose a close enough sphere is good enough
 
user92578
this probably would've been good to realize two days ago
 
very often in programming (or almost any engineering, for that matter), close enough works
 
user92578
game dev especially
 
2:20 PM
:D
 
0
A: How can I generate the smallest sphere from a mesh?

The Masked RebelHere is what I came up with after some feedback from @nwp. set the radius to 0 set the center to the first vertex. add the radius incrementally to the distance between the first point and each point on the mesh. make sure that the radius add the center incrementally to the radius...

 
user92578
I couldn't get that approach in the answer to work, could you share the code you used?
 
I know this is a silly question, but I'm not sure whether I have to add the position to the center to change the sphere to world space
LOL travel.se has about 2018 pages
@Tyyppi_77 I agree I'm just a sort of perfectionist
 
user92578
2:38 PM
dont worry though, these things happen :)
 
i'm new to gamedev
and stackexchange
 
It's okay - a lot of new gamedevs go through a phase where they want to remake everything from scratch, in the most perfect way (I sure did)
 
I suppose I've learned a lot from this incident eg. make the game and worry about perfection later.
i think that is why lot of published games have bugs
they fix them later
otherwise they would never develop a game.
 
user92578
gamedev is also a lot about choosing & using the right tool for a task
 
@TheMaskedRebel Don't limit it to "games". If Microsoft had waited until there was not bug in their software, they would have died a long time ago.
 
2:48 PM
@AlexandreVaillancourt Speaking of microsoft, they are buying github now
 
@TheMaskedRebel Yep. They realized they'd better buy stuff that works than trying to make it by themselves. (i.e. Codeplex)
 
AFTER 6 HOURS
THE CSS WORKS
 
@AlexandreVaillancourt They missed out on a big opportunity when they didn't go mobile
 
2:52 PM
@UriPopov Accurate.
 
I'm a total noob. I spent 6 hours styling lets say the footer of the footer that has nested css up the ass just so that a Image will verticle align middle with some text on the right
 
Congratulations on slaying that dragon.
 
user92578
nice!
 
@UriPopov is this your first time in this chat room
 
@TheMaskedRebel Windows phone?
 
2:53 PM
@TheMaskedRebel yeah I poped in like yesterday
 
user92578
@TheMaskedRebel no he's an oldie
 
@AlexandreVaillancourt Yes but they were too late they should have done it earlier
 
@TheMaskedRebel Who knows!
Blackberry were there for a long time and are kind of dead.
 
@Tyyppi_77 ya ruined it ! :P
 
2:55 PM
@AlexandreVaillancourt Google and android dominates the world
 
I was about to give up on this bull and just remake the whole website with WebGl in Unity :P
 
user92578
can we see it?
 
@AlexandreVaillancourt microsoft saved themselves by their computers and child restrictions
 
the website ?
 
user92578
yeah!
 
user92578
2:57 PM
no one wants to look at CSS
 
@UriPopov cool :)
 
user92578
have you considered removing the padding around the page content?
 
user92578
I think it would look better without it
 
user92578
remove padding from body and add it into the few places that touch the edges
 
3:03 PM
do we have a business chat room. I searched, but i couldn't see one
 
that padding is like a requirement from my co-founder
 
user92578
well that's stupid
 
idk I kinda like it
 
user92578
it kinda works on the actual content
 
user92578
but the header and footer look odd
 
3:05 PM
well I have not made the original site I'm just making "alterations"
 
@UriPopov Maybe you should put a question to the people visiting the page. ask them to vote on weather they should be padding or not
 
nwp
I'm pretty sure design by democracy ends in disaster.
3
 
@TheMaskedRebel that would go down into the "do it much later" category
 
user92578
@TheMaskedRebel lol i dont think thats a good idea
 
@nwp Might be, I don't know ¯_(ツ)_//¯
 
3:08 PM
@TheMaskedRebel You need to double the \ -> \\
Unless you want to make a Rayman out of that..
 
user92578
hahahahha
 
3:21 PM
we need to remind all the users above 20 rep that there is a chat here and anyone is welcome to use it
 
user92578
no
 
@Tyyppi_77 why
 
user92578
its spam to them
 
@Tyyppi_77 if a moderator says so it might not be so spammy
 
nwp
Also chat doesn't work well with more than 10-ish active people. Look at twitch chat of popular streamers as an example.
 
3:24 PM
@nwp Ah but then it would be good reason to split the chat if more people come
 
user92578
yes but that becomes chaos too
 
user92578
see any large discord server
 
nwp
So besides multiplying the chatrooms nothing would change.
 
@Tyyppi_77 I used to be on one
 
@TheMaskedRebel If it comes to that, we'll be happy to oblige. Chat has a room for c++ questions and a room for c++ users not chatting about c++.
 
3:27 PM
@TheMaskedRebel We mention it when it's relevant - say anytime a comment thread starts getting a bit too involved. Our site format doesn't lend itself super well to passive/background reminders, since it's very content-first.
 
nwp
The other problem is that you lost your expertise. Previously people put answers on semi-searchable pages with a little bit of peer-review. That would no longer be the case and you are back to forums where somewhere in those 1000 page threads that talk about all kinds of stuff is the information you need. One of the primary goals of SO was to fix that.
I do think current Q&A has issues, but I don't think chat can fix them, at least not without something extra.
 
@nwp We should start a chat exchange about fixing these problems
@AlexandreVaillancourt is code reviewing allowed here
 
@TheMaskedRebel Sure, as long as the code is not to big. There are no rules against it that I'm aware of.
 
nwp
Maybe something like a Q&A chain that is not split across pages where context matters but it is still focused on one topic. That way you combine the advantages of focused Q&A and responsive chat. Or the disadvantages.
 
@nwp
@nwp is that the site you were talking about
 
nwp
3:34 PM
@TheMaskedRebel codereview.stackexchange.com exists in case you want it done properlyâ„¢.
@TheMaskedRebel No. It doesn't allow Q&A chains, it doesn't have chat character at all and if one would be really annoying about it one could say it doesn't even allow asking of technical questions.
 
@nwp Then we should probably focus on reforming the meta site instead of cluttering the exchange. That would be more likely to be accepted @AlexandreVaillancourt .
than adding a new exchange
is there a way that you can override that this is fine
 
user92578
that's very cool and all but I could definitely do without these every 30 minutes
 
nwp
I would not hijack meta for a new Q&A site. Maybe letting people specify that a question is a followup question and then displaying those linked questions in 1 page is good enough.
this is fine
aww
 
user92578
​this is fine
 
user92578
hahaaa!
 
nwp
3:44 PM
@Tyyppi_77 Did you use a proper zero-width space?
 
nwp
Nice. A regular space works too btw :P
 
user92578
oh lol
 
	public CollsionInfo isColliding(Sphere sphere) {
		Vector3f normal = Vector3f.sub(center, sphere.getCenter(), null);

		float depth = radius + sphere.radius;

		if(!(normal.length() < depth)) return null;
		normal.normalise();
		if(!entity.isStaticObject()) {
			CollsionInfo info = new CollsionInfo(normal,depth,entity);
			return info;
		}else if(!sphere.getEntity().isStaticObject()){
			normal.negate();
			CollsionInfo info = new CollsionInfo(normal,-depth,sphere.entity);
			return info;
		}
		return null;
 
user92578
i guess the meme stuff happens before sanitization
 
user92578
3:45 PM
sanitiation?
 
user92578
sanitiziation?
 
Can someone revew my code
 
user92578
to sanitize is the verb
 
user92578
CollsionInfo
 
user92578
dunno what we are supposed to review there
 
nwp
3:47 PM
Tabs vs spaces
 
user92578
what is the third parameter to sub?
 
user92578
also java is awful, i cant believe so many people use a language without operator overloading for gamedev
 
@Tyyppi_77 I know c++ is way better but they are a load of libaries that port c++ code into java and he made and released two whole games in java
 
nwp
CollsionInfo info = new CollsionInfo(normal,depth,entity);
return info;
That doesn't look right.
I'm fairly sure Java doesn't require you to type the type twice anymore.
 
user92578
@TheMaskedRebel i know a lot of people use java like I said
 
nwp
3:53 PM
Also you can just skip creating info and return directly.
 
@nwp thanks
 
I'd ensure your variables accurately reflect what they are. eg. normal isn't a normal (yet) when you define it.
 
user92578
@nwp There is no var or auto in Java AFAIK if that's what you meant?
 
Vector3f relativePosition = Vector3f.sub(center, sphere.getCenter());
Vector3f normal = Vector3f.normalize(relativePosition);
float distance = Vector3f.dot(normal, relativePosition);
 
@Tyyppi_77 NOPE
 
user92578
3:54 PM
seriously though, what is the third parameter to sub?
 
@Tyyppi_77 null
 
And I'd avoid unnecessary negations. if(!(normal.length() < depth)) return null; could be...
if(distance > depth)
   return null;
 
user92578
are you serious with that answer???
 
user92578
I CAN SEE THAT IT IS NULL
 
@Tyyppi_77 yes
 
3:55 PM
Fewer cognitive twists required to read it that way.
 
user92578
okay let me try again
 
user92578
what does the third parameter represent?
 
user92578
I view subtraction as a binary operation between two elements
 
@Tyyppi_77 it repersents the destination of the subtraction of the two elements
 
Ah, so if you pass null it returns a new Vector3f, right?
 
nwp
3:57 PM
@DMGregory That's tricky. Can't name it will_become_normal_later because that's not true after normalizing it anymore either.
 
user92578
OMG java doesnt even have default parameters
 
@nwp Right, that's why in my example I call it relativePosition, because that's what it is. Then normal can be defined based on that.
Or you could make a function that produces a unit vector & distance given two endpoints if you want to do it in one step without explicit intermediates.
 
@Tyyppi_77 it returns a Vector3f weather you pass null or not. If you pass a vector it will store the return value in the Vector3f you pass in AND return the result.
 
nwp
@Tyyppi_77 I could have sworn there was something like that in newer versions, but apparently I'm wrong.
 
@TheMaskedRebel (the key word there was "new")
 
4:03 PM
@nwp apparently lwjgl had it in older versions but the removed it in newer versions.
 
user92578
@TheMaskedRebel how is that possible?
 
@Tyyppi_77 In java if you want to return something you HAVE to return it under ALL conditions.
 
user92578
no how can LWJGL implement something that isn't in the actual language that LWJGL runs under?
 
user92578
how did LWJGL implement an automatic type deduction keyword into Java?
 
@Tyyppi_77 What is that
 
nwp
4:06 PM
Something like Node<Integer> node = new Node<>(); compiles in more recent versions, I think. I don't really know Java.
 
user92578
@TheMaskedRebel you said that LWJGL had that previously?
 
user92578
12 mins ago, by Tyyppi_77
@nwp There is no var or auto in Java AFAIK if that's what you meant?
 
user92578
I said that
 
user92578
5 mins ago, by nwp
@Tyyppi_77 I could have sworn there was something like that in newer versions, but apparently I'm wrong.
 
user92578
nwp replied that
 
user92578
4:07 PM
3 mins ago, by The Masked Rebel
@nwp apparently lwjgl had it in older versions but the removed it in newer versions.
 
user92578
then you said that
 
@Tyyppi_77 No I was talking about unit vectors
sorry for the misunderstanding
 
user92578
omfg
 
@Tyyppi_77 lwjgl doesnt have any multiplication and division
functions
 
user92578
yes it does
 
4:10 PM
@Tyyppi_77 Where
 
user92578
scale
 
@Tyyppi_77 is that division
 
user92578
it multiplies by scalar which can be easily used for division too
 
user92578
vector * vector isn't cleanly defined anyways
 
user92578
(all though I always implement that to mean component wise multiplication)
 
4:11 PM
@DMGregory sorry your code snippit doesn't work for lwjgl3
 
@TheMaskedRebel This isn't intended for copy-and-paste. It's an example of an approach to naming.
 
user92578
you're one of those people who complain about pseudo code not compiling, aren't you?
 
@DMGregory Ah I see. But I meant that the functions you used are non-existant and because java is OOP that is a very big problem
@Tyyppi_77 Yes i am
 
user92578
@TheMaskedRebel very big problem?
 
user92578
@TheMaskedRebel please dont be in the future
 
4:16 PM
@Tyyppi_77 There is now way that i can normalize the relative position without changing the depth position
 
Then you use functions that do exist, or write your own if none exist that do what you want (though I'd be very surprised if lwjgl3 lacks functions for normalizing or taking dot products)
@TheMaskedRebel Sure there is. One moment...
distance = relativePosition.length()
normal = scale(relativePosition, 1/distance)
 
thanks
@Tyyppi_77 psudo-code is not meant to compile
 
user92578
also code that people give you online to help you is not meant to compile
 
There's usually about a dozen ways to skin any given cat with vector math, so when one route gets messy in a given framework we can switch to another. :)
 
Did I ever show you guys what happens when a dissolve shader goes wrong ? imgur.com/a/f5VMW9s
 
@DMGregory 200% agree. People I work with still wonder why I lol 30% of the time I write shaders.
 
is there a way that i can port a game written in java using lwjgl to a console
 
also game is now with fancy volumetric clouds imgur.com/a/bgHAKjc
 
@UriPopov Next time when posting images on this site please may you use this. They you can post raw images in the chat
 
@TheMaskedRebel There's nothing fundamentally impossible about it. Porting is just a matter of how much patience (/budget) you have to rewrite stuff. You could port a program from BrainF*** to Xbox if you had enough reason to...
 
4:35 PM
@TheMaskedRebel you mean the buld in upload button? Cant cause the screenshot exceeds the file limit.
 
@DMGregory So you have to rewrite the whole game in xbox language
 
user92578
yes but do note that the xbox language is very hard
 
xbox language XD
 
user92578
I tried to learn the xbox language years ago but it was just too hard
 
user92578
first of all you are not allowed to use the letters P or S at all
 
4:37 PM
@Tyyppi_77 Kidding or not
 
Not to mention N I T E D O
@TheMaskedRebel we are kidding cause there is no such thing as a xbox language
 
I think maybe you shouldn't troll the new devs too much. ;) They might believe you.
 
@DMGregory So how do I port the game
 
user92578
I only troll when the stuff can be easily looked up online
 
user92578
Microsoft probably won't allow you to run a JVM on a console so you'd need to retarget it into Universal Window Platform or whatever the thing is called somehow, probably by using C++ or C#
 
4:39 PM
There's not really a simple recipe or step-by-step guide for porting. It tends to be very particular to the game you're porting, and the tech you're porting it to.
That's why people spend money for engines that have already solved most of the thorny cross-platform porting problems.
 
@Tyyppi_77 SO I have to rewite the whole thing in c++
or c#
 
So, the easiest answer would be to (re)build your game in a cross-platform engine.
 
@TheMaskedRebel best scenario would be to use a existing engine like Unreal or Unity and recreate the game in there while reusing the "logic" of the game
is XNA still in use or ?
 
is there a console I can run java code on
 
I answered a question relevant to this recently...
0
A: JVM for PS4 Console

DMGregoryIn the interest of giving this question a concrete answer: There's no fundamental/technical limitation that would prevent a Java virtual machine or any other program from being developed/ported to run on a modern game console. They're general-purpose computers, so in principle anything that you ...

 
user92578
4:42 PM
the steam consoles might
 
user92578
@UriPopov MonoGame/FNA
 
@TheMaskedRebel the OUYA for sure
Nvidia's Shield too
@TheMaskedRebel or the better alternative. Stop using java today. Just stop it. Get some help.
 
C# is very similar to Java, and transpilers like IL2CPP have a proven track record of helping C# games run on platforms that don't support the CLR.
 
user92578
 
@UriPopov maybe I could compile the code and then port it
 
user92578
4:46 PM
what
 
compile the code from java into machine language an then port it.
 
Java doesn't exactly compile to machine language. At least, not for a physical machine. It compiles to bytecode for the Java virtual machine.
 
user92578
there might be tools that translated JVM instructions to some other machine code
 
user92578
but that would still leave the issue with libraries etc
 
@Tyyppi_77 lwjgl runs in c++ not java
 
user92578
4:49 PM
ugh
 
user92578
anyone else wanna take this?
 
user92578
ive kinda had enough
 
it uses .DLL instructions to run
 
@Tyyppi_77 Fair. I think they'd still end up reimplementing a whole chunk of the JVM in addition to the game, rather than focusing on the game itself. I don't think this is the most scalable direction to take a project.
 
user92578
yeah definitely, I was not intending to suggest that as a realistic approach
 
4:52 PM
@DMGregory I'll just leave my game to run on windows :/
 
user92578
I don't really feel like code converters work in general at all lol, shader code seems sort of like a reasonable line where to stop IMO
 
or get someone else to do the dirty work
 
user92578
Java games even on Windows are annoying because they require Java installation
 
@TheMaskedRebel just like remake the whole game in Unity and automagicaly build to what ever the f you want. This will spare you a whole bunch of trouble
 
@Tyyppi_77 Most times on Microsoft java comes already installed because of that reason alone.
and also because of minecraft
 
user92578
4:55 PM
wait are you claiming that windows comes with a java installation?
 
but Microsoft actually completely remade Minecraft for the Xbox
 
@Tyyppi_77 Sometimes
 
I know that for a fact
 
user92578
no way that's true
 
For where you are in your gamedev experience, I'd really recommend starting with an established engine. There's no shame in using existing, proven solutions, and you'll learn a lot from how a battle-tested gamedev environment structures its features, while spending less time hung up on low-level prerequisites.
 
user92578
4:56 PM
The Minecraft version for Windows 10 is also written in C++
 
^^^
 
user92578
The version that everyone plays though is called like "Java Edition" or something these days
 
you can do Minecraft in Unity for like a week
 
@UriPopov ...I'd still aim much much smaller than Minecraft while they're learning. Minecraft has a lot more complexity than meets the eye, and can be a serious trap for beginner developers.
Just thinking of how many Q&As we have about "I tried to make a 'simple' Minecraft world by spawning eleventy billion cubes and my performance is terrible!" ;)
 
@DMGregory I meant that if you can recreate Minecraft in Unity in a week it would be ok to start recreating his java game in it. Cause it's fast to learn and use.
 
5:00 PM
Fair point.
 
@DMGregory this ...is the type of game that I'm aiming for.
 
Start smaller. Seriously. Tic-Tac-Toe, Tetris, Breakout. You'll have time for your opus later.
 
@TheMaskedRebel wait so you have something like that made in jave or you are just beggining gamedev now and want to learn ?
 
@UriPopov I made a smaller game before
 
How smaller ?
 
5:03 PM
a hitbox game. Very basic.
And I made a snake game ages ago in python
and a text based game in batch.
 
well my advice then is ditch this whole going native idea and learn a game engine. Pick Unity or Unreal (doesnt really matter, I prefer Unity), follow the tutorials, understand how to use the tool and then begin making your game
 
^
 
@UriPopov Alright I will just make a windows based game then
I am doing pretty well
 
you seem to be missing the whole point. When you use a established multi-platform engine you make your game once and then with slight very small (cough cough) adjustments you can run it anywhere.
 
yeah, depends on which platforms and what you're doing, but Cognizer presented minimal issues with different platforms.
 
5:07 PM
imgur.com/a/plEPXws One more pretty picture I'm sharing
 
biggest one was the need for back button support on Android, but that ended up being useful for esc button support on OSX/Linux/Windows
 
Also I can make my game cross-platform for android
 
what exactly do you mean by cross-platform for android ?
@Almo good old #if UNITY_STANDALONE_WIN #elseif UNITY_ANDROID #endif :D :D :D
 
I mean that iOS doesn't have a back button
I wrote the game for iOS first, then worried about android.
so I had to slot in a back button
 
@UriPopov After a few adjustments I can also make my game compatible for android
 
5:10 PM
BTW fuck the android back button. implemented in all sorts of different goofy ways by different devs. :/
 
5:21 PM
@UriPopov So pretty.... :)
 
@Tyyppi_77 so the scale function works like this: s * vector.x s * vector.y s * vector.z
 
5:50 PM
How do I get the x-axis of a sphere
 
 
2 hours later…
7:59 PM
@TheMaskedRebel Can you describe what you mean by that?
You want its extents along the x axis, or a great circle around the sphere (horizontally?), or its scale factor along the x axis, or something else?
 
 
2 hours later…
user92578
9:45 PM
cmon, x-axis of a sphere is standard terminology :DDD
 

« first day (2864 days earlier)      last day (2146 days later) »