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

Author Topic: SFML 3 - What is your vision?  (Read 236160 times)

0 Members and 2 Guests are viewing this topic.

therocode

  • Full Member
  • ***
  • Posts: 125
    • View Profile
    • Development blog
Re: SFML 3 - What is your vision?
« Reply #105 on: May 02, 2014, 05:25:39 pm »
Easy solution: using Camera = sf::View;

:D

NoobsArePeople2

  • Newbie
  • *
  • Posts: 47
    • View Profile
    • Email
Re: SFML 3 - What is your vision?
« Reply #106 on: May 02, 2014, 07:58:44 pm »
So you want to add a second class that does the same as sf::View but with another name? ???

The tutorial on Views is called Controlling the 2D camera with views which implies that View is the camera but doesn't explicitly state it (the word "camera" is only used in the title"). Maybe adding a sentence in the opening section that states something along the lines of, "a View is what you use for a camera in SFML" would clear this up?

Ricky

  • Jr. Member
  • **
  • Posts: 99
    • View Profile
    • Tejada
    • Email
Re: SFML 3 - What is your vision?
« Reply #107 on: May 03, 2014, 01:13:13 am »
Maybe what he meant was a multi purpose "view" for 2d and 3d perspectives? Though this is not what sf::View is currently, not even close to being similar.

Maybe in the future if SFML moves towards 3d but I still think sf::View will have it's purpose because a view is not a camera. Or maybe I'm the one confused?  ???
Wilt thou yet say before him that slayeth thee, I am God? but thou shalt be a man, and no God, in the hand of him that slayeth thee.

gabrieljt

  • Newbie
  • *
  • Posts: 18
    • View Profile
    • Email
Re: SFML 3 - What is your vision?
« Reply #108 on: May 03, 2014, 10:11:08 am »
Thor integration and then SFML Game Development Book Reloaded.


Deathbeam

  • Jr. Member
  • **
  • Posts: 82
  • VB6, VB.NET, C#, HTML, PHP, CSS, JavaScript nerd.
    • View Profile
    • My portfolio
    • Email
Re: SFML 3 - What is your vision?
« Reply #109 on: May 03, 2014, 11:44:56 am »
I am not sure if this should be added in 3 or 2.2, but in SFML.NET there is no way to check if creating RenderTexture was succesfull or not. It is usefull when target PC do not supports that large render texture as programm is trying to create. I am sure that in original SFML it is possible to check it, but in .NET binding I do not found any way to do it.
Spooker Framework - Open source gaming library
My portfolio
Indie Armory - Small community of a game developers. Everyone is welcome. Bring your friends, family, pets...

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: SFML 3 - What is your vision?
« Reply #110 on: May 03, 2014, 12:25:55 pm »
Quote
I am not sure if this should be added in 3 or 2.2, but in SFML.NET there is no way to check if creating RenderTexture was succesfull or not.
This is just a small issue that needs to be addressed quickly. Here we'd rather like to hear about your vision of what SFML 3 should be ;)
Laurent Gomila - SFML developer

Deathbeam

  • Jr. Member
  • **
  • Posts: 82
  • VB6, VB.NET, C#, HTML, PHP, CSS, JavaScript nerd.
    • View Profile
    • My portfolio
    • Email
Re: SFML 3 - What is your vision?
« Reply #111 on: May 03, 2014, 12:53:36 pm »
Quote
I am not sure if this should be added in 3 or 2.2, but in SFML.NET there is no way to check if creating RenderTexture was succesfull or not.
This is just a small issue that needs to be addressed quickly. Here we'd rather like to hear about your vision of what SFML 3 should be ;)
I already stated that I would like to see SpriteBatch in SFML 3, and it is not very small issue, becouse for example I am using rendertexture for my lighting system, and when it fails to create it, no lights are displaying :D
Spooker Framework - Open source gaming library
My portfolio
Indie Armory - Small community of a game developers. Everyone is welcome. Bring your friends, family, pets...

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6286
  • Thor Developer
    • View Profile
    • Bromeon
Re: SFML 3 - What is your vision?
« Reply #112 on: May 03, 2014, 12:57:52 pm »
Thor integration
What features do you have in mind? And don't say "everything", I'd really like to know which parts of Thor you (and others) use most.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: SFML 3 - What is your vision?
« Reply #113 on: May 03, 2014, 01:37:21 pm »
Quote
it is not very small issue, becouse for example I am using rendertexture for my lighting system, and when it fails to create it, no lights are displaying
Yes of course it is an important bug... but it's probably fixed in 5 minutes. You understand that it is not this kind of feedback we're expecting in this thread, do you? :P
Laurent Gomila - SFML developer

