Jump to content

  • Log In with Google      Sign In   
  • Create Account

14 years ago on June 15th Gamedev.net was first launched! We want to thank all of you for being part of our community and hope the best years are ahead of us. Happy birthday Gamedev.net!

AaronWizardstar

Member Since 10 Jul 2011
Offline Last Active Jun 08 2013 08:18 AM
-----

#5067474 Battle System in a tactical battle (srpg style)

Posted by AaronWizardstar on 04 June 2013 - 04:16 PM

You mentioned that units have a set of stats that never change. Is there any type of advancement (automatic RPG-style, new equipment, heart container collection, buying upgrades with gold/credits/cash, etc.)?

 

Does initiative effect both the order units go in and how often a unit acts?

Making the faster units do less damage and the slower units do more damage seems to be a fairly common balancing trick.

 

Multi-attacks combined with being able to attack twice in a turn may need some consideration.




#5057475 How much of Boost do you use?

Posted by AaronWizardstar on 28 April 2013 - 09:56 AM

I needed a certain kind of library and saw one of Boost's libraries recommended over and over, so I've began installing Boost.
 
Having Boost has led me to thinking about all the other libraries in Boost I could be using. Like replacing all my maps with unordered_maps and replacing all my iterator-based for lines with foreach. It's a bit overwhelming since Boost introduces so many attractive features, but I have to learn its libraries first and also figure out where they fit into my existing code.
 
"Boostifying" a project would probably be impractical if it has a deadline or is made by a team, so I'm asking more from the perspective of an individual hobbyist developer.
 
So to all of those whose projects depend on Boost, how much of its libraries do you actually use?



#5032390 Indexing pixels in monochrome FreeType glyph

Posted by AaronWizardstar on 14 February 2013 - 04:53 PM

 

if it doesn't work try replacing with "(cValue & (128 >> (x & 7))) != 0"

That turned out to be the code to use. My final code looks like this:

 

GLubyte *imgBuffer = new GLubyte[glyph->bitmap.width * glyph->bitmap.rows * 4];

int pitch = abs(glyph->bitmap.pitch);

for (size_t y = 0; y < glyph->bitmap.rows; ++y)
{
    for (size_t x = 0; x < glyph->bitmap.width; ++x)
    {
        int imageIndex = (glyph->bitmap.width * y) + x;
        for (int i = 0; i < 3; ++i) // R, G, and B
        {
            imgBuffer[(imageIndex * 4) + i] = 255;
        }

        unsigned char *byteRow = &glyph->bitmap.buffer[pitch * y];
        char cValue = byteRow[x >> 3];
        bool filled = (cValue & (128 >> (x & 7))) != 0;

        // A
        if (filled)
        {
            imgBuffer[(imageIndex * 4) + 3] = 255;
        }
        else
        {
            imgBuffer[(imageIndex * 4) + 3] = 0;
        }
    }
}

Where imgBuffer is my final RGBA texture data (the fonts are sharing texture space with the sprites).




PARTNERS