Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Everything posted by nesdavid

  1. Could you share the code? that lib is used almost everywhere, it doesn't crash if you use it as intended. What compiler are you using?
  2. nesdavid

    Token representation

    I did a simple .h file parser so as to generate runtime information for c structs. I load the entire file in memory as a char* and my token struct is defined as follow struct token { u32 Len; char *String; }; The char* only points to a part of the memory, it doesn't generate a new string and the Len tells you where the string stops. Notice that this doesn't play well with other functions that expects a zero terminated string, whenever I need to pass a token to any of these functions I just have a TokenToString() that creates a new zero terminated char*
  3. nesdavid

    Youtube tutorials/Online courses

    I really like handmade hero show. But I can't say if there's good enough for a beginner. I'm an experienced game programmer and I learned a few things, but most of the time is pretty boring. Maybe you can watch a few and jump into your own conclusions. Cheers!
  4. nesdavid

    What should I do for my first game?

    When I was a young boy there were a path we used to follow, and it was, first make a tetris, then a breakout, then a pacman and finally a 2d platformer. Nowadays is easier if you use a framework, but I believe it still work. Maybe if tetris it's too hard you can make a tic tac toe first.
  5. Hi, I'm just reading the output generated by glDebugMessageCallback and I'm seeing a message that I don't understand, "vertex color clamping 1 -> 0" in the performance category. It only happens once. Maybe was launched by the shader compilation or the context creation and initialization. Have you ever seen this message in any of your program?
  6. Ok, thanks for your replies. I got another one (maybe I should change the title topic :rolleyes:). The mesaage says "Recompiling fragment shader for program 9 EXT_texture_swizzle or DEPTH_TEXTURE_MODE 1672->292". That program is mine and it renders text. The font atlas has only one color channel and for that I had to swizzle the channels like this. glBindTexture(GL_TEXTURE_2D, Texture); GLint swizzleMask[] = {GL_ZERO, GL_ZERO, GL_ZERO, GL_RED}; glTexParameteriv(GL_TEXTURE_2D, GL_TEXTURE_SWIZZLE_RGBA, swizzleMask); I only do that when the texture is created and uploaded to the GPU and the error is only shown once, on the first render with that shader. I want to understand the reasoning behind these of messages, because it seems that is not much I can do in order to prevent the internal recompiling of the shader, unless there's some hinting to the fragment shader that the colors will be swizzled. Am i missing something?
  7. Thanks for the reply, but things are a bit more interesting than that ;) This is the complete message, which come split in 2 "Recompiling vertex shader for program 14 vertex color clamping 1->0". The thing is that I never created so many programs, that Id doesn't belong to any of my code, and in order to verify this I commented all the shader creation of my code, and the warning *still* happens (with a lower id). So I believe it should be an internal shader created by the driver or something like that. I believe I will ignore this warning completely.
  8. These are the ones I know: libgdx if you like Java, MonoGame if C# is your thing and Cocos2dX for C++
  9. nesdavid

    Advise for new devs

    I strongly advise to get a job in the industry, you will learn a lot faster as part of an experienced team than going solo.
  10. nesdavid

    How Does One Learn C++ ?

    I really like this online book http://www.icce.rug.nl/documents/cplusplus/
  11. What do you think about Unity's approach?. It has some static methods to access its subsystems. eg. Input.KeyPress(); Physics.RayCast(); Resources.Load(); Debug.Log(); They are global, and everyone can access them, there's no problem in that. Also, Jason Gregory on its Game Engine Architecture book suggests something similar, every major subsystem is global and has an StartUp and Shutdown method. On the other hand I don't think "Projectile" is a major subsystem at all :)
  12. nesdavid

    Csharp Unity Awake() function

    I meant if you move the code you wrote in the start method to the awake method, you will be sure that it will get executed before the start method of all the other scripts.
  13. nesdavid

    Csharp Unity Awake() function

    Awake is only a convenient way to initialize stuff you need *before* the start method. That's all there's to it. Let's say you have 2 scripts doing stuff at start, but script A needs something that script B initializes, the best way to guarantee that is you put B code in the awake instead of start. Hope it helps
  14. nesdavid

    Linked list adventure

    You can see the preprocessed file if you compile it with the /P option (cl.exe /P main.cpp). It will dump a main.i where you can see how the macros were transformed.   link: https://msdn.microsoft.com/en-us/library/8z9z0bx6.aspx   In the meanwhile I've uploaded the .i file to http://pastebin.com/CazXV3wm   As the error suggests, the preprocessor is failing to include the surrounding () into &pool.indexPool
  15. nesdavid

    Linked list adventure

      The point was to compare both programs and anyone can jump to their own conclusions. It wasn't self bias at all, I showed progress and took changes of all the OOP people reading the post.       If you want a proof just read the whole topic, people is just bashing @Finalspace because he is doing stuff differently than most, and @Khatharr is trying to show how wrong he is. People is not being open minded at all. Just like you, assuming the worst because I didn't clarify enough.   Again assuming the worst, is not what I meant. Most people practice OOP in a religious fashion, you won't change those people minds. Maybe is so obvious that I shouldn't even mention, just like you said   If you just want more information about it you cant listen to my talk, but you have to know spanish.
  16. nesdavid

    Linked list adventure

    I did that exercise once, but not in this forum. OOP vs Procedural (C++ vs C). OO tends to be bigger, more abstract and with more indirection than the other. Anyway you won't convince OOP heads to stop doing that, to many books, to many class hours, to many effort invested in something that is supposedly better than everything else.   If anyone is fluent in Spanish I did a talk in EVA (Argentinian GDC) about how OOP isn't the right tool for games.
  17. nesdavid

    c++ or c# for 2d and 3d game creation?

    Both paths are ok. My suggestion is to use any engine and try to make a Tetris, or maybe something even simpler like a Tic tac toe. You will have to do all the gameplay programming by yourself but the engine will manage a lot of stuff under its hood. In the process you will have to learn a programming language and also realize what things an engine usually handle and what things are left for that specific game you're trying to make.   Anyway, have fun doing whatever you choose :)
  18. Hi,   I used with success cocos2dx, which is a C++ cross platform framework focused on mobile. It contains more features than SDL and allegro, and is easier to use. It's also easier to build for Android and iPhone. The biggest selling point of cocos2dx is its performance compared to unity3d, but you will have to make a lot of tools to polish the art pipeline.   I used cocos2dx a few years ago and lost track of it, I use unity now because I don't really need to squeeze the last bit of performance out of the new iPhone
  19. Hi!   Would you (or not) recommend that book for someone looking to learn vulkan with some experience on opengl?   Tx
  20. nesdavid

    Vsync messing with my job system

    Sorry, I meant 'create' one thread
  21. nesdavid

    Vsync messing with my job system

    Have you tried to make the minimum program that behaves like that? I mean, create only one thread, have vsync active and check if WaitForSingleObject does that weird thing. Have you tried in another window version?
  22. nesdavid

    Vsync messing with my job system

    Have you asked in the Hand made hero forums? I have no experience in using that function, but have you tried to check if there was any error when vsync is active?
  23. Hi, I'm looking for ways to make the save & load process as painless as possible.   In previous games I was cherry picking which variables got saved and load back, because I didn't want to serialize the whole class due to inheritance and because some variables get pulled from config files e.g: public class Player : MonoBehaviour { public Vector2 position; public float animTimer; public AnimState animState; public float attackForce; public float speed; ... } I do want to save the first three public variables, but I don't want to serialize the parent class nor the config stuff stuff. As you can imagine, writing the save and load routines was very error prone. But I could easily handle future updates, if the game is in version 2 and the save game is in version 1 I know exactly how to migrate.   Now I'm trying to use the native c# serialize features, but again there are some variables that I don't want to serialize, so I regroup the ones I want to serialize into another class [Serialize] public class PlayerProgress { public Vector2 position; public float animTimer; public AnimState animState; } public class Player { public PlayerProgress progress; public float attackForce; public float speed; What remains to be seen is how can I handle future updates because the deserialize process works as a whole and if it fails, an exception is thrown. The best thing that came to my mind is keeping the old PlayerProgress and make a new one like PlayerProgress2, etc.   How do you handle this whole process? Tx
  24. nesdavid

    Amd openGL driver crashes

    I wrote the minimum example which I believe should lead to a crash but nothing crashed. I don't know if I should feel relieved or not :S Here's the full code of the program https://bitbucket.org/nesdavid/recompile-shader-test/src/ac2747bb99fca7f6bea4a9c0c0bcc2bcd6dba526/src/main.cpp?at=default&fileviewer=file-view-default I will go back and forth with the 2 programs until I find the culprit   Thanks
  • 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!