Jump to content
  • Advertisement

CrazyCdn

Member
  • Content Count

    1485
  • Joined

  • Last visited

  • Days Won

    1

CrazyCdn last won the day on September 5

CrazyCdn had the most liked content!

Community Reputation

1345 Excellent

3 Followers

About CrazyCdn

  • Rank
    Contributor

Personal Information

  • Role
    Programmer
  • Interests
    Programming

Social

  • Twitter
    @CrazyMadCoder
  • Github
    https://github.com/CrazyCdn

Recent Profile Visitors

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

  1. CrazyCdn

    Use orbiting planets in 4x game?

    I agree, at least make it an option. I'm personally bad with names but remember patterns a lot better.
  2. CrazyCdn

    sprite sheet

    Getting information out of you is like pulling teeth from a gator. Can we please also see your sprite sheet(s)? You said the .bmp was working but the .png was not, if that is the case, post both please. If not, how many "cells" are there in it? 2x2, 4x2, 2x4, 4x4, etc. Are the cells all equal size?
  3. CrazyCdn

    sprite sheet

    It seems like @phil67rpg goes out of his way to make cryptic posts, only ever giving about 20-25% of the needed information and not actually asking questions then gleefully waiting to see what people come up with. Maybe it's a new college class of some sort? Trolling technical sites with nice people on it to make them bitter? ūüėČ Now, on to the actual issue. @phil67rpg post the .png, .bmp images you're using and a screen shot of your program running please.
  4. Have you seen how the Handmade Hero project handles this? Here is the first episode on the topic, believe 22 & 23 cover it also, it does use C but that is not an issue honestly:
  5. My example, I should have been more clear was more focused on the horrific naming you picked for the struct of glfloat which was wrapping a GLfloat variable. Now putting data into structs that is common and makes sense is perfectly fine, but a quad is not plural yet you have enough room for 25 quads worth of data in the vertices but only one texture. I think you missed the entire point of my post about using vectors. And as you may or may not be able to see, you don't need 600 indices. Heck, you don't even need a single one as they're always in the same order, just hard code it in the function that dispatches it to the OpenGL buffer in the .cpp file. I didn't have time to look over your other code, just the header and this kinda stood out. I don't think you understand good use of vectors to be honest. I am glad to see you not doing making the vector a pointer though, progress! What is the point of "batchedQuadsContentQuadAmount"? Other then to be as long a name as possible? Why do you have a vector of a vector of quads then a vector of quads? I'm asking questions to make you think about your code here. But I think you need to be honest with yourself, I think you need to work on a few smaller projects first. I'm not sure what your level of programming experience in C/C++ is but you seem fairly new to it. I would recommend maybe making pong, then breakout type games first. I forgot you had mentioned you tried to use the godot engine but claimed it had poor performance. The engine is perfectly fine, it was likely your code to be honest as there are literally hundreds of 2D games made with that engine: https://godotengine.org/showcase and I doubt your engine will be faster then it is anytime soon.
  6. CrazyCdn

    sprite sheet

    Did the example code @Ianuarius provided not give you enough of an idea to write your own? In total it looks to be about 200-300 lines of code. Should be quite easy to follow and port to your own needs.
  7. It was merely an example of how his class could be more flexible. I think you're way over thinking optimizations too when it comes to worrying about cache misses in this case honestly. The OP needs to learn to walk before running at this point. I also realize the likelihood of the index being the exact same for every quad means it could be hard coded in the usage code too. Also, the OP was storing pointers in a vector above, I wanted to keep the code similar to his. Also, depending on his setup, he might only be passing in already transformed vertex positions from a model class each frame (we do not know, much like how he passes in Textures owned by other classes). The OP also has a pointer to a vector class which is... really not how you want to use it
  8. For the love of all that is important in your life, DO NOT USE THAT NAME. You are going to make someone want to murder you. No. That does not, in any way what so ever, explain what the point of the struct is, at all. Just, no. I cannot emphasis that enough! I'm not even sure what you're attempting here, as the variable item doesn't make any sense either (as a name). But glfloat, argh! Also a few observations about your code in general: Why are you hard coding your vertex/index buffers but allowing unlimited textures? You're already using std::vectors, let's make the class even more general. struct QuadData { GLfloat verts[4] = { 0.0f }; GLuint indicies[4] = { 0 }; }; std::vector<QuadData*> quadData; I agree @Zakwayda you need to learn about pointers, object life-times, memory management, etc. before moving on to smart pointers. Though smart pointers takes about 10 minutes to learn honestly, to use effectively (typically want to use unique_ptr, if you're using shared_ptr a lot you have a general flaw in most cases) takes longer though. Also, you're prematurely optimizing without any data to show the need here. I've had 2D tile based games that had 2000+ tiles on screen without batch rendering running at like 5ms/frame on an nVidia 970. Make a good, easy to use interface and start making your game. You have to decide, are you writing a game or an engine, because you'll likely only get one or the other done and you seem fairly new to C/C++ and learning while writing an engine will likely lead to multiple rewrites of your engine. Food for thought
  9. We've been attempting to give you assistance. You've just been ignoring it and taking our recommendations as insults (or so it seems as you get defensive fast). They are not. You blamed issues on only knowing Visual Studio 2003, but it is just a tool, not the problem. If you use sites like http://www.cplusplus.com/reference/ it allows you to select documentation for older versions of the C++ language. But honestly you have a Windows 10 computer, upgrade to the latest Visual Studio. Also, clearly, you need to learn how to use the debugger properly which will greatly assist you in solving your own issues instead of relying on forums that can take hours or days to get back to you. Especially when you provide fairly useless information because you don't know what you're looking at, to put it bluntly. It seems, based on your other subject about erasing pointers from containers you just want your bugs fixed for you, so you can keep on coding without ever learning WHY the bug occurred or how to avoid it in the future. This will lead you into bigger and bigger bugs because you refuse to slow down and learn. You just want to get this project done and consider that knowledge, where it is not. Or if it is, it's poor knowledge, entrenching poor habits which will be difficult to break later. Direct Play was depreciated in April 2004, over 14 years ago. There are free alternatives that are also modern that will provide you far better and applicable knowledge. Also, I'm not sure what you were asking about GNU source code because you don't want to post yours. No one is going to steal your source code, nor do we want you to post your whole project someplace for us to debug it. We're not here to read over your whole source code to find the bug for you. Narrow down where the bug is, using your debugger and post the 20-30 lines where the bug is, if you still cannot resolve it after finding it. Best of luck to you!
  10. How about running the game in the debugger so you can find where it's actually crashing? Since what you provided is pretty much useless.
  11. CrazyCdn

    About OpenGL used in games

    FPS is also a horrible counter to look at. You want to see how long it takes to render a frame. So like Doom 2016 does everything it can to run at 16.6ms/frame. And as for your 1fps drop, that is absolutely nothing at 1000 fps. It's also a horrible test bench, one triangle. Don't worry about your frame time until you have fairly complex scenes going and even then, it sounds like you're very new to graphics programming, learn the basics before you worry about performance.
  12. CrazyCdn

    Rigidbody problem

    What does it do when you press A or D? What have you done to debug this code? Typically people wrap their code in the <> coding style feature to make it easier to read also.
  13. CrazyCdn

    Good fonts to use for menus and HUD

    Along with this, if there is a terms of use document on the site, download it and include it with your game. Make sure the name of the font and the authors name (and maybe the site) are listed also.
  14. CrazyCdn

    Good fonts to use for menus and HUD

    Two links for you, in this one I liked Simplifica, Mosk, Qanelas Soft and Cornerstone fonts. While this one has 70 free to use for personal or commercial, I didn't pick out my favorites. But that should give you quite a few options.
  15. CrazyCdn

    Brilliant game Idea of a GTA Primal.

    Well what is the difference between asset flipping a model and asset flipping textures? Why is one okay in your books but not the other? In some cases making a texture is more difficult then a model. I'm honestly curious about this. Based on your previous post that got locked down by the mods, you're surprised by negative feedback? You were being very arrogant and rejecting advice/comments and experience from industry veterans with zero to show for your arrogance. It would be one thing if you had published several well received games in a very short period to back up your claims. Also as an aside, seeking vengeance is a complete and total waste of your time and the other person is likely to not give a darn. Especially on forums.
  • 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!