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

Recent Posts

Pages: [1] 2 3 ... 10
General discussions / Re: Why doesn't anti-aliasing work with textures?
« Last post by Laurent on Today at 04:32:35 pm »
As far as I know, antialiasing only smoothes geometry edges. It doesn't care about texture data (otherwise you'd just end up with a blurred framebuffer).
General discussions / Why doesn't anti-aliasing work with textures?
« Last post by swetroniusz on Today at 03:09:49 pm »
Hey  ;)!
As far I can know, you enable MSAA in SFML like this:

sf::ContextSettings settings;
settings.antialiasingLevel = samples;
sf::RenderWindow window(sf::VideoMode(SCR_WIDTH, SCR_HEIGHT), "super creative title", sf::Style::Default, settings);

This, however, doesn't anti-alias textures. Why is that? I know you can use sf::Sprite::setSmooth() but I'm really confused by this. When you use multisampled color buffers, every fragment has to check the coverage multiple times, so it should work with the textures as well.
At this point it is just for fun for me, so the graphics I will use will be old format...likely those ripped from the Bards Tale games from the 80's. I have no issue in doing the extra work since it will be needed.

I am really looking to do a pseudo-3D format since that is what I grew up on. I'm not looking for anything with up-to-date graphics because this is just for fun, but it does seem like a viable option to use SFML.

Thanks for the info.

Audio / Re: Free music resources?
« Last post by rileyman on Today at 03:25:40 am »
I'm always looking for free / royalty free sources of music as well, so I'll be checking out the suggestions here as well  :D

My contribution:

Lots of great stuff here under creative commons!
General discussions / Re: Advice on "actually" making games with SFML?
« Last post by rileyman on Today at 03:16:05 am »
This may or may not apply to your situation...  What's helped me get focused on getting back into game development recently is simply limiting the scope of my first few projects.  I finished a simple Pong game, added some game options to it.  Now I'm moving to the classic "Snake" game.  Each new project will get a little more ambitious -- and hopefully put me in a better position as I build up a code base, design experience, etc.

In my first go of things (in the 90s and early 2000s), I was no stranger to what you're describing -- starting something, getting part-way, and finally giving up and letting other pursuits take over.  My past ten years I'd let work (I'm a web application developer) sort of take over.  Hopefully my recent strategy of just getting some simple games *done* will take hold...

(And while I'm here... hello SFML forums!  Just getting started with SFML!)
General discussions / Re: Advice on "actually" making games with SFML?
« Last post by Nexus on August 19, 2019, 10:17:38 pm »
I somewhat disagree with the approach of writing the engine first and then the game. You end up inventing a lot of features you don't need, while missing several you do need. Trying to extract and generalize components from a working game can be more organic, even if it comes with some refactoring. Plus, it won't leave you working for months on an engine without doing any progress game-wise.

Now how to get to a working game? You're talking about piling up features, which may bring you closer to your goal in terms of visible progress, but it comes at the cost of accumulating technical dept -- the messy code that you yourself don't understand after some time. At the risk of sounding obvious, you need to count in extra time that will be spent just on refactoring and cleaning up -- that is, functionality is kept exactly the same, but code structure and organization is improved. If you're doing it for the first time, it can be helpful to be strict about this: don't try to add even the slightest game-related feature while doing refactoring; make sure that the playing/running experience is exactly the same.

Refactoring and robust code architecture is a huge topic on its own, and there are libraries full of books about it. Delving into some research would definitely give you a nice overview (there's also a bunch of Internet resources, e.g. about design patterns). Apart from that, you should probably investigate your own code and ask the question "why is it messy?". What are the patterns that make it hard to understand? Once you found that out, look for solutions about these problems, one by one. For example:
  • Lots of duplicate code -> reuse code in functions, classes, templates
  • Too many dependencies between different parts (e.g. graphics, game logic, input) -> split your application into modules, and limit interfaces between modules to a single class/interface
  • Doing a lot of algorithms/data structures/for loops by hand -> check out STL and other C++ libraries

Having said that, there are some extensions to SFML that may make it easier to use certain features without starting from zero. I wrote the library Thor, which contains particle systems, animations, vector algebra among others. There are other snippets and libraries listed on the SFML Wiki.
Graphics / Re: Texture.loadFromFile() accessing invalid memory location
« Last post by G. on August 19, 2019, 08:14:06 pm »
Use the debug libraries when you compile in debug mode and use the release libraries (the "non debug" ones) when compiling in release mode.
Graphics / Re: Texture.loadFromFile() accessing invalid memory location
« Last post by RedstonerKBC on August 19, 2019, 07:45:44 pm »
Update: I switched to the Debug version of the libraries and now my code runs fine with no issues. I'm curious though, why? When should I use the debug vs non-debug libraries?
General discussions / Re: Create a 2.5D game like Wizardry/Bard's Tale
« Last post by Nexus on August 19, 2019, 06:59:31 pm »
2.5D can refer to many graphical styles (isometric, emphasized use of parallax, 2D movement in 3D world, etc.), but most common to those is the emulation of 3D-looking graphics by 2D techniques only.

So, according to this definition: yes, it's possible to do 2.5D with SFML, as the latter provides the 2D tools you need. The more interesting question is, what kind of graphics style you're aiming for. Most probably you will need to invest some effort on top of SFML, as it comes with rather basic features. Most of this extra effort will be mathematics, to calculate angles and distances in your perspective of choice, and I think you will find a lot of it on the Internet.
Window / RenderWindow::pollEvent() appears to not be working
« Last post by NipIsTrue on August 19, 2019, 05:54:57 pm »
The window.pollEvent() function in my game loop appears to not be handling any events, and the created window won't respond to anything. Here is the code for my game loop:
void Application::run()
                sf::Context context;

                while (window.isOpen())
                        sf::Event e;
                        std::cout  << "loop" << std::endl;
                        while (window.pollEvent(e))
                                std::cout << "event" << std::endl;



The print statement never prints "event", but "loop" prints repeatedly, so I know the loop is running. The result is that the window won't respond if I try to resize it or close it, and eventually windows marks it as "not responding". I am using the snapshot from    13-May-2019 19:49 from the download page.
Pages: [1] 2 3 ... 10