Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

663 Good

About Charon

  • Rank

Personal Information

  • Role
  • Interests
  1. Charon

    C++ IDE for Linux

    I just want to recommend CodeLite too since it does most (not all) of the things you require from an IDE. I also heard good things from KDevelop, but never tried it myself.
  2. I like this article here on gamedev to give a nice start into the subject: http://www.gamedev.net/page/resources/_/technical/game-programming/brain-dead-simple-game-states-r4262
  3. Yeah, thats the usual way to do it. How to do it differs from library to library ofcourse.   This is how it would look for SDL2 and has to be set before creating the OpenGL context: SDL_GL_SetAttribute( SDL_GL_CONTEXT_MAJOR_VERSION, 3 ); SDL_GL_SetAttribute( SDL_GL_CONTEXT_MINOR_VERSION, 1 ); Regards Markus
  4. Charon

    OpenGL/GLSL version handling

    It's almost like TheChubu said: You only get GLSL 3.30 when you create a core-context with version 3.3. The other version-info shown in your output (I guess it's from glxinfo) is for old non-core contexts. This irritated the hell out of me when I first encountered this behaviour :-) So everything regarding your drivers seems to be correct!   Are you using GL_KHR_debug or GL_ARB_debug_output yet? I can really recommend using them as they might give you more information about the error you are still encountering.   Regards Markus
  5. Charon

    Luck in Games: Why RNG isn't the answer

    Nice article, but since I know nothing about hearthstone several passages are hard to follow for me. (More example with MTG might have been better, but that's just for me)
  6. Charon

    Moving sprite around point

    SDL_GetTicks returns the number of milliseconds since when SDL was initialized and because of that it's an ever increasing value you get. https://wiki.libsdl.org/SDL_GetTicks   You need the delta between the current and the last frame.   Something like this: class CTimer{ public: CTimer( void ) : m_thisFrame( SDL_GetTicks() ), m_lastFrame( m_thisFrame ) { }; void Update( void ) { m_lastFrame = m_thisFrame; m_thisFrame = SDL_GetTicks(); m_dT = ( m_thisFrame - m_lastFrame ) / 1000.0f; }; float getDeltaTime( void ) const { return( m_dT ); }; private: unsigned long m_thisFrame; unsigned long m_lastFrame; float m_dT { 0.0f }; }   Now call the update-function every frame, and replace your use of "SDL_GetTicks" with "getDeltaTime".   Regards Markus
  7. Charon

    Royalty Free Game Sprites for your games

    Nice work, thanks for this!   You might want to check out http://opengameart.org/ It's a website where you can upload your stuff to provide it to other developers.   Regards Markus
  8. Anyone got a look at glTF yet? https://www.khronos.org/gltf http://www.gltf.gl I unterstand it like they are advertising it as an optimized run-time-format which can be created out of a COLLADA file. The format specification is not yet finished though. (although LibreOffice already supports it) Regards Markus Edit: this link gives a better explanation about what glTF is https://github.com/KhronosGroup/glTF/blob/master/specification/README.md
  9. What about a time-based function which calculates a sinus-waveform? You can then add its output to your jellifishs' x and/or y coordinate whenever you are not moving it yourself. (you maybe have to scale the output for both axis differently so it looks nicer)   Regards Markus
  10. Since you are encrypting the packets in the client you have to include the encryption-keys in the client too. With this you are giving a malicious and knowledgeable player everything he needs to capture, unencrypt, modify and re-encrypt the packets before they leave his computer. He just has to extract your keys from your program! (which is not that hard to do) He doesn't even have to modify your *.exe! So while checking the checksum of the *.exe might hinder a malicious player, it won't stop him from tinkering with your program. (he could modify the program on-the-fly in-memory after the program loaded)   So do what the others say and discard your encryption and don't trust you clients. (this has the added benefit that you "could" intercept the packets yourself to aid you in debugging some problems)
  11. Charon

    Backup Software for Small Teams

    What if your office burns down? Consider backing up all your stuff to an external hd at least once a week and store it outside your office-building. You could use a self-storage business for this or alternatively store the hd in a safe-deposit box in a bank (be aware that their opening hours may prohibit you from getting to your backup on weekends/in the evening). It should not only include your current stuff, but your whole git-repository and so on.   This "external" backup should not replace your in-house backup at all, it complements it and is needed for a worst-case scenario.
  12. Charon

    Having a VBO/VAO for each object.

    @Chris_F: this sounds really nice! I would love to see the sourcecode for this if you want to share it (I am new to this too)     There is a nice example on instanced particles on opengl-tutorial.org which I think could be used for sprites too: http://www.opengl-tutorial.org/intermediate-tutorials/billboards-particles/particles-instancing/
  13. Charon

    Textures not working in OpenGL 3+

    What about using ARB_debug_output or KHR_debug to pinpoint the place where something is going wrong?
  14. @Bregma: This might be nitpicking, but in C++11 I would use "final" and "override" too to further define my intention: class Something { public: void do_something() final { do_pre_something(); // basic something do_post_something(); } private: /// <- note virtual void do_pre_something() {} virtual void do_post_something() {} }; class FancySomething : public Something { void do_pre_something() override { // fance something } }; Regards Markus
  15. Charon

    Handling one-off events

    While assuming your sound plays only once when you call "playSound", the following might be all that is necessary: while True: //Game loop {   if( movingForward ){distanceWalked += 0.1}  if( distanceWalked > 1)   {     playSound( footstep.wav );     distanceWalked = 0; // just reset your counter here   } }
  • 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!