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

Pages: 1 [2] 3 4 ... 9
16
SFML projects / Re: Thor 2.0
« on: March 31, 2012, 08:09:21 pm »
I'll certainly update the old tutorials, do you have concrete parts of the library in mind for which I should write new ones? Animation might be such a candidate, others?

Right now I'm mainly using the Particle Systems part of Thor, along with any Aurora things with it.  What confused me, at least initially, was going from different emitters to a UniversalEmitter. 

As for the cmake file and admin rights, what I (and maybe other Windows users) do is just run everything as administrator, especially when running install commands (as without it the install command doesn't work).  Horrible practice but it works. 

17
SFML projects / Re: Thor 2.0
« on: March 31, 2012, 06:10:12 am »
Thanks! If you have some ideas, just tell me! :)

For sure! Though I'm a bit rusty on my programming with med school and all.  Once SFML (and Thor) 2.0 get "finalized" I'd love more/new tutorials!

18
SFML projects / Re: Thor 2.0
« on: March 29, 2012, 07:40:14 pm »
I'm having a problem trying to compile Thor with CMake.  Specifically I'm getting the same SFML_DIR-NOTFOUND error (whether I change SFMLDIR or SFML_DIR it always comes out with the same error). I have SFML installed from the git tutorial.
I think you have to install SFML, not just build it (the CMake install command copies the FindSFML file). You have to type make install (using g++) or compile the INSTALL project (Visual Studio).


I did use make Install to install it (I even did a clean then install and it didn't work; for some reason the .cmake file wasn't being copied to the modules folder (even with all admin privileges and everything set)).  Manually copying the file over however did fix it.  If it helps I was using mingw and Codeblocks and not Visual Studio as I don't have Visual Studio installed on this computer. 


Also are the tutorials outdated on your website? I tried some of the tutorials (specifically the particles one) and it seems certain classes have changed.  Overall everything is awesome I just have to play around with it a bit more.

19
SFML projects / Re: Thor 2.0
« on: March 28, 2012, 07:00:59 am »
I'm having a problem trying to compile Thor with CMake.  Specifically I'm getting the same SFML_DIR-NOTFOUND error (whether I change SFMLDIR or SFML_DIR it always comes out with the same error). I have SFML installed from the git tutorial. 

EDIT: I got it fixed; for some reason the FindSFML.cmake file wasn't copied to the Modules folder in CMake.  Copying it over seemed to fix it.  While compiling however I get an error when trying to compile the examples:

Code: [Select]
C:\Thor\examples\Particles.cpp: In function 'int main()':
C:\Thor\examples\Particles.cpp:111: error: no matching function for call to 'sf:
:RenderWindow::convertCoords(unsigned int&, unsigned int&)'
C:/Program Files (x86)/SFML/include/SFML/Graphics/RenderTarget.hpp:152: note: ca
ndidates are: sf::Vector2f sf::RenderTarget::convertCoords(const sf::Vector2i&)
const
C:/Program Files (x86)/SFML/include/SFML/Graphics/RenderTarget.hpp:177: note:
              sf::Vector2f sf::RenderTarget::convertCoords(const sf::Vector2i&,
const sf::View&) const
mingw32-make[2]: *** [examples/CMakeFiles/Particles.dir/Particles.cpp.obj] Error
 1
mingw32-make[1]: *** [examples/CMakeFiles/Particles.dir/all] Error 2
mingw32-make: *** [all] Error 2

20
SFML projects / Re: SolidShaper + Box2D + SFML
« on: March 26, 2012, 07:13:24 pm »
This is cool! I haven't gotten a chance to test it yet (having some Visual Studio trouble as I haven't messed with it in about a year) but I was wondering, could I potentially use this to create/draw shapes for my game? One of my game ideas revolves around all the sprites to use shapes for drawing/collision and the only reason I haven't gotten to actually doing it is I thought it would be easier to have some kind of map editor to draw and save the shapes but I've been lazy and never got around to it. 

21
Graphics / Another View Question
« on: May 06, 2011, 09:18:12 am »
Ah that helps more.  
I'll just add a GetView at the beginning and SetView before my draw.  
Thanks for your help!

22
Graphics / Another View Question
« on: May 06, 2011, 09:04:17 am »
I think this is the whole const shenanigans that's giving me trouble.  I haven't touched C++ in a couple years and have been working mostly with python/java so forgive my noobish questions.  

So I get the View from the Window, modify it, then would I have to set it again?


Edit: Omg just remembered. Pointers.

23
Graphics / Another View Question
« on: May 06, 2011, 08:07:41 am »
To me it was easier to just have to set the View once and be done.  Now I need to keep a copy of the view where I move it and update it every time.

24
Graphics / Another View Question
« on: May 06, 2011, 01:31:28 am »
I'm confused as now instead I have to call a SetView every time I change the view?

25
Graphics / Another View Question
« on: May 05, 2011, 09:56:17 pm »
Ah yes this makes sense now since I was following the 1.6 tutorials.  

Just curious, what is the reason for the local copy instead of a pointer?

26
Graphics / Another View Question
« on: May 05, 2011, 08:13:42 pm »
I'm using SFML 2.0.  I don't change the View except for the initial SetView.  I only have one View that I'm using; the View I created and set.

Oh so if I Move the View it changes it but not a local copy?

27
Graphics / Another View Question
« on: May 05, 2011, 07:15:33 pm »
I tried when I hit a key to move the view.  They key is pressed but nothing happens on screen (the Image of the Sprite just stays centered and nothing seems to move).
I did some debugging and the view is moving (the center is shifting) but nothing else happens.  What I expect to happen is the Sprite moving some direction (as the view moves towards or away from it).


EDIT: Okay so I added a App.SetView() Right before my draws.  That seemed to fix it.  However I thought that if I didn't change the view I didn't have to set the view every frame?

28
Graphics / Another View Question
« on: May 05, 2011, 08:45:05 am »
Er sorry the overall goal is when the sprite is moved follow it (until we reach the end and then move the sprite to the edge).  But for this simple test just to move the view when a key is pressed.  The Sprite doesn't change position.  


So basically:
I start with the Sprite centered on screen.  When a key is pressed the view moves (with the illusion of the Sprite shifting the other way).  I'm basically trying to play with the view and keeping the Sprite as a reference point.

29
Graphics / Another View Question
« on: May 05, 2011, 07:50:16 am »
I'm having trouble wrapping my head around View.  Basically I want to create a world that say is 1024x768 but the screen size is only 800x600 (as example values).  I want the view to shift based on if an arrow key is pressed.  Kind of like Asteroids or Geometry Wars where the View centers on the player and the world moves around them.


Edit: Forgot to mention what I have so far.  I basically have some code that has a Sprite with a position at the center of the screen and whenever I push an arrow key I try to move the view 30 units.  The Sprite just stays and doesn't move.

30
General / sf::ConsoleWindow
« on: May 05, 2011, 07:36:56 am »
What is this console for? Why don't you use a GUI for this (I think there's an SFML Gui addon somewhere here)?

Pages: 1 [2] 3 4 ... 9