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

Pages: 1 [2] 3
16
General discussions / Thank you guys for making SFML
« on: August 20, 2014, 10:41:22 pm »


You've made this world a better place, because now I can create awesome games like Bouncing thingy
(click to show/hide)

17
General / Get screenshot
« on: August 20, 2014, 08:58:52 pm »
So, is there any way I can save current drawn screen to .png or any other picture format?

18
SFML projects / Bouncing Thingy v1.9
« on: August 20, 2014, 07:00:03 pm »






Fullres images:
http://s27.postimg.org/4b9qd19cx/image.png
http://s9.postimg.org/6upnx7dz1/image.png

Check it out and post feedback!
Source: http://www.mediafire.com/download/pjbedqke837l2hu/BouncingThingysourcev1.9.zip
Linux x64 precompiled: http://www.mediafire.com/download/1m1w6pwpc0v1513/BouncingThingyLinux64v1.9.tar.gz

Changelog:
-Escape shortcut to exit game
-ALt+ Enter to change from fullscreen to windowed and vice versa (options will be saved)
-Main menu added
-Options menu added
-new text that shows current ball speed
-take screenshots with F12

Please comment my coding!
Is my coding stupid, messy?

(click to show/hide)

19
General / Compiling problem
« on: August 20, 2014, 04:02:05 pm »
So, when I compile file in Linux whenever I try to run it by double clicking it opens, but no fonts, images nor sounds are loaded. I can run it via terminal ./[file name] and everything works fine. Is that normal?

20
General discussions / awesome youtube channel
« on: August 20, 2014, 01:49:30 am »
while we are here on the forums spamming, some other people are even working and have awesome projects:




He is worth admiring. I'm not saying that you guys aren't, I just didn't saw your projects.

21
Window / Minimise window and/or change view modes
« on: August 18, 2014, 05:50:12 pm »
I know none of those 2 are supported by default in SFML, but how can I achieve that effect?
Does anyone know?
If I didn't knew it was bad idea I would use goto and close that window and then again open it in the fullscreen.

22
General / Make old text dissappear and new appear in sf::Text
« on: August 15, 2014, 10:47:35 pm »
So, I'm trying to display value that is constantly changing with sf::Text, but instead of changed value I get something like this (attachment).
Here is my code:
std::string ballSpeedString;
    std::stringstream convert;
    font.loadFromFile("LCD_Solid.ttf");
    ballSpeedText.setFont(font);


ballSpeedText.setString("");
    convert << (int)moveSpeed; //moveSpeed of the ball
    ballSpeedString = convert.str();
    ballSpeedText.setString(ballSpeedString);
 


