Forum > C# > Suggestions. Devs please read.

Suggestions. Devs please read.

By camelot Posted 2012-06-04 14:20 Comments 3
camelot
  • Posts: 37

#1 Parse and regional settings

for god sake, use Parse(X, CultureInfo.InvariantCulture)
there alot cultures (russian and brazil) where used comma insted of dot as number separator.
cocos2d xna use a lot float.Parse and int.Parse for parsing .plist .
all
.plist use dot as number seprator.
this lead to fatal exceptions on windows phones with russian (and brazil) regional settings.
everyone who want to use cocos-xna with russian (or brazil) marketplaces should fix this by hands, or replace all dots with commas in plist files.

#2 CCLog is a bad practice

I maybe wrong. But i think compiler ommit System.Diagnostics.Debug for release builds.
But you gus replaced all Debug.Trace with CCLog. And all debug information (messages and other info) exist in release builds.
Its not shown anywhere, its not big cost of size or performance, but its still exist in release builds.

s. sorry for my bad english.

jwa@javatopia.com
  • Posts: 243
  • Location: Totally Evil Entertainment - San Diego

#1 RE: 2012-07-14 18:57

https://github.com/cocos2d/cocos2d-x-for-xna/issues/18

Issues 17 and 18 in the github tracker.

jwa@javatopia.com
  • Posts: 243
  • Location: Totally Evil Entertainment - San Diego

#2 RE: 2012-08-05 17:56

Item #2 - CCLog - this still uses Debug.WriteLine(string), so the output should not appear in your application when running in Release mode.

jwa@javatopia.com
  • Posts: 243
  • Location: Totally Evil Entertainment - San Diego

#3 RE: 2012-08-05 17:59

Item #1 for both int and float is in version 0.1.2a.

Loggin to reply

Copyright © 2010 - 2013 Cocos2d-x.orgClustrmaps