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.


Messages - santiaboy

Pages: [1] 2 3 ... 8
1
SFML projects / Re: [SFML 2.1 and C++] 2D Shooter - Pew (Open Source)
« on: September 13, 2015, 06:01:49 pm »
Thanks, but re-reading the thread Alex said it first :P

You could still simply replace this
if (m_numInput.size() > 10){
        for (auto it = m_numInput.begin() + 10; it != m_numInput.end(); it++){
            it = m_numInput.erase(it);
        }
    }
 

with this

 m_numInput.resize(10);

looks cleaner  :P


The "erase" bit is important, though. C++ sometimes doesn't do what you expect it to do. Erase always throws me off.

2
SFML projects / Re: [SFML 2.1 and C++] 2D Shooter - Pew (Open Source)
« on: September 13, 2015, 12:25:54 am »
Hey man, if you are erasing, don't increment the variable. The "erase" erases the one pointing and then it goes to the next one.

Example:
You want to erase top 11 and 12. So you have 1,2,...,10,11,12.
You are pointing at top 11. Erase it and then you have 1,2,...,10,12 are pointing at 12. If you increment it, you will go past it.

    //erase all entries that are not in the top ten
    //but only if there are more than ten!
    if (m_numInput.size() > 10){
        for (auto it = m_numInput.begin() + 10; it != m_numInput.end();){
            it = m_numInput.erase(it);
            //it++; Don't increment it!
        }
    }
 

Besides that, I think you are trying to resize the vector. Simply use resize! It also works with lists.

So the final extract will be
    if (m_numInput.size() > 10){
        m_numInput.resize(10);
    }
 

3
SFML projects / Re: Kroniax available in the Play store!
« on: September 12, 2015, 08:05:00 pm »
Kroniax Strong! ;D

In Level 1 it says "Speed Cange". I am assuming you meant change, right? It is the same with "Grav Cange" and "Ceckpoint". The Hs are going rogue.

The little circle when the speed change happens it is a really nice touch.

I would change that the levels start automatically like Rayman Legends rather than clicking space to start. It has a "3, 2, 1 Go!" so you can get ready. If you crash, well you start over from 2 seconds ago. Or maybe leave it like this and implement the "3,2,1" for the next game!

Finally, I do not know what the "Refresh" button on the top left on the website does. I click it and nothing ever happens.

Cheers mate!

4
Graphics / Re: Rendering bug when upscaling smoothed texture
« on: September 12, 2015, 01:49:54 am »
Is there a reason why it only "happens" if the rectangle size is larger than texture rect? Is it because it actually happens all the time, but it doesn't render to the screen because it's less than 1 pixel width?


5
Hey guys, I think I found a bug when upscaling a smoothed texture. I tried replicating with a small example: The attached "upscalingBug.png" can be seen as three 64x64 squares. I render the middle square twice.

As far as I can see, if the RectangleShape is bigger than the textureRect it causes to render part of the neighbour if and only if the texture is smoothed. It results in this:



I saw a couple of threads in this vein, and those threads had movement and floating point error. I am rendering the squares on ints, and their size is ints.

Any idea what may be causing this? I thought about:
  • Something about smoothing texture and floating point arithmetic?
  • The image is wrong (unlikely as I tried a couple different, but hey it is a possibility)
  • This is "intented", as it is what OpenGL does.
  • An actual SFML bug

Cheers!

Example code:
#include <SFML/Graphics.hpp>

int main()
{
    int tilesize = 64;
    sf::RenderWindow window(sf::VideoMode(1280, 720), "upscaleBug?");

    sf::Texture texture;
    texture.loadFromFile("upscalingBug.png");
    ///Comment to watch the line dissapear
    texture.setSmooth(true);

    ///Setting up rectangles. Uncomment if you want to see 1:1 and 0.5:1
/*
    sf::RectangleShape rectSmall(sf::Vector2f(tilesize / 2,tilesize / 2));
    rectSmall.setPosition(50,50);
    rectSmall.setTexture(&texture);
    rectSmall.setTextureRect(sf::IntRect(tilesize,0,tilesize,tilesize));

    sf::RectangleShape rectSmall2(sf::Vector2f(tilesize / 2,tilesize / 2));
    rectSmall2.setPosition(82,50);
    rectSmall2.setTexture(&texture);
    rectSmall2.setTextureRect(sf::IntRect(tilesize,0,tilesize,tilesize));

    sf::RectangleShape rect(sf::Vector2f(tilesize,tilesize));
    rect.setPosition(50,100);
    rect.setTexture(&texture);
    rect.setTextureRect(sf::IntRect(tilesize,0,tilesize,tilesize));

    sf::RectangleShape rect2(sf::Vector2f(tilesize,tilesize));
    rect2.setPosition(114,100);
    rect2.setTexture(&texture);
    rect2.setTextureRect(sf::IntRect(tilesize,0,tilesize,tilesize));
*/

    sf::RectangleShape rectBig(sf::Vector2f(tilesize * 2,tilesize * 2));
    rectBig.setPosition(50,200);
    rectBig.setTexture(&texture);
    rectBig.setTextureRect(sf::IntRect(tilesize,0,tilesize,tilesize));

    sf::RectangleShape rectBig2(sf::Vector2f(tilesize * 2,tilesize * 2));
    rectBig2.setPosition(178,200);
    rectBig2.setTexture(&texture);
    rectBig2.setTextureRect(sf::IntRect(tilesize,0,tilesize,tilesize));

    ///Regular SFML Loop
    while (window.isOpen()){
        sf::Event event;
        while (window.pollEvent(event)){
            if (event.type == sf::Event::Closed)
                window.close();
        }

        window.clear(sf::Color::White);
        /*window.draw(rectSmall);
        window.draw(rectSmall2);
        window.draw(rect);
        window.draw(rect2);*/

        window.draw(rectBig);
        window.draw(rectBig2);
        window.display();
    }

    return 0;
}
 

