Jump to content

  • Log In with Google      Sign In   
  • Create Account


leeor_net

Member Since 05 Apr 2004
Offline Last Active Mar 18 2014 01:11 PM

Posts I've Made

In Topic: Why XML is all the rage now?

07 August 2013 - 10:07 AM

Would like to throw my two cents in here as well.

 

I understand that people may not be crazy about XML and it was used, overused and abused to no end for many, many years. But, I personally find it a very useful format for encoding basic data that doesn't need to be in binary and is never really intended to be sent over a network. Effectively I use it to define animation states and object properties in games. I also use it to great effect for localization strings.

 

I find JSON problematic for these cases and frankly, YAML isn't as easy to put together particularly when you have a number of sub objects (not as intuitive, but that could simply be because it hasn't been in as great a use as XML).

 

Not to mention, you have really great libraries that are well tested and mature. I'm using TinyXML to great effect -- no need for the extra stuff like schemas and validation and whatnot, I just handle that myself because the definitions I'm using are so basic in nature.


In Topic: Rule of Three, and const-correctness questions

04 August 2013 - 08:21 AM

Arise thread long since dead.

 

 I didn't think it was that old... whoops. Besides, I felt the need to respond to a valid counter point to my original argument.

 


Note that if you want to prevent modification of the function parameters in your function you don't need to put const on the parameters in the header, only in the implementation. The C++ overloading rules make T and const T the same for parameter types. So you can have foo(int a) in the function declaration in the header and foo(const int a) in the function definition. (Barring compiler bugs anyways. I've heard of one compiler that doesn't perform parameter type resolution properly.)

 

More good points.


In Topic: Rule of Three, and const-correctness questions

25 July 2013 - 09:45 PM

 

You only need a const qualifier if you're passing by reference/pointer and you don't want the function to change the object being passed.


In addition to documenting your intent, const does have a function in this case -- it prevents you from modifying the argument inside the function body.

 

Very good point. Others have made the argument that it's about documentation. I fail to find that a useful argument. This, on the other hand, does make sense. While I'm personally in the habit of never modifying function arguments myself, I do see the value in this case of helping to identify potential mistakes before they happen.


In Topic: OK to 'steal' someones idea if they are doing a crap job of it?

05 July 2013 - 07:10 PM

'Stealing' an idea is almost meaningless in this context. Everything is a copy of everything else on some level.

 

It's called competition. If one person makes a game/app/whatever, and does a poor job of it (regardless of the reason, be it inexperience, lack of motivation, whatever), and someone else takes the idea and provides a much better implementation, why is that such an issue?

I know I wouldn't like it if someone took my idea like that but I would just have to deal with it. Someone else did a better job than I did, that's my problem, not theirs.

Just my humble opinion.


In Topic: New 2D Game Development Toolkit - NAS2D

07 March 2013 - 10:29 AM

Short answer, Yes.

 

Longer answer, yes, at some point in the future after we've implemented a few other features (proper shader support, optimized OpenGL blitter, more complete interface, etc.) and more thorough testing/documentation.


PARTNERS