23
General / RPG Character generator
« on: August 15, 2014, 12:02:58 am »
So, I wanna create RPG game and I want for player to be able to create his character and I want it to have all customization options from Famitsu generator (http://www.famitsu.com/freegame/tool/chibi/index1.html).
So do I have to create every combination (hairs, bodies, sexes etc.) or is there smarter way?

24
General / Bug report
« on: July 27, 2014, 04:25:59 pm »
For some reason in this code:
#include <iostream>
#include <SFML/Graphics.hpp>
#include <ctime>


int main()
{
    enum Direction{Down, Left, Right, Up};
    sf::Vector2i cut(1, Down);
    sf::Vector2i screenRes(800,600);
    sf::Vector2f pos(0, 0);
    sf::RenderWindow window(sf::VideoMode(screenRes.x,screenRes.y), "My ghaaaame");
    sf::Time eTime;
    sf::Texture pTexture;
    sf::Sprite pImage;
    sf::Clock clock1;
    float charSpeed = 2.5;
    int refresh = 75;

    if(!pTexture.loadFromFile("playerimage.png"))
            std::cout << eTime.asMicroseconds() << " -No player image in the folder!" << std::endl;


    while(window.isOpen())
    {
        pImage.setTexture(pTexture);

        eTime = clock1.getElapsedTime();


        sf::Event event;
        while(window.pollEvent(event))
        {
        switch(event.type)
        {
            case sf::Event::Closed:
                window.close();
            break;
        }
        }
        if(sf::Keyboard::isKeyPressed(sf::Keyboard::Right))
        {
            cut.y = Right;
            if(eTime.asMilliseconds()>= refresh)
            {
            cut.x++;
            clock1.restart();
            }
            pos.x+= charSpeed;
        }
        else if(sf::Keyboard::isKeyPressed(sf::Keyboard::Left))
        {
            cut.y = Left;
            if(eTime.asMilliseconds()>= refresh)
            {
            cut.x++;
            clock1.restart();
            }
            pos.x-= charSpeed;
        }
        else if(sf::Keyboard::isKeyPressed(sf::Keyboard::Down))
        {
            cut.y = Down;
            if(eTime.asMilliseconds()>= refresh)
            {
            cut.x++;
            clock1.restart();
            }
            pos.y+= charSpeed;
        }
        else if(sf::Keyboard::isKeyPressed(sf::Keyboard::Up))
        {
            cut.y = Up;
            if(eTime.asMilliseconds()>= refresh)
            {
            cut.x++;
            clock1.restart();
            }

            pos.y-= charSpeed;
        }

    if(cut.x >= 3)
        cut.x = 0;
    pImage.setTextureRect(sf::IntRect(cut.x * 32, cut.y * 32, 32, 32));
    pImage.setPosition(pos.x, pos.y);
    window.clear(sf::Color::White);
    window.draw(pImage);
    window.display();
    //window.setFramerateLimit(15);
    }

}

when charSpeed = 2.5
sprite becomes deformed (attachment)

with any other number it is fine. Even with 2.4 and 2.51


25
SFML projects / Bouncing thingy game (released)
« on: July 26, 2014, 05:26:04 pm »
So, I've created new game in SFML.
Game is made so that you can modify any value like moveSmoothness, bouncerSpeed, ballSpeed, playerWidth, playerHeight, ballSize, resoution.







V1.0
Source code: http://www.mediafire.com/download/zw1pskirsqn0tc8/SFML_bouncingThingy_source.zip
Prebuild 32bit Linux: http://www.mediafire.com/download/zw1pskirsqn0tc8/SFML_bouncingThingy_source.zip

V1.1
Source code:
http://www.mediafire.com/download/3ycpgw1uu2xtcqi/bouncingthingy_v1.1_source.zip
Prebuilt for 32bit Linux:
http://www.mediafire.com/download/l04l6ebreev4u52/bouncingthingy_v1.1_lin32.tar.gz

26
General discussions / I've found book for learning C++
« on: July 11, 2014, 06:42:14 pm »
Sadly it isn't on english. What should I do? It has everything. Even how to create your own SFML like library. Should I buy it. Is reading programming book in English so important?
Sry for asking about c++ question, but I'm in the hurry.

27
General / c++ question, auto x doesn't work.
« on: July 11, 2014, 11:08:37 am »
void print()
{
   int v[] = {0,1,2,3,4,5,6,7,8,9};

     for (auto x : v)              // for each x in v
          cout << x << '\n';

     for (auto x : {10,21,32,43,54,65})
          cout << x << '\n';
     // ...
}

It says that x doesn't have a type, but shouldn't auto give him needed type?

28
General discussions / any simple example of SFML game
« on: July 10, 2014, 11:31:24 pm »
So, can anyone suggest me some simple SFMl project (as simple as possible, it even doesn't have to be playable.) so that I can see how should I create next game or rewrite my snake game.

29
SFML projects / Sfml snake game
« on: July 10, 2014, 01:15:06 pm »
Game demo:

Also here is link for precompiled 32bit Linux version:
https://www.mediafire.com/?aia1o92vo3njn2d

30
General / How to show value of some variale using font
« on: July 08, 2014, 02:09:19 pm »
I'm curently creating snake game, and when game ends I wanna make it show players score. So, how can I make it show actuall number?

Also I know that name of my game is horrible, I'll change it later.

Pages: 1 [2] 3
anything