Mikea15

Members
  • Content count

    10
  • Joined

  • Last visited

Community Reputation

276 Neutral

About Mikea15

  • Rank
    Member

Personal Information

  1. Hi guys!   I am releasing SuperStems in a couple of weeks, and I've made available a demo web build for people to try out and give me honest feedback. I'm currently polishing gameplay and other aspects of the game, such as sound and UI. If you feel you can help out, feel free to contact me.     You can test the game on itch.io   Thank you.
  2. #gamedev #unity3d #indiedev I need computer graphics books. Send me options please. I’m interested in the math, to create awesome shaders!
  3. Let there be #shaders !! #gamedev #indiedev #unity3d .. Now comes the fun part.. :) Game dev.. :p http://t.co/3rQ0iZJu34
  4. Diving hard into Shader programming with #unity3d . samples coming soon :) #gamedev
  5. fellow #gamedev !! want to learn #objectivec ?? here's #book you might enjoy http://t.co/enlrqMqx34 . I helped review it. :) #Programming
  6. Funny source code/documentation/comments?

    I guess.. double d = 0.0d; // lols.. double d's.. :)
  7. So I guess, I would have to re-think on how much control those classes provide. Thank you :)
  8. #csharp constructor chaining order solved. http://t.co/ujBOEUdO4z Check out the thread #gamedev #indiegamedev #indiedev
  9. Okay, so there is no "best way" to do it. That's what I wanted to know.   Thanks for the feedback.   Edit: To get a better view. Here's the main difference with another class. public X( ) { Left = 0; Right = 0; BreakLeft = false; BreakRight = false; BreakTime = 0; } public X(int speed) : this( ) { Left = speed; Right = speed; } public X(int left, int right) : this( ) { Left = left; Right = right; } public X(int left, int right, int time, bool breakWheel) { Left = left; Right = right; BreakLeft = breakWheel; BreakRight = breakWheel; BreakTime = time; } public X(int left, int right, int time, bool breakLeft, bool breakRight) { Left = left; Right = right; BreakLeft = breakLeft; BreakRight = breakRight; BreakTime = time; } And Method 2: public X( ) : this( 0 ) { } public X(int speed) : this( speed, speed ) { } public X(int left, int right) : this( left, right, 0, false ) { } public X(int left, int right, int time, bool breakWheel) : this( left, right, time, breakWheel, breakWheel ) { } public X(int left, int right, int time, bool breakLeft, bool breakRight) { Left = left; Right = right; BreakLeft = breakLeft; BreakRight = breakRight; BreakTime = time; } For this particular case. This is the better approach. It has less code, Its easier to maintain and is cleaner.
  10. Hello.   So I've been dwelling on this topic today. Which is, which way do you want to chain your constructor.   Say you have a basic BaseMap class. public class BaseMap { protected int _height; protected int _width; protected Node[,] _map; public BaseMap() { _width = 0; _height = 0; _map = null; } public BaseMap(int width, int height) { _width = width; _height = height; _map = new Node[_width, _height]; for (int x = 0; x < _width; x++) { for (int y = 0; y < _height; y++) { _map[x, y] = new Node(x, y); } } } } Now my question is, how you chain the constructors? So far, I've been chaining them this way: public class BaseMap { protected int _height; protected int _width; protected Node[,] _map; public BaseMap() { _width = 0; _height = 0; _map = null; } public BaseMap(int width, int height) : this( ) { _width = width; _height = height; _map = new Node[_width, _height]; for (int x = 0; x < _width; x++) { for (int y = 0; y < _height; y++) { _map[x, y] = new Node(x, y); } } } } But I've searched online and found people where chaining the other way around. Like this: public class BaseMap { protected int _height; protected int _width; protected Node[,] _map; public BaseMap() : this( 10, 10 ) // default values { } public BaseMap(int width, int height) { _width = width; _height = height; _map = new Node[_width, _height]; for (int x = 0; x < _width; x++) { for (int y = 0; y < _height; y++) { _map[x, y] = new Node(x, y); } } } } So, from what I understand, people are instantiating with default values, when calling the default constructor, leaving it empty. My Approach was to start with the constructors with parameters, and call this( ) to instantiate variables, before getting into the parameter constructor's body. This particular example isn't the most obvious tho, but say you have a node with edges. public Node( ) { Adjacents = new List<Node>(); State = EnumNodeState.UNKNOWN; } public Node( int x, int y ) : this( ) { PosX = x; PosY = y; } This makes sense, right? I instantiate the List and state, then define position, when calling Node( 10 , 10 ); Is it 'better' to do it the other way around?   Thanks.
  11. Woo! 65K #Unity3d vertice limit fixed :) Highlighted area is 125x125x4 vertices ( 62500 ). #gamedev #indiedev http://t.co/gylUGQyMCL