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 - bitano

Pages: 1 2 [3] 4 5 6
31
General / Re: Project_battleship: question about events
« on: March 24, 2016, 10:18:50 am »
I tried to do that many times but I failed!  ::)
Success is stumbling from failure to failure with no loss of enthusiasm!
Go go fail again until you succeed :D

Good luck!

32
Graphics / Re: Text Input - Handling press of backspace.
« on: March 24, 2016, 08:07:55 am »
Laurent already posted a working piece of code, but here it is again, using your vars :-)
Assuming playerInput is an sf::String.

if (event.type == sf::Event::TextEntered) {  
    if (Event.Text.Unicode == '\b') { // handle backspace explicitly
        playerInput.erase(playerInput.size() - 1, 1);
    } else { // all other keypresses
        playerInput += static_cast<char>(Event.Text.Unicode);
    }
}
 

33
SFML projects / Re: [2D Platformer] Melting Saga
« on: March 24, 2016, 07:58:41 am »
I'm always in for some testing!

34
General discussions / Re: SFML is Great!
« on: March 24, 2016, 07:56:49 am »
Awesome. I totally agree :)

Care to share any of those games in the SFML Projects forum?

35
SFML projects / Re: K Station: An adventure game of disappearing lives
« on: March 23, 2016, 06:00:32 pm »
I like the old school look as well as the adventure genre. it reminds me a lot of certain commodore 64 games i played.

What i never liked though was the command line input. It suggests an amount of freedom, but instead often resulted in "I don't know what you mean".
I loved the SCUMM(tm) interface that was incorporated in all the LucasFilm / LucasArts games

36
SFML game jam / Re: 5th SFML Game Jam
« on: March 23, 2016, 02:57:29 pm »
Is it just me who's disappointed by the turnout?
I get why you'd say this.

There could be several reasons (or a combination thereof) for this outcome. Possibly related to:
- The size of the truly active core of community (participants)
- The communication / marketing of the game jam event
- The frequency of the event (currently once a year?)
- the background and therefore perhaps the popularity of the event

I'm quite new here so i can't really discuss any of the above possibilities.I like the idea of a game jam though. A means to demonstrate your skills and/or creativity in a fun way.
But was is the SFML drive behind the Jam?

And what would you suggest to improve the results of a possible future game jam? I am just that curious :D

[UPDATE]
Reading through other threads, SFML's drive would be to share the source code of those game jam creations with the community, which makes sense obviously :D

37
Window / Re: Interprocess Comunication (SendMessage / GetMessage)
« on: March 22, 2016, 10:57:14 pm »
So 1 application is your SFML application. What kind of application is the other one?

If you have full control over both applications and all you want is for them to communicate with eachother, you *could* also consider using a TCP listener and sending packets.

Or is that way off target?

38
Kind of a shame. It kind of suits the style ;)

This could easily be solved with: VIDEO Settings -> Hapax mode :D

39
SFML projects / Re: Pointless Wars - [Turn-Based Pointless Strategy]
« on: March 22, 2016, 04:44:17 pm »
I can't go against such strong arguments.
Problem solved, battle happens midnight now.

...

Cheers!

Hahaha delivering exactly what the playerbase expects! Well done :D

40
SFML projects / Re: Pointless Wars - [Turn-Based Pointless Strategy]
« on: March 22, 2016, 02:39:52 pm »
Are you saying the battle should not happen at 12:00pm?
Hehehe well, I'll see about that
Obviously not! 12pm is lunchtime. Civilized warlords take this into account. bur!

41
SFML projects / Re: [2D Platformer] Melting Saga
« on: March 21, 2016, 11:07:26 pm »
Nice. Looking good!!!

The jumping looks a bit teleporty. Don't know if that's intended. But i like the pace of the game and the looks are nice :D

Keep posting the updates please

42
SFML projects / Re: Faunus Fields
« on: March 21, 2016, 10:54:40 pm »
Hi!

It looks very interesting. Looks like it has quite a few mechanics in place already. The threat of the beast i think is quite original for the genre. I hope to see more progress updates in this thread. :D

Want to share what your focussing/working on next?

43
Graphics / Re: Size depending on pixels
« on: March 21, 2016, 09:06:38 pm »
    sf::Image srcImg, destImg;
    srcImg.loadFromFile("img_in.png");
    sf::Vector2u dims = srcImg.getSize();
    sf::IntRect rect = sf::IntRect(-1, -1, -1, -1);
    for (sf::Uint16 x = 0; x < dims.x; x++) {
        for (sf::Uint16 y = 0; y < dims.y; y++) {
            if (srcImg.getPixel(x,y) == sf::Color::Transparent) continue; // don't do anything when pixel's transparent
            if (rect.left   == -1 || x < rect.left)   rect.left   = x;
            if (rect.top    == -1 || y < rect.top)    rect.top    = y;
            if (rect.width  == -1 || x > rect.width)  rect.width  = x;
            if (rect.height == -1 || y > rect.height) rect.height = y;
        }
    }
    destImg.create(rect.width-rect.left+1, rect.height-rect.top+1, sf::Color::Transparent); // resize dest img
    destImg.copy(srcImg, 0, 0, rect, true); // copy defined rectangle of the source image to destination
    destImg.saveToFile("img_out.png");
 

This is the best i could come up with atm...I'm actually working so don't have more than notepad :D
Hope it works or at least steers you into the direction of your solution

[UPDATE]
Tested it at home just now, made some slight changes, but it works so yeah. Depending on what you want to use it for this bit of code might suit you.

44
Graphics / Re: Size depending on pixels
« on: March 21, 2016, 08:33:01 pm »
So you want a function that checks the pixels of an image, and returns the smallest possible rectangle that encloses the "shape" (defined by non-white pixels? black pixels?) in it?
Yeah looks like he wants to crop the actual image content inside an image. But are the images indeed black/white? or do you want to check for any colour pixels against a single color background?
Or do you want to check against alpha channel?

45
Graphics / Re: Size depending on pixels
« on: March 21, 2016, 04:48:27 pm »
I want to help...but i have no idea what you're talking about or what you're trying to accomplish...

Is it me, or...?  :(

Pages: 1 2 [3] 4 5 6