16
SFML projects / Re: SnakeFML
« on: February 15, 2016, 09:09:55 pm »
What a fantastic game!
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.
That physics stuff just screams out "use Box2D" to me. But if it's for learning purposes, it makes sense to do it yourself.
The previous wording was:QuoteA link to source is required when submitting. (open source is good for the soul, man.)I took the liberty to clarify it a bit while ensuring maximal usefulness, as code that's just posted somewhere without any license is as good as none, as no one can reuse it for anything (no rights given).
If people have problem with permissiveness and would prefer copyleft, we can probably allow that even though that would disallow quite some uses including using snippets as examples in future books or indie games trying to sell a few copies, unless all sources of such books and games would be released under given copyleft license. (If I'm wrong, just correct me someone, but this is how I understand copyleft.)
Is that all that is missing? I need an exhaustive shopping list before I consider this feature for addition.
Seems like this "hardcore" myth is unkillable
Just to prove how simple and powerful Boost.Geometry is:namespace bg = boost::geometry;
typedef bg::model::d2::point_xy<float> Point;
typedef bg::model::polygon<Point> Polygon;
// Create polygon geometry
Polygon polygon;
bg::append(polygon, Point(x0, y0));
bg::append(polygon, Point(x1, y1));
...
// Create point geometry
Point point(x, y);
bool pointInPolygon = bg::within(point, polygon);
And please don't complain about the type definitions, you have them a single time in your code and that's it. On the contrary, this allows you to use arbitrary geometry types. For example, you can easily make everything based on sf::Vector2f, to integrate your entire geometry logic with SFML in a matter of minutes.