« first day (2787 days earlier)      last day (2223 days later) » 

7:22 AM
can anyone give me a crash course on painting character clothing in unity
 
 
3 hours later…
10:06 AM
0
Q: Isometric game graphical rotation and visible to camera rendering

Dion ChapelI've been developing an isometric game in Java and I'm trying to implement map rotation early on. First some background; I've programmed the game with a Chunk() object in mind. When the game starts it creates a 2D integer chunkArray of the Chunk() objects and populates each of their terrainMap'...

Many, the paragraph after the images is a bit too ambitious I think
 
nwp
> I want my game to be a mix of [list of AAA titles] but with [list of improvements and additional features]. How do I do that?
There should be a close reason for that.
 
11:07 AM
@UriPopov you mean painting the textures for a cloth in Unity?
 
 
3 hours later…
2:00 PM
1
Q: Are questions asking to convert TechnologyX to TechnologyY allowed?

Alexandre VaillancourtI've seen a couple of questions pass by in the past asking for help to convert TechnologyX to TechnologyY, for instance: How can I convert this chunk of Direct3D code to the OpenGL equivalent? or: How can I convert an algorithm written in C++ to Java? Are questions like these allowed,...

 
 
1 hour later…
3:29 PM
This may be off topic but not sure where to ask this...Why does .net throw a stackoverflow when you make too many objects that use more memory than the current applications stack? I thought non primatives were stored on the heap? Wouldn't it be heap overflow? always found this confusing...
 
@lambparade There are not many things off-topic here, specially when the chat is not very active :P
As for your question, I don't know. Haven't used .net in ages.
 
nwp
They probably store some reference to the heap object on the stack. At least that's what happens in C++.
 
user4704
3:50 PM
@lambparade I don't know what you mean by "non primitives."
 
user4704
But lots of things are stored on the stack.
 
user4704
Any local variables of value type ("struct"s) will be on the stack.
 
user4704
A stack overflow exception is also generated if you get too deep of a callstack, e.g. due to significant unbounded recursion in your code or something.
 
user4704
For much the same reasons.
 
user4704
Can you clarify the example case you're thinking of?
 
user4704
3:54 PM
A "heap overflow" is usually an OutOfMemoryException.
 
user4704
(e.g., the runtime can't find enough contiguous space)
 
4:42 PM
@JoshPetrie I mean objects as non primitives. To my understanding objects are stored on the heap. The stack overflow exception was from a recursive function. I have it fixed now but I just found wanted to learn more.
 
user4704
@lambparade "Objects" are not stored on the heap.
 
user4704
Objects of reference type are stored on the heap. Objects of value type are stored on the stack (usually).
 
user4704
Anything that is a value type (a struct) is stored on the stack if it's a local variable.
 
@JoshPetrie So if I have an Object(Soda) and it has a name(string). That objects reference is on the heap and the string within the object is on the stack?
 
user4704
string is a class, it's a reference type
 
user4704
4:47 PM
Soda is either a class or struct. Which is it?
 
class
 
user4704
Then it's a reference type, and it's on the heap.
 
user4704
Value types that are members of reference types, e.g., integers within some class, are stored on the heap with the rest of the reference types' memory
 
user4704
But local variables in functions that are value types are on the stack.
 
ohh i see now
my googling could not get me a clear answer
So if Soda references Beverage.id the id is on the heap right?
 
user4704
4:50 PM
What do you mean by "reference?"
 
like i have a function to pull the name. getbeverageid(). and beverage is a class.
 
are you sure it's not recurisvely exploding and getting you a stack overflow
 
the revursive function was just bad and not needed. I was doing it as a learning experiment testing speeds of functions with and without recursion
 
user4704
You're not using clear terminology.
 
user4704
Try providing a code sample, maybe, of the scenario you're describing with Soda and Beverage.ID
 
4:52 PM
I just mean that 77.45% of the time when you stack overflow, it's because you accidentally recursively looped
and not because you ran out of stack space
 
user4704
that's the main way you get a stackoverflowexception in C#; you can't generally cause one within two points of a given function, since the space for all locals on the stack is allocated up-front when the method is entered.
 
user4704
So you can only generally run out of stack space when calling a function, and the stack is generally large enough that recursion is the only way to get a call stack deep enough.
 
@lambparade take a look at the call stack when it throws
 
5:06 PM
? all I see is (removed)
 
twas a failed attempt to type in a block of code I think
 
:43583169 Class Soda(){
string SodaId;
Beverage _beverage;
   public Soda(Beverage theBeverage)
   {
      SodaId = theBeverage.Id;
   }
}

Class Beverage(){
string ID {get;set;}

   public Beverage()
   {
   ID = "Coke";
   }

}
I'm trying to understand what things in this code are on the heap and what things on the stack in memory
 
if your function main is static void Main() { var b = new Beverage(), var s = new Soda(b); }, then there are 2 pointers on the stack
on the heap, there is one Soda instance that has a body 2 pointers large (ignoring the fact that all objects have a header that takes up some overhead), and one Beverage intance that has a body one pointer large. Often there'd be a string object on the stack but in your case it's a static string and is compiled into the intern table.
 
user4704
@lambparade Nothing is on either in that example.
 
user4704
Since you didn't allocate anything.
 
user4704
5:17 PM
If you allocate a Beverage, it will be on the heap (because it's a class).
 
user4704
If you allocate a Soda, it will be on the heap, because it's a class.
 
user4704
"class" means always on the heap. "struct" means on the stack if it's a function local variable, otherwise in the same place as the containing object if it's a member variable.
 
or "inline in the array" if it's an array of structs, which will be on the heap unless you stackalloc a fixed size array
 
So any properties within a class is always on the heap? So the ID properties in the Beverage class is on the head.
 
the entire class instance is on the heap
 
user4704
5:22 PM
The ID is a string.
 
user4704
Strings are classes, not structs.
 
user4704
So they're always on the heap; in that case it does not matter where Soda or Beverage ends up.
 
I think i finally get it now.
thanks for all the help guys
it was hard for me to google this because examples were confusing to me
 
6:04 PM
@StephaneHockenhull uuuuuuuh niiice :D
 
sweet badduino demo dude
 
6:33 PM
Now accepint tips on how to improve the snowfall particle system
 
smaller flakes
and perhaps more depth
for example, I think the effect at shadertoy.com/view/ltfGzn is pretty convincing
 
hmm
I so hate converting shadertoy shaders to unity
 
 
2 hours later…

« first day (2787 days earlier)      last day (2223 days later) »