6
General discussions / Re: SFML 2.2 Released!
« on: December 18, 2014, 05:02:52 pm »
Congratulations to releasing the first SFML team's update! ;D

7
SFML projects / Re: Faux Car
« on: December 11, 2014, 10:46:01 pm »
This is really cool! The acceleration and skidding sounds really remind me of these types of games!

8
Thanks Vlad! Comments like this make me really glad I am programming games! :)

9
Yeah, I had difficulties and I just gave up. At least for the alpha, I am sticking for 64 bits.
I am considering (for the final release) to set up a virtual machine with linux 32 bits and compile everything there.

10
Too bad this doesn't get more attention. ;)

Btw. how often do you update the Desura version?

Thanks exploiter! It may be because I am not good at marketing (getting better with time though!).

The Desura version was the previous one (Plataforma) and this is a new game (Plataforma ULTRA). The old one I uploaded it on November 2013 and I kept updating it until May 2014 and that's when I started with the ULTRA version.

This version will have more levels (90 instead of 30), new mechanics, and graphics. I also added some "meta-game" stuff such as achievements and unlocks, to keep players engaged.

My achilles' heel is the graphics part, and I am looking for an animator/artist. Ideally it would be an Argentinian one (I am from Arg) so I could talk him face to face but the indie scene here is really small. Keeping my hopes up though!

Very nice, kind and fun game!! Played it a work today  ;D Wanted to continue at home now, but didn't find x86 linux version :(

Does it exist? Because if I'll continue playing it at work - my boss will fire me  :D

Btw, is there any settings to switch game to windowed mode? (and to minimize window, when boss is nearby  :D)

For the time being there is no x86 linux. I have a 64 bits linux and I couldn't figure out a way to make one Linux version that works on both 32 and 64 bits. There is a less optimal version and that is to use WINE.

There is not a key to do it. You can go Main menu > Help and Options > Options > Video and untick "Fullscreen". Alternatively, if you are in-game Pause (P or Esc) > Options > Video.

Thank you both for the kind words!

11
Plataforma ULTRA's Alpha 4!

New on this alpha:
  • 5 new levels! (levels 61 to 65)
  • Level loading optimizations! (2 to 4 times)
  • Reorganized menus
  • New animations and general aesthetic improvement

On the new levels (levels 61 to 65) you will encounter a disappearing floor. This is a new never-seen-before state-of-the-art dashed-lines-look-cool mechanic!


Download alpha 4 now! Available for both Windows and Linux.


Windows version (32 and 64 bits)


Linux Version (64 bits). Ubuntu 14.04 or similar.

Remember to leave feeback, both positive and negative.

Hope you enjoy it!

12
Hey guys! I have been working on general animations. They are coming in ALPHA 4 (December).

In the meantime, enjoy this sneak peek: the new disappearing floor animation!


13
SFML wiki / Re: Letterbox effect using a view
« on: November 28, 2014, 08:49:45 pm »
Nice idea!

Why don't you use
void getLetterboxView(sf::View& view, int windowWidth, int windowHeight)
 
instead of
sf::View getLetterboxView(sf::View view, int windowWidth, int windowHeight)
 
?
It will avoid unnecessary copying.

14
Thanks! I'd love to hear what you think about it :D

15
Plataforma ULTRA's Alpha 3!


New on this alpha:
  • Achievements/Trophies
  • Unlockables (characters, sprite sheets, etc)
  • New "You win" and "You lose" screens
  • Several smaller improvement, such as camera tweaks

Download for both Windows and Linux.

Windows version (32 and 64 bits)


Linux Version (64 bits). Ubuntu 14.04 or similar.

Wanna know more? Visit our official website or follow @santi_aboy on twitter!

Pages: [1] 2 3 ... 8