Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

198 Neutral

About SriLumpa

  • Rank
  1. SriLumpa

    Android or PC?

    I'll try a different approach for giving my 2 cents First, you should come up with a game idea. Then, if that game would play nicely with a touchscreen, go for android. Otherwise PC. Comparing the development frameworks does not make much sense to me. Both platforms have good tools. I have tried libgdx and it's good. I have not tried SFML but people seem to like it, so it must be good too.
  2. It is called an "anonymous class", I think.
  3. SriLumpa

    toString() [Java]

    It does not seem possible. How about creating another method, like toString2, and "sometimes" call it instead of toString.
  4. Not really debating, but you can try libgdx.
  5. SriLumpa

    "Beginning Android Games" Question

    The author of this book is also the author of the libgdx engine, so I don't think he would advise to roll your own. I don't know the book, nor how/whether it uses the engine, but my guess is that what is done in these first chapters has been judged beneficial and good things to know, even if you use an engine in the end.
  6. Actually the interesting thing to know is, how do the various B classes differ, and can some of them have several "functionIwantToPass" ? Assuming they don't, here is a solution: class A { virtual void action() = 0; public: void activate() {action();} }; class B : A { void functionIwantToPass() {...} void action() { functionIwantToPass() } }; Sorry I you already knew, or if this is not suitable. But I think it is best to learn simple things first, before function pointers.
  7. It is a terribly classic answer, but: could you describe more precisely what you are trying to achieve ? From your simple example, it seems that just using a virtual method would do the job, without using any function pointer.
  8. SriLumpa

    redundant threading pitfalls

    I'm not an expert on threading at all, but in my opinion, you avoid this by having functions that document the fact, if they are threading behind the scenes. Also, if they are doing really heavyweight things, maybe job spawning overhead is relatively not that important.
  9. SriLumpa

    preprocessor question

    Not that I know, but you did not mention the compiler. I would suggest: if the change is definitive, to make it with external search/replace tools. Else, make it dynamically in the code, where/when it is needed. Anyway, as many people could tell you: - it's bad to hardcode a lot of things - what are you trying to achieve ? give a small example
  10. SriLumpa

    Game developement for android?

    I suggest libgdx, that comes with a few simple example games.
  11. SriLumpa

    Canceling a Constructor [C++]

    I'm not competent to debate that, but in this case, there is not even the need to debate: the OP didn't say that this code was to be as efficient as possible. The famous "premature optimization etc...". And I doubt that texture loading code is called often.
  12. SriLumpa

    Canceling a Constructor [C++]

    I think throwing an exception is the correct way to indicate a failure of construction. Along with using RAII in order not to leak resources (fp in your case).
  13. SriLumpa

    Confusion about Law of Demeter

    I think it's exactly this. if the Something belongs to obj, then tell obj to do whatever needs to be done with it, so that you don't have to care what the Something is. (as ApochPiq said). Of course it supposes that you can refactor everything. If you don't have control over obj, you can't do much. It's about a bit more than just readability. And even then, I wouldn't say "only readability", as it's so important !
  14. SriLumpa

    my gallery

  15. SriLumpa

    [HELP] Installing Allegro on Linux

    You can try with just:-L/usr/lib -lalleg-4.2.2You can check the lib file for symbols. Reproducing (or not) manually outside of codeblocks would also give hints.
  • Advertisement

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!