Timeline for Store and create game objects at positions along terrain
Current License: CC BY-SA 3.0
9 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Aug 13, 2012 at 16:55 | comment | added | OriginalDaemon | The only important part there is the first two paragraphs really. The rest was just to give an idea on how I would solve the same problem. It has a small impact on memory and I can randomly generate it for testing or for game-play. I also thought it suited the situation well as I didn't know how complicated the "objects" in the question would get. | |
Aug 11, 2012 at 7:03 | comment | added | bummzack | Way overcomplicated. Bit shifting and masking are good skills to have but not something that solves every problem. This here seems utterly useless and only adds to the confusion. | |
Jun 11, 2012 at 22:39 | history | edited | OriginalDaemon | CC BY-SA 3.0 |
should have been a uint, and added another way to remove type from id
|
Jun 11, 2012 at 19:38 | comment | added | OriginalDaemon | Even with my edit it's not the most straight forward way of doing this (which is just to use an int array or an array of the types) but this should give you an easy way to generate small files to store things. And since it looks like your learning I figured you'd like an interesting solution. Also, the sample is in C as that was the tools I had available. | |
Jun 11, 2012 at 19:37 | history | edited | OriginalDaemon | CC BY-SA 3.0 |
I have fixed the sample as promised, and I extended it a bit.
|
S Jun 11, 2012 at 16:04 | history | suggested | Nick Badal | CC BY-SA 3.0 |
improved code formatting
|
Jun 11, 2012 at 15:57 | review | Suggested edits | |||
S Jun 11, 2012 at 16:04 | |||||
Jun 11, 2012 at 13:23 | comment | added | OriginalDaemon | Quick note. I will try this out later and correct as needed. I don't have time right now. Unless someone else wants to correct any mistakes for me? I also know that the bit masking thing might be going a bit far, when two ints is also fine, but it's fun. | |
Jun 11, 2012 at 13:22 | history | answered | OriginalDaemon | CC BY-SA 3.0 |