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

Pages: [1] 2
1
DotNet / Re: C# Documents and Tutorials SFML?
« on: March 07, 2014, 05:26:15 pm »
Here you go ;)
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SFML;
using SFML.Graphics;

namespace SFML.Net_Test
{
    class Program
    {
        static void Main()
        {
            RenderWindow window = new RenderWindow(new Window.VideoMode(200,200), "test");
            CircleShape cs = new CircleShape(100.0f);
            cs.FillColor = Color.Green;
            window.SetActive();
            while (win.IsOpen())
            {
                window.Clear();
                window.DispatchEvents();
                window.Draw(cs);
                window.Display();
            }
        }
    }
}

2
DotNet / Re: SFML .Net and Mono with Ubuntu (Linux?) Guide
« on: January 13, 2014, 09:34:18 pm »
Yes, I know, I tried to add a configuration file to my project, but it didn't work :/
With the global config-file it works.

3
DotNet / SFML.Net and Mono with Ubuntu (Linux?) Guide
« on: January 13, 2014, 09:07:26 pm »
Hey guys,
I will show you how to install SFML .Net and Mono under Ubuntu.
Because there are many hints in this forum, but no actual Guide.

Note:
You don't need to compile any libraries  ;D

Dependencies:
-libjpeg
-libglew

First of all, you install Mono and Monodevelop:
sudo apt-get install mono-devel
sudo apt-get install monodevelop

After you installed these programs, you have to download the
SFML .Net, CSFML and SFML libraries. (32Bit or 64Bit)

Then you create a directory for your SFML libraries and copy all
*audio*, *graphics*, *window* and *system* libraries in this directory.

Now you must „register“ your libraries:
Create a *.conf file in /etc/ld.so.conf.d with your SFML library path in it.
Now run the following command:
sudo ldconfig

Now you have to map your dll's:
Edit the config file in /etc/mono/ and add your dllmaps
<configuration>
...
<dllmap dll="csfml-graphics-2" target="libcsfml-graphics.so.2" />
<dllmap dll="csfml-window-2" target="libcsfml-window.so.2" />
<dllmap dll="csfml-audio-2" target="libcsfml-audio.so.2" />
</configuration>

Start a new monodevelop project, add your sfmlnet dll's, make sure the csfml*.dll's
and the sfmlnet*.dll's are in the same directory as your executable and it should be fine :)

Hauste,
Chilli

4
General / Re: Measure FPS
« on: December 26, 2013, 02:34:39 pm »
It sounds like that NetEXT would be the most simple and accurate possibility ;)

5
General / Re: Measure FPS
« on: December 23, 2013, 09:35:59 pm »
Thanks zsbzsb for your suggestion :)
hmm... so many possibilities.
It's difficult to take a decision ;)

6
General / Re: Measure FPS
« on: December 23, 2013, 04:30:37 pm »
Kein Problem, danke und frohe Weihnachten!  :)

Danke ;)
Die wünsch ich dir auch :)

7
General / Re: Measure FPS
« on: December 23, 2013, 04:19:48 pm »
Thank you for the hint :)
Now i'm using stopwatch.

Btw. Schöne Grüße nach Österreich ;)

8
General / Re: Measure FPS
« on: December 23, 2013, 02:54:00 pm »
Ah ok thanks ;)
And it is like you say
>= 1
cause
> 1
equals 2 seconds and more;)
I didnt see that at the first time

9
General / Measure FPS
« on: December 23, 2013, 02:23:46 pm »
Hey guys,
i thought of a way to measure fps.
So, i came up with the following idea:

C# Code:
        private void Render()
        {
            while (renderWin.IsOpen())
            {
                MeasureFPS();
                renderWin.Clear();
                renderWin.DispatchEvents();
                renderWin.Draw(spPlayer);
                renderWin.Draw(txtFps);
                renderWin.Display();
            }
        }
        private void MeasureFPS()
        {
            fps++;
            if (DateTime.Now.Subtract(lastTimeMeasured).Seconds > 1)
            {
                txtFps.DisplayedString = "FPS: " + fps.ToString();
                lastTimeMeasured = DateTime.Now;
                fps = 0;
            }
        }
 

Is this a valid way to determine my fps?
Cause i have about 4000 per second.

