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

Pages: [1]
1
DotNet / Re: Issue with TIME tutorial
« on: November 26, 2012, 04:42:47 am »
I see, thanks a lot man. That makes sense.

2
DotNet / Re: Issue with TIME tutorial
« on: November 26, 2012, 03:37:10 am »
Sorry about that, thanks for the reply though. So does that mean that this functionality was left out of the .NET port of SFML? Are there other things that I should be aware of that I will not have access to?

3
DotNet / Issue with TIME tutorial
« on: November 26, 2012, 12:09:03 am »
So I am getting myself reacquainted with the C# binding (I forgot everything from previous usage). I am starting by doing all of the tutorials from the site. I am beginning with the timing tutorial, but I think I am doing something wrong converting to C#. I dont see any classes, members, etc  with the name Time, Clock, etc. Is this stuff not wrapped in the C# version because I should be using standard .net functionality for it, something like TimeSpan or DateTime?

4
DotNet / Re: CircleShape Drawing issues (C#)
« on: May 10, 2012, 03:00:24 pm »
Thanks Laurent :)

5
DotNet / CircleShape Drawing issues (C#)
« on: May 10, 2012, 05:59:30 am »
Hey guys, Im probably missing something simple, but I cannot get this circle to display. Should I be calling the windows draw method like I am here, or do I call the circles draw and pass the window? Not sure whats going on...

namespace SFMLTEST
{
    class Program
    {
        static void OnClose(object sender, EventArgs e)
        {
            // Close the window when OnClose event is received
            RenderWindow window = (RenderWindow)sender;
            window.Close();
        }

        static void Main(string[] args)
        {
            // Create the main window
            RenderWindow window = new RenderWindow(new VideoMode(800, 600), "SFML window");
            window.Closed += new EventHandler(OnClose);

            // Create a graphical string to display
            Text text = new Text("Hello SFML.Net");

            //Circle
            CircleShape ball = new CircleShape(200.0f);

            ball.FillColor = new Color(Color.Magenta);
            ball.Position = new Vector2f(100.0f, 100.0f);


            // Start the game loop
            while (window.IsOpen())
            {
                // Process events
                window.DispatchEvents();

                // Clear screen
                window.Clear();

                // Draw the string
                window.Draw(text);

                // Draw Ball
                window.Draw(ball);

                // Update the window
                window.Display();
            }
        }
    }
}

6
DotNet / Re: Seting up with C#/Visual Studio
« on: April 24, 2012, 05:38:09 am »
Ok so it works. Weird. I was accidentally using the 1.6 release, but I was using the example from the 1.6 docs anyway... so it should've worked.
If you have a ATI card that would explain why 1.6 wasn't working. http://en.sfml-dev.org/forums/index.php?topic=3438.0
I did have to change while (window.IsOpened()) to while (window.IsOpen()) though. Is that a mistake in the example? It seems like IsOpen() is the correct method.
Yes, .IsOpen() is correct. Read above^^ as me and Laurent went back and forth on it.  ;D

As for the 64 bit trouble, I will pass to Laurent  8)

Yep I have an ATI card. No problem... 2.0 works fine :)

7
DotNet / Re: Seting up with C#/Visual Studio
« on: April 24, 2012, 12:24:49 am »
Quote
it forces me to use the x86 version
Why?

Not sure. I attached the x64 versions and VS was complaining that it was not compatible with my processor. Im running an i7 Quad Core with 64bit Windows 7

8
DotNet / Re: Seting up with C#/Visual Studio
« on: April 23, 2012, 08:05:12 pm »
Ok so it works. Weird. I was accidentally using the 1.6 release, but I was using the example from the 1.6 docs anyway... so it should've worked. I now have the 2.0 release, but it forces me to use the x86 version even though I am using a 64 bit system. Not a big issue... it works anyways.

I did have to change while (window.IsOpened()) to while (window.IsOpen()) though. Is that a mistake in the example? It seems like IsOpen() is the correct method.

9
DotNet / Re: Seting up with C#/Visual Studio
« on: April 23, 2012, 06:32:11 pm »
I pasted that code DIRECTLY from the documentation that came with the SFML.NET download. Im guessing that I am doing something wrong with the setup because no window appears, only the console. I added the 3 .dll's as references to the project. I then added the 3 .dlls from the extlib folder as external items to the project., Then I finally set them all to "copy if newer". Am I missing something?

10
DotNet / Re: Seting up with C#/Visual Studio
« on: April 23, 2012, 03:17:51 am »
I think I did it correctly but when I try to run this code:

Code: [Select]
using System;
using SFML.Audio;
using SFML.Window;
using SFML.Graphics;

namespace Example
{
    class Program
    {
        static void OnClose(object sender, EventArgs e)
        {
            // Close the window when OnClose event is received
            RenderWindow window = (RenderWindow)sender;
            window.Close();
        }

        static void Main(string[] args)
        {
            // Create the main window
            RenderWindow app = new RenderWindow(new VideoMode(800, 600), "SFML window");
            app.Closed += new EventHandler(OnClose);

            // Load a sprite to display
            Image  image  = new Image("cute_image.jpg");
            Sprite sprite = new Sprite(image);

            // Create a graphical string to display
            Font     arial = new Font("arial.ttf");
            String2D text  = new String2D("Hello SFML.Net", arial);

            // Load a music to play
            Music music = new Music("nice_music.ogg");
            music.Play();

            // Start the game loop
            while (app.IsOpened())
            {
                // Process events
                app.DispatchEvents();

                // Clear screen
                app.Clear();

                // Draw the sprite
                app.Draw(sprite);

                // Draw the string
                app.Draw(text);

                // Update the window
                app.Display();
            }
        }
    }
}


