« first day (2862 days earlier)      last day (2159 days later) » 

11:48 AM
Looks like this room has really dried up
 
11:58 AM
Yep
 
@genaray Do you have any experience with collision detection
 
user92578
we used to have a very lively room but then stuff happened
 
@Tyyppi_77 What happened
 
Well... only regarding 2D collision detection...
 
user92578
moderation changes, that's all im gonna say
 
12:03 PM
@Tyyppi_77 I see
 
12:21 PM
Does anyone know how to define the radius of an object defined min, max
 
user92578
what? the radius? as in some sort of circle?
 
The radius of a sphere
 
user92578
do you want the smallest circle that fits inside or the smallest one that contains the whole object?
 
@Tyyppi_77 The smallest one that contains the whole object
in 3D, of course
 
user92578
center is at (min + max) / 2
 
user92578
12:25 PM
calculate the distances from center to each corner, largest one is your radius
 
so radius is min . max
@Tyyppi_77 is this for 2D or 3D, or is it applicable to both
 
user92578
obviously works for both
 
user92578
@TheMaskedRebel what is this supposed to denote?
 
@Tyyppi_77 the dot product of min and max
 
user92578
well that's definitely not the radius
 
nwp
12:29 PM
I think finding the smallest circle/sphere that encompasses an object is not trivial at all.
 
user92578
oh right yeah my bad I was thinking about the smallest sphere that encompasses the box that encompasses the object
 
nwp
In practice you can probably just take the width, half that and put your circle there and ignore that some of the object is outside the circle.
If you have a polygon you can probably find the longest distance between any 2 points to get a perfect circle/sphere. You can cache the result so it doesn't affect runtime.
 
user92578
but if it's defined like you said, as a min and max then all you can do is encompass the box defined by them
 
nwp
Actually my solution wouldn't work for an equilateral triangle.
 
@nwp That is what I want to do. How would I do that
 
nwp
12:36 PM
@TheMaskedRebel Uhm... you just do it. Go through the list of vertexes, calculate the distance, remember the pair with the greatest distance. It doesn't give you the correct result though.
 
@nwp Sounds pretty pricey. Is there any short cuts
 
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
@TheMaskedRebel he already said you can cache it
 
nwp
While I like to pretend minimallily is a real word, what is the correct grammar here?
 
user92578
12:40 PM
minimally?
 
incrementally?
 
user92578
@nwp wait but where does the center lie?
 
nwp
@Tyyppi_77 You calculate that. Initially it lies on the first vertex, then it lies between the first and second vertex and then the minimal expansion increases the radius and moves the center so that it includes the new vertex while not reducing the covered area.
 
user92578
ah
 
user92578
that makes sense
 
nwp
12:45 PM
I think you move the old center by half the amount of the radius increase in direction of the new vertex every time.
 
user92578
yup
 
nwp
Except then calculating the radius increase would be non-trivial... but there is probably a solution for that too.
Set the new center between the new vertex and the point on the other side of the center that crosses the circle, then increase the radius by whatever is required to encompass both. While that makes sense in my head right now I realize it's super confusing :P
Easy to unit-test though, so it should be fine.
Not sure if accumulated rounding errors would cause an issue, but I guess one could go through the list twice to get most of that out.
 
2
A: How to generate AABB, OBB & Sphere from polygon soup

MichaelHouseIterate through your soup and collect the following information: Per vertex: Maximum and Minimum x, y and z values Something like: for each polygon in soup for each vertex in polygon if vertex.x > maxX maxX = vertex.x if vertex.x < minX minX = vert...

 
user92578
That will definitely get you a bounding sphere, though not necessarily the smallest one. If you want to get fancy, have a look at en.wikipedia.org/wiki/Smallest-circle_problemIncredulous Monk Nov 20 '13 at 23:30
 
0
Q: Generating the smallest sphere from a mesh

The Masked RebelI have a polygon which is defined by a set of vertices and I need the smallest sphere encompassing the mesh. The spheres are defined by a position vector(x,y,z) and a floating point integer radius. How can I generate the smallest sphere encompassing the mesh.

