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

Pages: [1]
1
DotNet / Re: SFML.NET Proposed Changes
« on: June 17, 2014, 06:00:15 am »
I'm happy to see this port being pushed forward.  ;D

2
SFML projects / Re: SFML Light System - Let There Be Light
« on: June 17, 2014, 05:56:13 am »
Wonder if this was ever ported to C#?  If so it would be nice to use. :)
I thought about that. Started to make the port, but ran in some doubts about the C++ behaviour of certain methods.
Anyone have an idea how to translate QuadTreeNode::Partition to C# language? I don't know how to proceed with resize and the Create method. There are better ways to implement this and I want to set the m_hasChildren property to the right value in the end.

3
DotNet / Re: RenderWindow stops drawing
« on: December 08, 2013, 05:12:01 pm »
The only thing I can think of is that since SFML doesn't provide its own GetHashCode() the CLR is doing something weird when it is providing a default GetHashCode().
Is there something I can do about it, maybe a temporary fix?  :o

4
DotNet / Re: RenderWindow stops drawing
« on: December 07, 2013, 03:11:40 pm »
You should write a complete and minimal example that shows the problem.
https://www.dropbox.com/s/6nifvwb5gr727k5/TestingGame.zip
Now, the problem shows up! It usually happens after a minute or so and I found the following:
In code/World.cs, there is a private void SpriteDebug(Sprite sprite) method. As you can see, it does nothing but print console message from the Sprites. With it, the screen goes blank. If you remove it, nothing happens.
Also, there's the compiled project on Debug folder, all SFML-related .dll was removed (of course :P).
My guess is that problem is not particularly the Console, but rather the memory access of the Sprites.

using System.Threading.Tasks;
If you are using anything from this namespace (you aren't using it in the example) it means you are using threads and as eXpl0it3r said, SFML is not thread safe.
Well, don't worry about that. ;D
It's referenced but not being used anywhere on this example or the original project (I'm glad that I asked this upfront).

On a side note, I don't know what kind of time measuring that is, but if you want SFML style Time and Clock classes you can take a look at NetEXT (see my signature)  ;)
Sure! I can even help you on documenting it.

Thanks eXpl0it3r and zsbzsb for your help.  :D

5
DotNet / Re: Problem with mouse + keyboard input
« on: December 07, 2013, 03:28:23 am »
Worked fine for me. When any mouse button is clicked, the message is print on the console.

6
DotNet / Re: RenderWindow stops drawing
« on: December 06, 2013, 11:32:22 pm »
http://pastebin.com/yJi8i0eJ

SharpTMX loads a Tiled map and renders sprites for each layer and isn't the library's fault also.
So odd. I cut everything that was unrelated and now, it draws correctly. Nothing different besides RenderWindow not being passed on methods calls.
Gonna take a depper look.

Edit:
Can't find the reason. Should I upload the whole project and the executable together?

7
DotNet / RenderWindow stops drawing
« on: December 06, 2013, 03:11:05 am »
A have a List<Sprite> that it's used to draw on the main RenderWindow object. Currently, this list holds 2 sprite and I call a window.Draw(sprite) for each one. Also, they are big as the RenderWindow object in width and height.


public void Draw(RenderWindow window)
{
  foreach (Sprite sprite in currentArea.AreaSprites)
  {
     window.Draw(sprite);   
   }
}


So far so good, until this happens after a couple of seconds, for no apparent reason:


Since the guy continues running, I though that the sprites are having some problems.
The only clue that I have was an AccessViolationException, something that I couldn't reproduce later and that was thrown right after the problem above occurred. The stack trace had something about a thread being started, in root, and I don't know if it have something to do.

I'm curious if all SFML calls are thread safe, since it seems to be locking the resource memory from me.
And also, how many times is it safe to call the Draw() method?

Sorry for being asking, I didn't found anything related on the forum.

8
SFML projects / Re: Tmx C# Loader for SFML
« on: October 05, 2013, 10:23:15 pm »
Thanks! I'm gonna explain better what format is it and where it comes from, both here and on the Wiki page.

About the license, I've never read GPL entirely. If zlib/png license gives the same freedom to share and modify, I can change to it.  :D
I just wanna help people use it and contribute.

9
SFML projects / Re: Tmx C# Loader for SFML
« on: October 02, 2013, 06:44:19 pm »
could you elaborate more on the *.tmx format that you use.

You mean, how the program uses it? I was assuming that everyone knew that it's a file exported by Tiled and is nothing more than a XML text.

And about the license, I'm gonna look at it. But why you and other people don't like GPL?

10
SFML projects / Tmx C# Loader for SFML
« on: October 02, 2013, 04:38:46 am »
Hello!

I would like to share with the SFML community the project I've been working for the past week.
It's a library for C# project that makes use of both Tiled and SFML.

This project carries the following goals:
  • Load a .tmx file (what Tiled uses to save/load maps) in a fast and reliable way.
  • Organize data in an intuitive way.
  • Make it simple as possible for use in projects.

Important: the library right now only accepts .tmx formats with layers configured for CSV.

It can be used as a general-purpose library (in other words, with another frameworks), but I'm trying to make it even simpler for SFML users, so you can make your tiles and have each layer build as a SFML Sprite for you. Not much, it's really the only specialty right now. However, I hope to have more ideas as the project evolves and it's free to anyone to contribute.  ;)

Also, builds for Linux and Mac throught Mono is something I will look forward to after it turns in a solid release.

If you are interested, check the GitHub project on https://github.com/vncastanheira/TmxCSLoader_SFML.
There's a How-To Guide if you want to set up in your project and test it https://github.com/vncastanheira/TmxCSLoader_SFML/wiki/How-to-use-Tmx-C%23-Loader-for-SFML.

Windows beta release is on https://docs.google.com/file/d/0B96ycxJN-06jQXZ2clh6bDBrUkU/edit?usp=sharing.

I hope that can help a lot of people.
Thanks!

11
SFML projects / Re: 'Tiled' Tile-map Loader
« on: September 25, 2013, 06:13:32 pm »
do a native port of 'Tiled' directly in C#

Well, it seems the best option then. I know dynamic memory allocation in C, but it's a lot of work for now.
So I've already started a native C# project and hope to see it functioning in a few days.  :)

Thanks!

12
SFML projects / Re: 'Tiled' Tile-map Loader
« on: September 24, 2013, 06:14:49 pm »
Hi!
Is it possible to compile it to a .dll? Any instructions on how I can achieve that?
I'm trying to use it on a C# project.

Pages: [1]
anything