An empty console window comes up, but no SFML screen. Any ideas. I did remove the sprite and music portion though, and just left the text. Do I not have to use CMake to build the library like you do with the C++ version?

11
DotNet / Seting up with C#/Visual Studio
« on: April 22, 2012, 11:15:38 pm »
Hi Guys,

    So my goal is to use SFML with C# in VS2010. Can  anyone help me out with some directions to get it all set up? I downloaded the SFML 2.0 .Net release, but I am not sure how to get it running with C#? Do I start a C# Console application? Also, is it basically set up for all .Net languages... or is there a specific setup for C#.net vs C++.net? I basically need to include the libraries and dlls.

12
General / Undefined References
« on: November 12, 2011, 08:31:50 pm »
Quote from: "Laurent"
libsfml-graphics.so.2 must be in a path that the library loader (ld) knows. So either you didn't install SFML properly, or you installed it to a path that it doesn't know.


When following the link I posted to install all of this, libsfml-graphics.so.2 wound up  in my Home directory in a subfolder called sfml2.0

It is there along with all the other lib files. Is there something I can do from here or do I have to wipe and redo all of this? Would adding that folder to my PATH work?

EDIT: If I move the exe into the sfml folder where the ]libsfml-graphics.so.2 is located, it works fine. How can I get the lib files to be visible everywhere? Im guessing the PATH variable...

13
General / Undefined References
« on: November 12, 2011, 06:16:13 pm »
Quote from: "Laurent"
Code: [Select]
g++ -c sfmlwindow.cpp
g++ -o sfmlwindow sfmlwindow.o -lsfml-window -lsfml-system


Of course! Thanks so much I completely forgot about that.

But I am getting this now:

joe@joe-Latitude-D620:~/Desktop$ gcc -c sfmlwindow.cpp
joe@joe-Latitude-D620:~/Desktop$ gcc -o sfmlwindow sfmlwindow.o -lsfml-graphics -lsfml-window -lsfml-system
joe@joe-Latitude-D620:~/Desktop$ ./sfmlwindow
./sfmlwindow: error while loading shared libraries: libsfml-graphics.so.2: cannot open shared object file: No such file or directory


Sorry for this, but Im coming from a lot of Java game development in eclipse so Im not used to linking a bunch of libraries :)

14
General / Undefined References
« on: November 12, 2011, 05:54:28 pm »
Hey everyone. So I followed the SFML Coder page exactly to get sfml 2.0 set up using gcc.
This page : http://sfmlcoder.wordpress.com/2011/08/16/building-sfml-2-0-with-make-for-gcc/

It seemed to be all correct. I then wrote this simple program:

Code: [Select]
#include <SFML/Graphics.hpp>
#include <SFML/Window.hpp>

int main()
{
sf::VideoMode VMode(800, 600, 32);
sf::RenderWindow Window(VMode, "SFML Window");

while (Window.IsOpened())
{
sf::Event Event;
while (Window.PollEvent(Event))
{
switch (Event.Type)
{
case sf::Event::Closed:
Window.Close();
break;
default:
break;
}
}

Window.Clear(sf::Color(0, 255, 255));
Window.Display();
}

return 0;
}


and all I get is this message, which basically is telling me that it doesnt see any of the sfml stuff:

joe@joe-Latitude-D620:~/Desktop$ gcc -c sfmlwindow.cpp
joe@joe-Latitude-D620:~/Desktop$ gcc -o sfmlwindow sfmlwindow.o
sfmlwindow.o: In function `main':
sfmlwindow.cpp:(.text+0x30): undefined reference to `sf::VideoMode::VideoMode(unsigned int, unsigned int, unsigned int)'
sfmlwindow.cpp:(.text+0x76): undefined reference to `std::allocator<char>::allocator()'
sfmlwindow.cpp:(.text+0x98): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, std::allocator<char> const&)'
sfmlwindow.cpp:(.text+0xe3): undefined reference to `sf::RenderWindow::RenderWindow(sf::VideoMode, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned long, sf::ContextSettings const&)'
sfmlwindow.cpp:(.text+0xf2): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()'
sfmlwindow.cpp:(.text+0x101): undefined reference to `std::allocator<char>::~allocator()'
sfmlwindow.cpp:(.text+0x11f): undefined reference to `sf::Window::Close()'
sfmlwindow.cpp:(.text+0x137): undefined reference to `sf::Window::PollEvent(sf::Event&)'
sfmlwindow.cpp:(.text+0x16a): undefined reference to `sf::Color::Color(unsigned char, unsigned char, unsigned char, unsigned char)'
sfmlwindow.cpp:(.text+0x184): undefined reference to `sf::RenderTarget::Clear(sf::Color const&)'
sfmlwindow.cpp:(.text+0x190): undefined reference to `sf::Window::Display()'
sfmlwindow.cpp:(.text+0x19c): undefined reference to `sf::Window::IsOpened() const'
sfmlwindow.cpp:(.text+0x1b1): undefined reference to `sf::RenderWindow::~RenderWindow()'
sfmlwindow.cpp:(.text+0x1c9): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()'
sfmlwindow.cpp:(.text+0x1d9): undefined reference to `sf::RenderWindow::~RenderWindow()'
sfmlwindow.cpp:(.text+0x1ec): undefined reference to `std::allocator<char>::~allocator()'
sfmlwindow.cpp:(.text+0x204): undefined reference to `sf::RenderWindow::~RenderWindow()'
sfmlwindow.o:(.eh_frame+0x4b): undefined reference to `__gxx_personality_v0'
collect2: ld returned 1 exit status


ANY IDEAS?

Pages: [1]