@Tyyppi_77 @nwp If you feel it can be improved, please notify me with feedback
 
nwp
12:59 PM
@TheMaskedRebel Why did you ask the question when you already know the answer?
 
user92578
what can be improved?
 
instead of down voting it
 
user92578
why wasn't the answers we gave here enough?
 
user92578
seems kinda rude
 
nwp
If I had enough rep on game-dev I'd immediately close it as a dupe of "How to generate AABB, OBB & Sphere from polygon soup".
 
user92578
 
4:56 PM
i want to flag all nodes that collide with an selected one to react on that further on runtime without doing a collision test again. would you flag also the selected one or only the others?
 
I could need some logical help right here... Theres a global Map<> which stores all loaded monsters. First i generate the monster near the player. I put them into a Array list and open a new thread. This thread loops once over the monster to spawn them in, if they arent avaible in the global map<>.
Futhermore the threads loops over his own list every second to update the monster and check if any player is in range. If the monster is dead or there isnt any player in range, i remove it from the thread list and the global Map<>.
 
5:13 PM
@AlexandreVaillancourt that's going to be unsalvagable.
in my opinion
 
Hello I am a very unexperienced coder however I know a little about Python however I read that Python isn't supported for unity. I want to create a C#/Python text based rogue-like. If I do that (which I probably won't) can I port it to unity and then can it play on Nintendo Switch + XBOX etc. Many Thanks.
 
Hi PintOfMilk - what do you mean by text-based rogue-like?
 
If by "port it to Unity" you mean "rewrite substantial parts of it in Unity" then yes.
 
if it relies on console IO, you'll have to do a lot of work to adapt it to Unity's model
 
Most of your update loop / event-response logic, input handling, and rendering will need to be fairly Unity specific.
 
5:23 PM
this gives me an idea to write a virtual terminal for Unity... I wonder if someone's already done that
 
@Jimmy A text based roguelike game. A bit like: upload.wikimedia.org/wikipedia/commons/thumb/0/00/…
 
If you do your text composition in C# and keep it fairly modular, then you should be able to call into that from your Unity update/event logic without major changes.
 
@PintOfMilk I mean, are you using something like "print" or curses in Python to generate your screens (difficult to port to Unity) or using an existing game framework like Pygame (easier to port to Unity
)
 
@Jimmy I think that would be a very worthwhile Unity asset. :) Emulating text mode rendering is probably the trickiest part for new users, so if you can take care of that for them I think you'd have demand for it.
 
I was going to use a print function yes. Also possible the input() function @Jimmy
 
5:26 PM
then it will be very hard to port
 
:(
Could you port it to JS or something and then port it to unity?
 
That's effectively the same problem, but now in a messier language.
 
what would that accomplish?
The easiest possible thing is to just write it in Unity from the beginning
not that Text-based interfaces in Unity are as easy as print() to console
 
Now you've got me wondering about emulating a console Print() in Unity, keeping a character buffer then translating it to a texture for rendering...
 
I mean, it doesn't seem that difficult honestly :)
famous last words though
 
5:30 PM
Interesting. Could you also do input() hypothetically?
 
Few things are impossible. It wouldn't be trivial, but I think you could emulate that behaviour with Coroutines.
 
Coroutine all the things
That's actually one of the things I'm working on in my compiler
 
Also, note that for actually running on Nintendo Switch / Xbox One / etc. you'll need to register as a developer with Nintendo / Microsoft respectively, and meet their certification requirements before releasing.
 
does the switch have a keyboard?
 
nwp
5:34 PM
Why can't you simply make a text window in unity and leave the rest of the game the same?
 
how did you propose to port input() to the Switch?
 
Well you could use the arrow keys to choose each character like a pie menu.
 
nwp
Do you have to type? Can't you just select options?
No modern rogue-like makes you type text.
Except maybe for the player name.
 
that seems like it would defeat the "can I write a game in Python with input() and print() and have it run on Switch/XBox via Unity?"
 
The player name is the only thing I think. It will be based on a rogue-like game
@Jimmy true.
 
nwp
5:37 PM
@Jimmy Why is that?
 
@nwp You can, but it has the same problem as any phrase beginning "Why can't you simply...." in games. ie. it's not quite as simple as the phrase suggests. ;)
 
nwp
@DMGregory Well, if you fail to make a text window or can't write a function that writes to it in python then you are completely screwed anyway.
Actually probably doesn't even need to be in python.
 
No argument there. I think in games we spend a lot of our time completely screwed. :)
Coming back to your original point, @PintOfMilk, if your ultimate target is Unity, I think you'll have an overall better time building it in Unity from the start. Porting is rarely clean or fun.
 
