Jump to content
  • Advertisement


  • Content count

  • Joined

  • Last visited

Community Reputation

181 Neutral

About Concentrate

  • Rank
    Advanced Member

Personal Information

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. const char *foo1(){   const char* a = "foo1";   return a; } const char* foo2() {  std::string myString = "foo2!";  return myString.c_str(); } int main(){     foo1();     foo2(); }
  2. Concentrate

    Newbie Javascript question

    If you are running on chrome, you can simply use the bind function,  this.tickIntervalId = setInterval(this.Tick.bind(this), 1000/60); //Update at 60 fps   or if you are using the popular underscore utility   this.tickIntervalId = setInterval(_.bind(this.Tick,this), 1000/60); //Update at 60 fps     The problem is that your Tick function gets called in a global context. Which means that, the 'this' pointer is the global 'this' which is not what you need. Hence you need to bind the 'this' context so that when the Tick function gets called from a global context, the original 'this' pointer is still saved.
  3. Try instantiating BitText in main, then pass it around where needed. That class seems to be lightweight right? So I assume creating that object is light.
  4. Interesting, this seems like a bug? Same result in chrome/firefox as well. Btw, on chrome increasing linewidth by 2, seems to fix the issue as you've mentioned.
  5. Concentrate

    Is there anything faster than A* pathing?

    Check this http://qiao.github.io/PathFinding.js/visual/ out. Check out the jump point search, with preprocessing and future information that algorithm is very fast. So it all depends on the context. But A* is a good starting point in most scenarios. 
  6. Here is the http://jsfiddle.net/DV9Bw/558/ . I'm not sure why there is opacity less than 255. If you hover over the non-overlapping section, you can see that the opacity is 127/128. Can someone clear this up for me? Why isn't opacity full (255). Also more importantly, why in the overlapping section, the two rectangle pixels are combined, instead of the destination rectangle(blue one I believe) completely take over the pixel at that coordinate? Is this just how the strokeRectangle works? If I change the stroke to fill, as in fillRectangle, then everything works as expected. Any help is greatly appreciated!
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!