10
DotNet / Re: Problems with Mono & SFML.Net (Ubuntu)
« on: October 15, 2013, 03:43:16 pm »
Quote
Then go bitch to fucking Canonical for not packaging it or learn to solve your own problems(hint: cmake + git + reading skills), we can't(and most of us don't want/care anyway) do shit about them not packaging it.

Hey!
No reason to become unpolite.
Not everyone is an expert.
And this is a forum for people to ask questions.
You also learned by asking questions (hint: you would be a bad teacher)

So, I said what I needed to say.
Now thank you for your advice (cmake+git+reading skills) ;)

11
DotNet / Re: Problems with Mono & SFML.Net (Ubuntu)
« on: October 15, 2013, 12:37:53 pm »
If i search for csfml in the ubuntu softwarecenter I only find libcsfml-1.6 :/

12
DotNet / Problems with Mono & SFML.Net (Ubuntu)
« on: October 15, 2013, 12:20:22 pm »
Hey guys,
first of all, i read many topics in this forum & googled a lot about how to get
Mono and SFML.Net running.
But the only half-working solution is about installing csfml-1.6-libs via
apt-get and using them. But I want to use SFML.Net 2.x.

I have Ubuntu 12.04, Mono 2.10.8.1 & MonoDevelop 2.8.6.3.

The steps I took:
After installing Mono & MonoDevelop, I opend a new Project and added the sfmlnet-graphics-2.dll
to my references.

Afterwards I was able to use the SFML commands in MonoDevelop. I also copied the csfml-graphics-2.dll
in the same folder where my prog.exe was.

Then I created a prog.exe.config/csfml-graphics-2.dll.config file and wrote the following in it:

<configuration>
<dllmap dll="csfml-graphics-2.dll" target="libcsfml-graphics-2.so.2" />
</configuration>

After that I added this file to my Project like this:


Now I wanted to compile my project, but I got a DllNotFoundException: "csfml-graphics-2 not found"

Does anybody know how to get thes dll's running with mono on linux? :)

13
DotNet / Re: Multiple Keys pressed in SFML .Net
« on: September 12, 2013, 02:17:01 pm »
Thanks zsbzsb :D
It worked ;)

14
DotNet / Multiple Keys pressed in SFML .Net
« on: September 11, 2013, 03:40:54 pm »
Hey ho ;)
i've got a problem with pressing multiple keys at the same time. I want to move an object diagonal when
i press e.g. up and right. But my object only moves in one of these directions.
I also read some topics in this forum where people had the same problem, but the solutions didnt work.
Here's my code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SFML.Graphics;
using SFML.Window;

namespace Movement_SFML_2._0
{
    class Program
    {
        static RenderWindow rWin;
        static Sprite sprite;
        static void Main(string[] args)
        {
            rWin = new RenderWindow(new VideoMode(500, 500), "Movement");
            rWin.KeyPressed += new EventHandler<KeyEventArgs>(rWin_KeyPressed);
            sprite = new Sprite(new Texture("a.png"));
            rWin.SetActive();
            while (rWin.IsOpen())
            {
                rWin.Clear();
                rWin.DispatchEvents();
                rWin.Draw(sprite);
                rWin.Display();
            }
        }

        static void rWin_KeyPressed(object sender, KeyEventArgs e)
        {
            rWin.SetTitle(e.Code.ToString());
            if (e.Code == Keyboard.Key.W)
                sprite.Position = new Vector2f(sprite.Position.X, sprite.Position.Y - 10);
            if (e.Code == Keyboard.Key.D)
                sprite.Position = new Vector2f(sprite.Position.X + 10, sprite.Position.Y);
            if (e.Code == Keyboard.Key.S)
                sprite.Position = new Vector2f(sprite.Position.X, sprite.Position.Y + 10);
            if (e.Code == Keyboard.Key.A)
                sprite.Position = new Vector2f(sprite.Position.X - 10, sprite.Position.Y);
        }
    }
}
 

15
Graphics / Change Maximum (Render)Texture Size?
« on: June 13, 2013, 01:02:34 pm »
Hey guys,
on my pc the maximum Texture size is 4096 (
Texture.MaximumSize
)
How can i change the limit or do i have to put many big textures next to each other?
 :)

Pages: [1] 2