@DMGregory what about c#?
 
The porting is not impossible by any means, just unnecessary complexity you'd be better off without if you can avoid it.
C# is pretty good, I think. :) (I'm biased since I do most of my coding in it)
 
5:43 PM
Imagine I make a C# game. Can't unity just load the scripts because it support c#?
 
well, the scripts can load
but Unity will not have a Console that you're printing and reading lines from
not one that's visible at runtime anyways
 
The text can? (Also does it support courier new?) But couldn't you have a black background etc
 
yes, Unity has text boxes and text fields
that you can customize the appearance of
so you'd most likely be using those
 
so make the game and just put it all in a text box
and ask a friend to map the arrow keys to button presses
 
yes
 
5:46 PM
So I can do it!
 
@PintOfMilk If you're comfortable enough to write your game code in C#, you shouldn't have any particular difficulty writing the input handling code in Unity - no need to recruit a friend.
 
So 1. learn C# 2. make game 3. publish it on unity
 
yes
 
Just as a sidenote to most computers support c# for browser / .exe files?
 
yes (with caveats)
the user needs the runtime installed
but Unity handles that for you
 
5:48 PM
oh ok
 
when you build for different targets
 
@PintOfMilk I'd amend it to.... 1. Learn C#, 2. Learn Unity, 3. Make game in Unity, 4. Register as a developer for your chosen publishing platforms, 5. Publish game
With the note that every one of those steps is more complicated than it looks. ;)
 
Will this be one of the first C# text rogue-games?
 
No.
 
5:55 PM
Thanks for asking my questions! Just one final one. Where can I code c#? Should I do it online. (Also I don't really want to download any program because it is a shared computer) I have powerpoint edexcel etc etc.
 
Any C# tools & compilers I know of need to be installed. You might be able to run Visual Studio or MonoDevelop off of a thumbdrive though - I haven't tried this myself.
You'll need .Net runtimes of course, but if you're on Windows these come as part of the OS.
 
if you use Unity, I can't think of any way other than installing Unity
no idea if it runs off a thumbdrive
 
Thanks. I am confused now. If I make the game separately but then change for unity it will take like under 5 minutes right?
 
6:10 PM
NO.
It will be a significant amount of effort. Depending on how quickly you pick up Unity, it might take you days or weeks.
Never underestimate a port, even when it seems like it should be simple in principle.
 
What if I know someone who knows unity and I ask them?
 
Then allow time for them to learn your codebase, break it a few times, hit a problem they've never solved before, ask for help, figure it out, break something else...
It might take them days or weeks. If it happens faster, celebrate your good fortune and your friend's l33t skillz, but do not count on it or budget on that assumption.
 
What if my all of my key detects at the start?
 
Unity isn't just a wrapper that takes a working C# program and glues it to a console. It's a complete system for working with input, updates, and rendering. Taking your game apart and putting it back together in the context of Unity is not going to be a 5-minute thing.
 
nwp
Don't worry about porting actually. Just make the game in whatever you find most convenient.
 
6:17 PM
so just make it python ?
Actually I think I'll do it in C#
because I can learn
 
If that's what you like developing in, go for it. :)
 
I do silly stuff with code. For an entire year I create a RPG game on a kids programming language.
 
If you want to make a game, make it, ignore what you make it in.
3
if you want to learn to make games in a particular system, then do that.
set a goal, achieve it
which is more important: making a crossplatform game in unity, or making a game?
if it's "making a game" then make it in whatever system you feel most comfortable with
being cross platform was one of the core goals in making Cognizer, since i've already made many games before. So it was my first release in Unity.
made adapting it to Steam from iOS/Android quite easy
 
