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

Pages: 1 ... 3 4 [5] 6 7 ... 27
61
SFML projects / Re: In Soviet Russia
« on: October 25, 2015, 08:37:39 pm »
Linux?  :'(

Or is it open source so I could build it myself (could send you the binaries).



AlexAUT

62
Feature requests / Re: Friendly string mapping to Keyboard::Key
« on: October 23, 2015, 08:21:20 am »
Have a look at the TextEntered event in the tutorials. They will give you a unicode character on keypress. Maybe not suitable for keymapping but definitely for presentation.


AlexAUT

63
See here.

We need a complete and working example to help you identify your problem. Otherwise we can only guess and it will delay the whole process to help you. Just try a simple main where you fill a vector and clear it, and post the code if the problem still occurs.



AlexAUT

64
Graphics / Re: jelly physics deformations with sfml, is it possible
« on: October 02, 2015, 12:01:43 am »
SFML 2.x does not offer such a feature, but you could use Thor ConcaveShape (SFML extension written by a member of the SFML Team, Nexus).

What I'm looking for is a way on how I can generate vertex array for a circle, make some transformations and pass it to the window.draw.

If you need just a Circle you could use sf::CircleShape?
If you want to make it with VertexArray you have to generate the geometry data yourself and apply the transformation yourself, in case of a circle it isn't that hard (a bit sin and cos  :P).



AlexAUT

65
Graphics / Re: jelly physics deformations with sfml, is it possible
« on: October 01, 2015, 09:48:48 pm »
Quote
multipoint polygon

I've never heard that word, but I think you meant just a concave polygon? To draw a concave polygon correctly you have multiple options, at my university we learned about cutting a concave polygon to multiple convex polygons (which would save your problem I guess?)

You just google "break concave polygon into convex" or "Polygon triangulation" and you should find a way to implement it.


AlexAUT

66
Graphics / Re: jelly physics deformations with sfml, is it possible
« on: October 01, 2015, 07:42:03 pm »
I'm just trying to find the way on how I can fill multi point polygon with SFML

Have a look at VertexArray , there is also a section in the tutorials about custom shapes. They allow you to set each point by your own (Use sf::Triangle/TriangleStrip/TriangleFan, depending on your needs, to draw a filled polygon).



AlexAUT

67
Graphics / Re: How to have a pointer to sf::Drawable in a base class?
« on: September 26, 2015, 03:59:29 am »
The solution from nexus is much better, I'm just influenced by my universitity prof. which teached us to always have a copy constructor when dealing with pointers  ;)


AlexAUT

68
General / Re: SFML + Eclipse. Nothing happens when I press "Run"
« on: September 25, 2015, 06:13:29 pm »
Do you link SFML statically? If not, does the program find the right *.dll files (the one you compiled/downloaded with/for VS13 aren't compatible).

Have you tried to run the executable yourself? (it's located in the Debug folder iirc)



AlexAUT

69
Graphics / Re: How to have a pointer to sf::Drawable in a base class?
« on: September 25, 2015, 05:26:17 pm »
Btw, the error occurs because when you push_back the element into the deque with an temporary object("Entity()"), it will get copied into the deque and you don't have a copy constructor so the pointer will get shallow copied and will point to the sprite of the temporary object (which will get destroyed after the push_back call).

So you have 2 options to fix this:
1) entities.emplace_back(); instead of entities.push_back(Entity()); and delete the copy constructor to avoid errors in the future
2) Define the copy constructor so that the pointer will point to the right sf::Sprite instance.

As a rule of thumb always define/delete the copy constructor if you have a pointer which owns memory (in this case it basically owns it because it points at a member of its own instance)


AlexAUT

70
Graphics / Re: How to have a pointer to sf::Drawable in a base class?
« on: September 25, 2015, 05:10:46 pm »
std::deque::push_back may invalidate previously stored pointers to its elements, if it needs to reallocate itself somewhere else in memory to grow.

Nope deque won't "copy/move" the elements, according to this: http://www.cplusplus.com/reference/deque/deque/push_back/ pointer and references to objects will remain valid.


To the OP just debug it, make a breakpoint before you access the pointer and look at the content of the pointer. Or you could debug the constructor of Entity to see if the pointer gets set correctly


AlexAUT

71
SFML projects / Re: TGUI: GUI library for SFML
« on: September 21, 2015, 03:17:53 pm »
Nice and thanks for the implementation of the Animations!

Can't wait to use it in my next project



AlexAUT

72
SFML projects / Re: Kroniax available in the Play store!
« on: September 21, 2015, 10:45:18 am »
Just wanted to say that the link in your signature is broken ;D

Thanks  ;D



AlexAUT

73
SFML projects / Re: Kroniax available in the Play store!
« on: September 20, 2015, 10:16:01 pm »
your game is absolutely awesome. It's actually fun as hell. It makes me drop the f-bomb more than I want to.

Thanks  :) I'm glad you enjoy the game and have/had a nice time!

Lv6, after pressing home button and returning to it some hours later, wasnt flipped anymore (orientation like e.g. in lv2). Not sure if this is a minor bug.

Ok I thought I fixed the rotation bug in the last update. I will have a look at it in a few days.

BTW, has anyone (have you) ever finished all levels?

A few friends have completed all levels, but they are experienced because they played alle the earlier versions too (which were a lot harder)


AlexAUT

74
Feature requests / Re: Facility to get standard paths
« on: September 15, 2015, 11:44:33 pm »
On Android you would only have 3 path which are useful.
  • Assets storage, only available through the assetsmanager because it's inside the APK (zip compressed)
  • Internal Storage, it's like a home directory for every app. The path is stored in the ANativeActivity as const char*
  • External Storage (SD card or similar), only available if the the app has read/write right for the external folder, which can be set in the manifest. This path is also stored in the ANativeActivity as const char*

I don't know what you should do for the other paths listed in Jesper's last post, because I'm not even sure if you have read access of the root folder etc. (can't test it at the moment).

So you should definitly keep that limitation in your mind when deciding the final API



AlexAUT

75
General discussions / Re: Fundraiser for a Mac mini
« on: September 15, 2015, 08:58:36 pm »
Finally a way to donate to SFML! Done!

There was a dontation button on the website all the time  :P


AlexAUT

Pages: 1 ... 3 4 [5] 6 7 ... 27
anything