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

Pages: 1 ... 5 6 [7]
91
General / Re: Constraining movement of a draggable object
« on: July 25, 2013, 01:53:43 am »
The original code is still there. The balls are draggable and there's collision detection between them.

Here is a basic implementation of Nexus' suggestion, with a bit of help from his library Thor. I discounted his advice on moving on discrete points though and instead project the direction vector onto the edge.  ;D
There's no guard against moving off the ends of edges.

Whether these constitute good tutorials, I really doubt.

92
General / Re: Constraining movement of a draggable object
« on: July 20, 2013, 07:04:48 pm »
Brilliant!   :D

Although I don't want to send my ball on an automatic journey along the edge, the user should keep dragging. In which case I imagine a given point on the edge has two opposite vectors to choose from - and the dot product can be used again to decide.
Anyhow I 'm gonna play with it - somehow I feel the solution has a certain library in mind...

93
General / Constraining movement of a draggable object
« on: July 20, 2013, 05:15:29 pm »
Hello,

I 've put together a small puzzle game:



The yellow balls can be dragged around. However, I would like to constrain their movement onto the red lines. I imagine this is a common thing to do and I don't want to be reinventing the wheel.

The code is not big.

There are two issues as I see it:
-when clicking on a ball to move it, it needs to decide which edge to follow along
-when moving it needs to stick to the edge.

I 'm not necessarily looking for code as much as a general guideline on how to implement such a thing. If my current design would need to be scrapped, that's fine. Thanks.

94
General / Re: Problem with debuging VisualStudio 2012 AGAIN
« on: July 07, 2013, 09:06:42 pm »
Quote
using namespace sf;
using namespace std;

This is pretty bad. You 're creating conflicts between the keywords in the two namespaces and your own code. Neither should be used.


95
General / Re: Problem with debuging VisualStudio 2012 AGAIN
« on: July 07, 2013, 03:44:14 pm »
Come to think of it, if that was the issue then it would build.

Can the linker find the lib files? If they 're not in path you must add the lib folder in Linker->General->additional folders or something along those lines.

96
General / Re: Problem with debuging VisualStudio 2012 AGAIN
« on: July 07, 2013, 08:33:07 am »
Quote
Do I need to copy something else than audio-d-2.dll, graphics-d-2.dll, network-d-2.dll, system-d-2.dll, window-d-2.dll files into Release folder(.exe directory)?

These should be in your debug folder. If my VS2010 is anything to go by, there are two pairs of debug/release folders.
One pair in the same folder as the source code - not the one you want.
One pair in the project directory - these contain the executables and this is where you should put the DLLs (but only appear if you have built the project in debug/release at least once).

97
SFML projects / Re: SFGUI (0.1.0 released)
« on: April 24, 2013, 11:04:15 pm »
Ah my bad. Anyhow, I wanted to try GLCanvas to draw with SFML on it but I must admit I 'm not sure how (test.cpp uses GL commands to draw on it). Is it possible to use it in similar fashion to an sf::RenderTarget?

98
SFML projects / Re: SFGUI (0.1.0 released)
« on: April 24, 2013, 09:00:09 pm »
Hi, I downloaded the 0.1.0 release for VS2010 and SFML system.lib files seem to be missing - not a huge issue but detracts from the convenience of the package a bit.

99
General / Re: Flipping a polygon animation
« on: April 03, 2013, 09:06:56 am »
Thanks. Isn't this the same as so called orthographic projection? Probably looks convincing enough anyway.

100
SFML projects / Group theory nightmares
« on: April 03, 2013, 09:04:55 am »
Hello,

this is a program aimed at putting a bit of life into Caley tables:

https://dl.dropbox.com/u/105214643/screenie.jpg

Currently, it can show the Caley table of several groups of permutations. Choosing a permutation from the top row displays a brief animation of the permutation acting on the polygon (although atm these are not the rotations or reflections you 'd expect). Then, in Subgroup Hunt mode it is possible to select multiple elements to identify a subgroup (highlighted red if it isn't, green if it is). If it is a subgroup it's then possible to construct the left or right cosets - elements will be rearranged automatically to show how the cosets partition the group.
Probably SFML is overkill for what it is at the moment, but I 'm hoping to get more ambitious with it; possible next steps could include asking the user to fill the table/identify subgroups & cosets; showing the permutations act on 3d objects and how they may be used to solve coloring problems; conjugacy classes etc

Compiled on windows: https://dl.dropbox.com/u/105214643/advan.zip

Compiled on ubuntu 12: https://dl.dropbox.com/u/105214643/advan.tar.gz

The ubuntu one I 've not been sure what to include in. Currenty it contains the application compiled, as well as the library files. I advise those who would run it to extract and do
export LD_LIBRARY_PATH=.
./ aan

to run it, so they do not have to install the libraries. Is this a good idea? Is there an easier way to do it still? I understand many linux users would rather build it themselves but not some of those I 'd like to share it with.

More features will be coming soon.


101
General / Re: Flipping a polygon animation
« on: March 25, 2013, 04:19:41 pm »
Thanks for reply. So far, nothing else in the program requires more than SFML offers.

The goal currently is to illustrate how permutations act on a polygon whose vertices are labelled 1,...,n. Here's a screenshot in fact:

https://dl.dropbox.com/u/105214643/aan_pic.jpg

Rotations are easy, but I 'd like the reflections to be a little bit more animated than an instant flip. I suppose I might go for opengl anyway, in preparation of displaying polyhedra too. Any other ideas would still be welcome though.

102
General / Flipping a polygon animation
« on: March 25, 2013, 12:42:43 am »
Hello,

I wish to animate the flip of a polygon (say, reflect it across the y axis): I 'd like to show it "sticking out" of the screen as it is flipped. This borders on 3d, however I don't want to actually use opengl simply for this. On the other hand, the polygon may be freely rotated, so I cannot prepare still images for the animation.

Any pointers as to what would be the best approach/tools would be appreciated.

103
General / Re: Default font gone?
« on: October 21, 2012, 12:30:02 pm »
Thanks. I failed to see it for some reason.

104
General / Default font gone?
« on: October 21, 2012, 01:00:32 am »
Hello,

First post here so I should start by saying a great thank you to the creators of this pretty neat library. I 've been toying with in since a few months and it's been easy to learn and use and anything I 'd like to do I pretty much always find there's a tool for it.

On to my question then; I seem to have got two different builds of sfml2 (both 32-bit vs2010), with a slight difference in the sf::Text constructor;

Code: [Select]
explicit Text(const String& string, const Font& font = Font::getDefaultFont(), unsigned int characterSize = 30);
vs

Code: [Select]
explicit Text(const String& string, const Font& font, unsigned int characterSize = 30);

ie the second one doesn't provide a default font. Is the second piece the newer version or have I got that wrong? If it is, may I ask the reason for this change? Thanks.

Pages: 1 ... 5 6 [7]
anything