Nice
Is it free?
 
yes
 
6:21 PM
@Almo Is it a tile-matching game?
 
when I made Crystal Shuffle for Ubisoft, I had not made a mobile game personally before, so I used Cocos2d and native Objective-C. meant it could only be iOS, but the goal was to make a phone game, so it worked great. But would have been a bear to port to android.
nope, not a tile-matching game
 
seeing it now
Interesting although I wasn't very good at it.
 
nobody is
it's very, very hard
 
6:42 PM
I wonder why?
 
The simple answer is "i designed it to have short sessions since it's a mobile game"
the procedural level generator combined with the time limit makes it challenging
Speed Expert has simple rules, but the timer is 6 seconds and gets shorter each level after level 10
that's very hard
 
On procedural generation, if I create a rogue like but there is no proceduaral generation only random enemies and there is no permadeath what style of game is it?
 
dungeon crawler maybe? depends a lot on what the focus of the game is
if it's story-heavy, maybe it's an adventure, or RPG
 
ASCII though
 
yeah
 
6:47 PM
I can just think of how hard it will be to code.
 
have you programmed anything yet?
 
ok then don't do a complex game like that first
program something simple, like tic tac toe.
 
Do you think I should just do it on python and then on c#
 
the game's not fun, but you'll learn a ton about programming
 
6:48 PM
ok
 
you learn input, display, rules logic, etc
 
Heard of 2048? Tried do it on python with letter but that was hard
 
yes i know that game
starting with 2048 is not a bad idea, either. its mechanics are fairly simple, and the board state isn't complicated
 
I was thinking maybe just one room
Should I do it on python -> C# -> unity
 
no
there's no reason to use unity as far as I can tell
 
6:55 PM
ok
 
unless you want cross-platform
 
but if I do on python then a few people can see it
 
but you're gonna have a lot of trouble making a text game in unity, as others have said
 
so I do it on c#
 
the number one final objective should be "to finish a game"
 
6:56 PM
finish a game on python
 
don't let tech considerations get in your way
 
then do it on c#
 
 
2 hours later…
8:32 PM
Unity isnt really a good choice to make a text based game... First of all the actuall executable will be extremly big in size. And you need to code some console like text representation yourself. Its much easier using c# and just a console window
Otherwise if you do a game like 2048 unity is a better way to go. The representation of UI elements and sprites is very simple
 
I'm only interested in creating a roguelike game. I was thinking of using C# and trying to port it to unity.
 
A text based roguelike game ?
 
Like nethack
 
Something like this is very complicated to do in unity... Unity was designed for graphical 3d and 2d games... if you want a console like this you should go with plain c#
 
That's what I'm trying to do and then copying it to unity
 
8:42 PM
But whats the meaning of doing so ?
Do you really need the unity framework ?
 
No but Unity can port to a lot of stuff
 
what about frameworks ? You could also use them to make your game portable
*cross platform
 
I'll look at that interesting what is a framework? We were debating if you could get python to run on unity.
 
Google is your friend. Framework is some kind of toolbox. It gives you many different tools which will make the development much easier for you. For example a famous java framework is "LIBGDX" which is quity cool. But there also game frameworks for c#
 
I don't think C# can port to Nintendo Switxh
But C#>Unity>World
 
9:30 PM
@Almo Unless they add a lot of details.
 
yeah a lot
@PintOfMilk Unity builds for Switch
Do your research on things. Don't just go by "I think ____".
 
@PintOfMilk I'm confused about doing a text based roguelike targeted for a console. There are no keyboards on consoles, generally.
 
user92578
9:56 PM
I'd also suggest forgetting about publishing your first game, a text based roguelike, on a console
 
10:23 PM
I assumed they meant using text-mode rendering as an aesthetic, while still controlling & rendering spatially (ie. not "It is dark here. You are likely to be eaten by a Grue. Possible exits are North, West, and Dennis" "Go north")
 

« first day (2862 days earlier)      last day (2159 days later) »