popsoftheyear

Member
  • Content count

    704
  • Joined

  • Last visited

Community Reputation

2194 Excellent

About popsoftheyear

  • Rank
    Advanced Member
  1. Decent vector library for C?

    Depending on what you want out of it, there are a number of possibilities here as well: https://github.com/nothings/stb/blob/master/docs/other_libs.md
  2. Earthworm Jim?   I can't find a description besides "can't see bullets" on-line, but it was designed for the D-pad controllers with 8 possible shooting directions, and if you held the "shoot" button and went from one direction to another, the engine would act like you shot bullets in a complete arc between two neighboring directions. Many complained it was hard to hit enemies with the "invisible" bullets, but this mechanic actually made it quite easy.
  3. Just to chime in to the already good answers. Here is a real-world example. Developing very interesting Domain Specific Language at work: Inheritance used for Abstract Syntax Tree Visitor pattern used for operations on the AST Simple, single or limited purpose classes with occasional functions for manipulating their data used here and there (such as symbol table or scope tracking) Procedural style constitutes the other 95% of code. Specifically, in many problem domains there is a struct which holds current "context" plus functions which read/write it. The final point above has actually been the most important design decision because other coding styles are usually much harder to refactor. As the project grows, ability to refactor even major portions quickly has allowed it to mature efficiently.
  4. How should i manage intro animation

    Based on the example you showed, you will want to make an animated movie, and simply play the movie back using SFML. As for how to make the movie itself, that is not a programming issue. You'll use animation software for that.   There are other ways to make animated intro sequences, but you should start here for now.
  5. 4 Simple Things I Learned About the Industry as a Beginner

      Yes, and this takes those general ideas and applies them to a specific environment, which may help some whom may not yet have experienced them to conceptualize them better.
  6. DigitalRune Engine Opinions

    If this is for a new game project, what are your criteria for choosing this instead of something else out there?
  7. Must disagree with that. If anything, there are more low level techniques being shared than ever, IMO.   Anyway, if tool dev is your thing, I guess you'll have to come up with something that hasn't been done yet, or at least something you could do better. Without knowing your experience, it sure would be nice to have a good dynamic music creation tool available, for instance. Point being, there are tons of niches that haven't been filled yet...
  8. synthetic instruments tutorials?

    The simplest type of synthesis is subtractive synthesis. There are others, but you should definitely start there (don't be fooled - subtractive synthesis will give a huge variety of sounds).   That link actually provides a fantastic yet simple explanation, so I would probably fall short in trying to go any further or summarize here. Cool project - have fun!
  9.   For instance - every time you have something like this    bufferRestOfFile[index + 2]   the code for std::vector in a debug build will typically check that the index given in the [] operator is a valid index into your vector. If it is not, it will assert or throw an exception, depending on implementation.   In release builds, this is generally not done, but in debug builds it is normal.   Side note: There are usually flags you can set at compile time to configure the depth of debugging done, depending on how much you need checked vs how much speed matters in your debug build.   Side side note: Some people will actually enable these debugging features in release builds for security purposes (and do other things such as reference the raw data pointer when this is a speed bottleneck and they have verified the safety of what they are about to do)
  10. Problem with my zooming feature after panning

    Someone might see something, but nothing pops out at me as "the reason".   If this were my problem to solve, I would first factor out camera code - totally separate it from circle and world (canvas) logic. This separates the responsibility of each piece of code, and makes it far easier to debug, maintain, add on to, read, etc. Right now it's beginning to be spaghetti-y, and the potential is there to get much worse (thus harder to parse, use, fix, etc.).
  11. OpenVG vs OpenGL (Performance)

    You may be interested in NanoVG. It's not exactly OpenVG, but it covers most if not all of what you are looking for in a rendering library.
  12. Reading PNG format (deflate compression)

      Not quite.   For the first byte, you can just write the raw value. The equation is (curr - prev), and x < 0 is defined as 0. So filtering with the PNG subtraction filter would give 255 - 0, mod 256, which is still 255. So byte 1 would be "1" for sub filter, and byte 2 would be "255".
  13. Reading PNG format (deflate compression)

    [deleted]   Sorry - hold on. I made the wrong conclusion from some old code that didn't match with the spec (the result was correct but my explanation in this post was not). Fixed it in the below post (it was supposed to be another edit but I messed that up too).
  14. Reading PNG format (deflate compression)

      The way Lehm2000 is reading the huffman codes is a pretty standard way to do it. So far it seems okay - the first byte marks the filter type for the current row of PNG data. In other words, the error does not appear to be the deflate implementation (at least not so far). The error appears to be the assumption that it should be 255, and not 1, because they forgot the need to reverse the PNG filter afterwards.