gabrieljt

  • Newbie
  • *
  • Posts: 18
    • View Profile
    • Email
Re: SFML 3 - What is your vision?
« Reply #114 on: May 03, 2014, 08:25:44 pm »
Thor integration
What features do you have in mind? And don't say "everything", I'd really like to know which parts of Thor you (and others) use most.

haha, i get it.

mainly the graphics module for animations, particles and the necessary tools to create a GUI with more ease.

but i must admit that i didn't use Thor very much (yet) so i cant give a more precise answer.

dixondean25

  • Newbie
  • *
  • Posts: 42
    • View Profile
    • Email
Re: SFML 3 - What is your vision?
« Reply #115 on: May 04, 2014, 01:39:32 am »
maybe integrating the functionality projects of SFML into just one thing.

metsuro

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: SFML 3 - What is your vision?
« Reply #116 on: May 04, 2014, 01:56:35 am »
maybe integrating the functionality projects of SFML into just one thing.

So what like taking Thor, SFGUI, SFNUL or whatever and just making one SFML-Extended project?

Ixrec

  • Hero Member
  • *****
  • Posts: 1241
    • View Profile
    • Email
Re: SFML 3 - What is your vision?
« Reply #117 on: May 05, 2014, 11:32:19 pm »
It just hit me: no one has brought up whether SFML 3 should switch to using exceptions for its errors or not.

Personally, I would like SFML 3 to use exceptions.  I've read about the arguments people have against them many times in the past, and I've never found them very persuasive.  The advantages of exceptions vastly outweigh the disadvantages in my mind.

Alternatively, it'd also be cool if SFML 3 offered the option to toggle between error codes and exceptions, though I'm not sure if that's feasible.  If it matters, I like the scheme used by boost filesystem where you pass an error code object to the function if you don't want it to throw exceptions.

Oh, and if sf::err continues to exist in SFML 3, at the very least it should be made more obvious in the tutorials.  I literally didn't know it existed for the first few months I was using the library.  I only started looking for it because I needed to get at shader compilation errors.

MorleyDev

  • Full Member
  • ***
  • Posts: 219
  • "It is not enough for code to work."
    • View Profile
    • http://www.morleydev.co.uk/
Re: SFML 3 - What is your vision?
« Reply #118 on: May 05, 2014, 11:55:24 pm »
Lately I've found the more I avoid the exception approach, the more I dislike the exception approach, the more I start to think that if recovery is probably, exceptions aren't the correct way to go.

Error condition resolving seems to have several approaches:
* Return object and throw exception on error. Immutable, but causes exceptions to be handled in an "expected" code path. Dislike.
* Return error code and emit value as an out parameter. Requires mutability for out parameters. Dislike.
* Return nullable/falsable data and use some other error reporting. Difficult in multithreaded scenarios as whilst values are immutable the errors mutable, and requires all returns to be checked despite that need being non-obvious. Dislike.
* Returning an explicit type that contains error details when error occurs, and the value when success occurs.  Still requires the check, but that need is more explicit. So far, the best approach I've found for when failure is an expected code path.

So loading a texture could look more like:
Code: [Select]
sf::Result<sf::Texture> texture = sf::Texture::loadFromFile("file.png");
if (!texture)
   std::cerr << texture.err() << std::endl;
sf::Texture actualTexture = *texture;

But exceptions are a common way of handling this, and I've even argued for them before. It comes down to the implied preconditions of the function. If the precondition doesn't specify that the file exists, then the response should reflect that and the optional pattern is the correct choice in my mind. An implied pre-condition to loadFromFile is that the file exists, so an exception is the correct response to trying to load when the file does not exist.
« Last Edit: July 17, 2014, 12:02:59 am by MorleyDev »
UnitTest11 - A unit testing library in C++ written to take advantage of C++11.

All code is guilty until proven innocent, unworthy until tested, and pointless without singular and well-defined purpose.

Tank

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1486
    • View Profile
    • Blog
    • Email
Re: SFML 3 - What is your vision?
« Reply #119 on: May 06, 2014, 08:54:18 am »
MorleyDev, I find that very ugly. :P For me it's simple: loadFromFile() returns a texture, and if it can't, it throws, because that's not supposed to happen.

 

anything