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

Pages: [1]
1
General / Re: A noob can't handle lists
« on: November 30, 2017, 02:27:17 pm »
Hello, I think I can help (if you haven't figured it out yet).
It looks like you made some basic mistakes. Have you read the tutorials and stuff? You really shouldn't spend 6 days on such a problem, it's usually just a small mistake :)
First, understand how sf::Texture works. You are loading a texture and then copying it into each object. I don't think you should ever copy a texture like that.
A sf::Texture lives in the GPU memory and there it only ever needs one copy that it can draw in different places. I don't know why copying only doesn't work for the walls (shouldn't it? Still kind of a noob myself... It might be your drawing code), but even if it did, it wouldn't make sense.
I compiled your code and for me all 7 rectangles are white, so it even depends on the system/compiler, which is weird. But saving the texture as a reference in the Wall class (I added 3 '&'s) and making a second sf::Texture for the other wall in main() fixes it.

I really don't know why your version didn't work, though.

Also, if I replace the std::list of walls with a std::vector it works exactly the same. I don't think you should use lists if you can replace it that easily with a vector. But maybe you have some bigger plans where a list makes sense.

2
SFML projects / Re: Curve Masters - Worth continuing?
« on: November 30, 2017, 11:39:07 am »
Having a quick Google search, shows the game always with a black background, which I have to say looks best out of the screenshots you have on itch.io.
The ones with color backgrounds are problematic because you use complementary colors, so you get the highest contrast possible, which leads to eye-hurting experiences. You could try to make the static objects in the puzzle mode less single-colored or try out a whole different palette of colors. Like go with softer tones instead of plain colors, maybe some pastel colors?
Oh, I didn't put that much thought into the colors. I made it so you can change the background color in the main menu by clicking in different places. Top left makes it black (default). I just thought it's funny being able to change it like that :D
But you are right, I didn't think that choosing nice colors is so important for the first impression, thanks for the suggestion, I will try something like that.

3
SFML projects / Re: Curve Masters - Worth continuing?
« on: November 30, 2017, 10:50:40 am »
Hey, thank you for responding Tank and eXpl0it3r!

Your goal should be making the game polished and fun to play. Distribution is what follows thereafter. At first you need a good product, then you take care of marketing.

Of course it's worth working more on it — if that's what you want. Don't see releasing on Stream as the ultimate goal, it's just one form of distribution and marketing that you may use after you already made a fun game to play.
You are right of course, the first goal should be to make a fun game that I feel confident about before releasing it. But I was simply frustrated working on it for so long without having anyone to share it with.
I learned C++ by myself and have zero experience, which resulted in a code mess... I would have to redo most of it from the start and so I was hoping to see if people would be interested before doing that.
The few people I showed it to thought it's a great idea, but they all knew the original "Achtung, die Kurve!" and know how much fun it can be with local multiplayer. But hoping for a sudden hype from nostalgic people was probably wrong :D

itch.io can get in the multiple of hundred games a day that get uploaded. Just uploading it and expecting people to see, download and play it, is a wrong expectation to have. ;)
Yes, that's true, I didn't expect it to get much attention, but I was hoping for more than 3 downloads and 0 comments... xD But growing some kind of community first seems really hard / impossible alone :(

I do agree with Tank, that the game needs some polish, especially in the graphics department. Plain colors with high contrasts isn't considered very pleasing to the eyes. Which then leads to people just not getting interested enough to click on the thumbnail among all the other games if it does come up on someone's list.
Hmm I didn't see the graphics as a concern, I only wanted it to look like the original. There is not really much I could do, as it needs pixel-perfect collision, so I have to draw to a sf::Image at the same time that is used for the collision detection (Pixels in front not transparent -> collision). Implementing that was already difficult enough (as a beginner).
I showed it to a friend who showed me the original "Achtung, die Kurve!" back in school and he loved it, because he knew it's supposed to look like that. I guess I was hoping for other people with nostalgia for it.

So, I guess it's better if I work on easier projects first, so I can show something worth sharing before getting frustrated, right? I do have many other ideas :)

4
SFML projects / Curve Masters - Worth continuing?
« on: November 29, 2017, 04:13:33 pm »
Hello everyone!

I decided to share a project (my first and only one so far) that I gave up on some time ago. It was meant to be an Android game that is a "clone" of Curve Fever (Achtung, die Kurve!), but with some new mechanics to make it more interesting ("Extreme" means with rockets and stuff : )  There is also a "Solo mode", which is like a puzzle game as a snake/curve. The other modes are local multiplayer only for now.
Curve Fever is a really fun game you play together on one keyboard, if you didn't know. We loved it in school

I had some problems with SFML+Android (either SFML's bugs or i misused the NDK), I posted here but no one responded so I was sad and gave up :(
But after a lot of work I wanted to release something, so I turned it into a PC game and uploaded it on itch.io a few months ago, but no one noticed it.
It is unfinished and not very polished yet, but does anyone think this would be worth working on more and later maybe release it on Steam?
Would be awesome if someone interested could test it, I don't even know if it works on other PCs :D

https://exilef.itch.io/curve-masters-extreme

5
Graphics / Re: Weird stuttering issue
« on: February 12, 2017, 12:42:46 pm »
Hello. I think it might be the Windows Nvidia driver doing something weird when the program is "too fast". The same thing happens for me on Windows, but on Linux (same PC, same code) it's gone. I had the same problem before and it magically disappeared when the program had more to do in every frame. Now I finally know why.
I also found this thread: http://en.sfml-dev.org/forums/index.php?topic=16449.0. It's old, but I think it's the same problem. The solution for them was to turn off Threaded optimization.

6
So, does no one here care about Android? :(
The problem has now gotten bigger. On one device (Huawei P9) a RenderTexture (not copied) doesn't show anything. Calling display() does nothing at all. Only copyToImage() (without using the copy) updates the original Texture, as display() should do.
I haven't seen it myself, but I was told that after leaving it ~5 min it suddenly gets updated and shows the Texture, not sure if that information is useful.
I know it's still called experimental, but I was hoping someone would know a workaround or could tell me how to fix it myself.

Copying every frame is slow, so I don't know how to deal with this problem anymore...

7
Hello everyone!
I'm making an Android app and I have a weird problem that I can't explain. When I draw something to a sf::RenderTexture, retrieve the Texture and then copy it to an image the image is flipped. So, when I do something like this:

#include <SFML/Window/Event.hpp>
#include <SFML/Graphics.hpp>
int main()
{
    sf::RenderWindow window(sf::VideoMode(1000, 800), "Test");
    window.setVerticalSyncEnabled(true);

    sf::RectangleShape rect({ 100.f, 200.f });    rect.setOrigin(rect.getSize()/2.f);
    rect.rotate(40.f);
    rect.setPosition(rect.getGlobalBounds().width/2.f, rect.getGlobalBounds().height/2.f);

    sf::RenderTexture renderTex;
    renderTex.create(rect.getGlobalBounds().width, rect.getGlobalBounds().height);
    renderTex.draw(rect);    renderTex.display();
    sf::Image img = renderTex.getTexture().copyToImage();  // Flipped here
    sf::Texture imgTex;    imgTex.loadFromImage(img);

    sf::Sprite spriteTex(renderTex.getTexture());
    sf::Sprite spriteImg(imgTex);
      spriteImg.setPosition(spriteTex.getGlobalBounds().width, 0.f);

    while(window.isOpen())
    {
        window.clear();   window.draw(spriteTex);   window.draw(spriteImg);   window.display();

        sf::Event e;    window.pollEvent(e);
        if(e.type == sf::Event::Closed)  window.close();
    }
}
on my Android device (or emulator) I get a rectangle on the left that is rotated clockwise (as it should be) and next to it the rectangle from the image that is flipped. If I set a Texture to the RectangleShape you can see it is flipped vertically. But on Linux/Windows with the same code I get two identical rectangles.

The same thing also happens if the Texture from the RenderTexture is copied to another Texture. And as the Copy-Constructor for sf::Texture (or operator=) also internally calls sf::Texture::copyToImage that function is probably the problem. There does seem to be some OpenGL ES specific code in that function (https://github.com/SFML/SFML/blob/master/src/SFML/Graphics/Texture.cpp#L322), but I don't really understand what happens there. If the copied Texture is copied again (or if a normal Texture is loaded from a file and copied) it won't get flipped, only when the Texture bound to the RenderTexture is copied.

Usually if you forget to call sf::RenderTexture::display the resulting Texture is flipped vertically, as it happens here. This does happen if the referenced Texture is given directly to a sprite. But if it is copied without calling display() it won't get flipped again. Thus, copying the Texture acts like display() was never called.

Did I miss something? Or did I find a new bug? I should have the latest SFML version. I temporarily fixed it by calling sf::Image::flipVertically, but an explanation would be nice.

Edit: Shortened the post.
Edit2: Almost 2 weeks and no response. Did I do something wrong? :(

Pages: [1]
anything