Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - two-tone-

Pages: [1]
1
I thought of putting this in Feature Requests but decided against it because while I do want this I'm just wanting to generate discussion around the topic.

Examples of texture compression algorithms are S3TC, ETC, and the newer ASTC.

2
Graphics / Complicated movement question
« on: February 01, 2014, 10:16:33 am »
My player sprite has a total of 8 different locations it could be on screen based on keyboard input.  If a player presses the A key it sends the sprite to the "A" location. If they press the L key it sends the sprite to the "L" location.

My question is how do I create a movement function that can send the player to any of the 8 locations from any of the other 7 locations without having to write 64 if/else-if statements?  And how can I make sure that it is extensible in the future? So that if I need to bump up or down the amount I don't have to write or remove a dozen statements.

3
The idea is pretty simple, I would like to write a switch that reads the output from sf::Keyboard. I know I could create a series of if statements, but I feel that makes my code harder to read/more complicated than need be.

I would like it to be something similiar to this

switch(keyboardState)
{
    case A:
        {
            //does stuff
        }
}

4
OS: Win 7
IDE: CodeBlocks 12.11
Compiler: Defualt GCC (MinGW) for code blocks
SFML: 2.1

Well, I have two main issues.  I have a function where I set up the window and everything else called Start().  But for some reason if I don't include iostream that function is either skipped or the window is not drawn. Not sure which but I'm thinking it's the former.  Compiles just fine without iostream though

My other issue is that in Start() I have a while loop with another function in it.  Everything SFML related in that function seems to be ignored.

Compiles just fine, only run time errors are the two that I listed.



Pages: [1]
anything