Jump to content
  • Advertisement

a light breeze

  • Content count

  • Joined

  • Last visited

  • Days Won


a light breeze last won the day on March 29

a light breeze had the most liked content!

Community Reputation

40 Neutral

About a light breeze

  • Rank

Personal Information

  • Website
  • Role
    Creative Director
    Game Designer
  • Interests


  • Github
  • Steam

Recent Profile Visitors

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

  1. a light breeze

    sprite sheet

    A picture is worth a thousand words. Post an actual screenshot, and also post the actual spritesheet you're using. I'm guessing that your texture coordinates are incorrect, but without the screenshot and the spritesheet, that's just a random guess.
  2. a light breeze

    RTS design techniques?

    This seems backwards to me. The average RTS feels a lot smaller to me than the average Diablo clone. An RTS can get away with just a dozen units or so, whereas the Diablo clone needs a constant stream of new enemies in order to stay interesting. (That said, I haven't actually created a game in either of these genres, so I could be totally wrong about their relative scale.)
  3. a light breeze

    SDL2 fulscreen - best resolution for retro 2D games on PC?

    http://wiki.libsdl.org/SDL_RenderSetLogicalSize http://wiki.libsdl.org/SDL_SetRenderTarget
  4. a light breeze

    SDL2 fulscreen - best resolution for retro 2D games on PC?

    Unless you're targeting CRT monitors, always use SDL_WINDOW_FULLSCREEN_DESKTOP. SDL_WINDOW_FULLSCREEN relies on scaling at the monitor end, which looks terrible on LCD/LED monitors. As for the half-a-pixel problem, you have several options: You can render to a smaller texture and then render that texture across the whole screen (being careful to disable texture filtering, or it will look horrible). You can use black bars. You can use OpenGL instead of SDL's 2D rendering API. You can use SDL_RenderSetLogicalSize and let SDL take care of the scaling for you.
  5. a light breeze

    X and Y coord of character

    It's not inaccurate, it's outright wrong. For XPosition, you are taking CharacterIndex, multiplying it by some number, then dividing it by that same number. In other words, XPosition will only ever equal CharacterIndex. This can only be accurate if you want your results in terms of characters cells instead of pixels and all text is in a single line and all characters have the same width, in which case you should set YPosition to just 0. Things your function fails to account for: Multiple lines of text. Variable-width characters. Variable kerning between characters. Even in fixed-width fonts, lots of characters have zero width. (This includes all so-called combining characters, which merge with the adjacent charcter.) Even in fixed-width fonts, lots of characters have double width. (This includes all CJK ideographs.)
  6. a light breeze

    My question about my fighting game protagonists

    I prefer option 2. Animal themes are cool, and Tibetan Buddhism is more interesting (i.e. less of a cliché) than BDSM Christianity.
  7. a light breeze

    Why Are There Fewer Sci-Fi RPGs Than Fantasy Ones?

    99+% of RPGs are about a small band of adventurers running around and fighting monsters. This works better in a medieval-or-earlier context than it does in a modern or futuristic one due to long-running historical trends, such as: The evolution of weapon technology. A small band of adventurers can do reasonably well against monsters armed with swords, but can't do much of anything against nukes. The consolidation of states. A small band of adventurers can make a large difference in a tribe of a few hundred members, but not so much in a modern nation-state with a population of millions. The increased ability of the state to suppress small-scale conflicts. People are more likely to die in huge wars involving millions of people, but far less likely to be murdered by brigands when traveling from one town to another. The move from violence to other means for solving conflicts. More lawsuits, boycotts, political campaigns, predatory business practices, restraining orders, and prisons. Less actual killing.
  8. a light breeze

    Text to Voice converter?

    If, for some reason, you want to use text-to-speech conversion in your game, then you really want to do this in your actual game software, at runtime, instead of pregenerating the audio on some sort of website. Audio files are huge and therefore expensive to distribute, and generating the text at runtime allows you to customize the text to a much higher degree.
  9. Now that I think about it, there is a workaround you can use to get the behavior you want with clang: template<class T> struct int_ { typedef int type; }; template<class T> constexpr typename int_<T>::type n; Here the use of the int_ template forces the compiler to delay determining the type of n until instantiation time, even though that type is always int. Instantiating n always results in an error unless n is specialized for that same type, but the declaration itself is legal.
  10. Are talking about what the rules actually are, or are we talking about what the rules should be? Allowing template <T> constexpr int n; without allowing constexpr int n; would require a very specific rule for just this case. There is no other rule that could possibly be extended to allow one without allowing the other. Now, this rule either exists or it does not - I don't believe it does, but like I said, I haven't checked - but whether it should exist is another question entirely. I do not believe this rule should exist, for two reasons: It adds additional complexity to the language for minimal gain. Its semantics are not clear. Like I pointed out previously, int n; is equivalent to int n = 0; at namespace scope. Therefore the natural semantics of template<class T> constexpr n;, if it were allowed, would be equivalent to template<class T> constexpr n = 0;. Note that constexpr X n;, where X is a user-defined type with a constexpr default constructor, is legal and defined n to be a default-constructed X.
  11. The C++ standard is a very complex document. As such, it sometimes happens that it contains ambiguities that can be interpreted in multiple ways, and it sometimes contains text that does not reflect the true intention behind the standard. In your first example, I would note that the general intention behind the C++ standard is that each namespace-scope declaration can be compiled without looking at the declarations below it. This is why C++ has forward declarations. This is possible for forward-declared inline functions (since the compiler can choose not to inline them), but not for forward-declared constexpr functions used in a constexpr context. I would therefore argue that regardless of the actual text of the C++ standard, clang is at least consistent with its spirit. Regarding your second example, I suspect (but have not actually checked) that clang is correct. If const int n; at namespace scope is illegal, then constexpr int n; should also be illegal, with or without the template. Note that just plain int n; at namespace scope is initialized to 0. Therefore if constexpr int n; were legal, I would expect it to declare n to have a value of 0, which would not be useful for detecting bugs at compile-time.
  12. a light breeze

    Tile map bad performance

    You are calling four functions in your inner loop: getTileIndex getLayer1GC getLayer2GC drawImage Assuming that your slowdown isn't outside of the code you posted, the slowdown is almost certainly in one of these functions. drawImage seems like the most likely culprit, but do check the others.
  13. a light breeze

    Fog of war (large texture overlay?)

    You could just use multiple textures. (I'm not really fond of using a texture to store fog of war, because fog of war is part of the game state, and to my mind the game state belongs on the CPU side of the CPU/GPU divide. But using splitting a big texture into multiple smaller textures to get around texture size limits is such an obvious trick that I just had to mention it.)
  14. a light breeze

    MS C++ annoying data alignment.

    This is appears to be an issue with the Visual C++ compiler (or rather the Windows C++ ABI). Test program: #include <iostream> struct A { virtual ~A() {} int a; }; struct B : A { int b; }; int main() { std::cout << "sizeof(A) = " << sizeof(A) << "\n" << std::flush; std::cout << "sizeof(B) = " << sizeof(B) << "\n" << std::flush; } Result on g++ (Ubuntu 7.3.0-16ubuntu3) 7.3.0: sizeof(A) = 16 sizeof(B) = 16 Same result for clang version 6.0.0-1ubuntu2 (tags/RELEASE_600/final).
  15. a light breeze

    tracking game stats post EU regs

    Ask once, the first time the game is started, and then allow the user to change their choice through the settings menu. You are more likely to get permission if you politely ask than if you wait for the player to give you permission on their own. And, yes, you do need permission before collecting any information from me. I generally give permission for the collection of harmless analytics, but if I catch a program connecting to the internet without my permission, then I'm going to assume the worst.
  • 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!