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

Pages: [1]
1
DotNet / Re: SFML.Net Core???
« on: July 04, 2020, 08:43:27 am »
I've followed the mac os install tutorial and also this video.
https://www.youtube.com/watch?v=WOyp5n2FmZY&lc=UgyynNlOxemLKMHyagt4AaABAg.9ATcJzyNere9AYRGIfGK3m

But can not make it works with .net core after install the nuget packages with Visual Studio, neither with C++ template on XCode.

Error on Visual Studio .NET Core Mac OS:
"Unable to load shared library 'csfml-graphics' or one of its dependencies. In order to help diagnose loading problems, consider setting the DYLD_PRINT_LIBRARIES environment variable: dlopen(libcsfml-graphics, 1): image not found"

Error on C++ version (running the template app):
dyld: Library not loaded: @rpath/sfml-system.framework/Versions/2.5.1/sfml-system
  Referenced from: /Users/daybson/Library/Developer/Xcode/DerivedData/SFML-hfefftxugsbrbveemutrfjeoeuhy/Build/Products/Debug/SFML.app/Contents/MacOS/SFML
  Reason: no suitable image found.  Did find:
   /Users/daybson/Library/Frameworks/sfml-system.framework/Versions/2.5.1/sfml-system: code signature in (/Users/daybson/Library/Frameworks/sfml-system.framework/Versions/2.5.1/sfml-system) not valid for use in process using Library Validation: mapped file has no cdhash, completely unsigned? Code has to be at least ad-hoc signed.
   /Library/Frameworks/sfml-system.framework/Versions/2.5.1/sfml-system: code signature in (/Library/Frameworks/sfml-system.framework/Versions/2.5.1/sfml-system) not valid for use in process using Library Validation: mapped file has no cdhash, completely unsigned? Code has to be at least ad-hoc signed.
   /Library/Frameworks/sfml-system.framework/Versions/2.5.1/sfml-system: stat() failed with errno=1

2
DotNet / Re: Install TGUI.NET
« on: July 12, 2017, 02:06:16 am »
Replacing the default sfml.net dlls for the dlls inside the tgui zip file and is working now.

Why can't use the same sfml dlls from official website? What's the difference between them and the dlls inside TGUI.NET?

3
DotNet / Install TGUI.NET
« on: July 11, 2017, 09:46:52 pm »
I'm following the instructions to install TGUI.NET on my project. These are the instrctions from the 'readme.txt':

"The dlls from the "dotnet" folder have to be added as References in your project.
The dlls from the "c" folder have to be placed next to your executable."

I'm referencing tguinet-0.8.dll on References
and pasting ctgui-0.8.dll and tgui.dll side by side my .exe.

When I try to instantiate a new Gui as here https://tgui.eu/bindings/dotnet/, I got the error:

System.DllNotFoundException: 'Could not load DLL 'ctgui-0.8.dll': Não foi possível encontrar o módulo especificado. (Exceção de HRESULT: 0x8007007E)'

Help! Wind 10 x 64, Visual Studio 2017, .NET 4.7

4
DotNet / Re: SFML.NET 2.4 Update
« on: March 30, 2017, 07:07:37 am »
What about the extlibs folder? Should be updated too? And how?

5
DotNet / Re: SFML.NET 2.4 Update
« on: March 30, 2017, 05:35:59 am »
UP!

6
DotNet / Re: SFML.NET 2.4 Update
« on: February 03, 2017, 06:15:05 pm »
So, will be available the 2.4 version on the main SFML webpage?
I only see the 2.2 version.

@Laurent

7
Well, I wrote the topic trying not to be about a language, but anyway...

SFML.NET doesn't have, but C# does. System.Net.Sockets.

But my question goes further than language.
I'm talking about a general way of how to send/receive data inside a gameloop. I only see chat examples on the comunity. I'm looking for a real world example of sockets inside a sfml game, doesn't matter if is .net, c++, java...

8
I'm doing my first game with network implementation using C#.
Here is my pseudocode:

CLIENT
Start a Game Client
Instantiate the client_socket
Connect the client_socket with server
Instantiate objects (player, enemy, etc..)
Instantiate a new Thread for send/receive over TCP
Inside this new thread, a infinite loop runs. Inside this loop:
  1.1 get the player position as string, convert to byte[] and then send async through client_socket (client_socket.BeginSend) - OK
  1.2 initiate a receive async (client_socket.BeginReceive) to print what Server said to client (NOT OK, receive the same count of bytes but all '\0')
Start the new thread
Enter on gameloop and update objects and render sprites...


SERVER

Instantiate a list of client Socket
Bind the IPEndPoint to client connect
Start a new thread to listen connections
On the new thread, iterates a Infinite loop
  1.1 accept new client
  1.2 start a new thread for the new client, dedicated to receive/send data SYNC
  On this new thread,
  2.1 another infinite loop receiving data and printing on console (OK, prints the player position)
  2.2 sending back a response (OK, send a message)

Is this right? There's a real world example of a simple game, receiving and sending data continuously inside a gameloop?  I see a lot of chats, but doesn't looks like a real world exampe to be used in game...
A chat waits for a event to send... but if I'm running at 60fps, I should send and receive data every frame? The multithread approach is really necessary? Why I got the response on client side with same number of bytes that server sends, but the message is all filled with \0?

Thanks

9
Audio / Re: Spatialization doubt
« on: October 18, 2016, 03:10:21 pm »
You see, nothing complicated ;)

Finally is working with this set up and the Direction facing -Z.

Listener.Direction = new Vector3f(0, 0, -1)

Thank you, I think I'm getting the audio's fell I want now.
This works for a platform game where -x/+x avatar's displacement fits with the 'logical' position of left/right speakers.

But what if I decide to make a topdown 2D game, where the avatar's receive rotations, I think this setup will not work anymore, right?
The avatar is rotated so the sound is on his left side, like the second section of this figure.


How should I configure the Listener.Direction and Listener.VectorUp to this setup? Direction = Vector3(cos(90), 0, sin(90)) and VectorUp(0, 1, 0) ?

10
Audio / Spatialization doubt
« on: October 18, 2016, 01:13:39 pm »
Well, as always, spatialization audio is driving me crazy.
I can't found a good tutorial where this really works! I read a lot of answers on the forum, but I'm missing a step-by-step guide where some clear and simple information is presented. So I expected someone can answer me as simple as possible.

My cenario is:

Screen is 800x600.
My player moves on X screen. He spawns at Vector2(100, 500).
I wanna put a sound at Vector2(300, 500).

1 - What Position shoud I set to Sound? Vector3(300, 0, 500)?

2 - What Direction and Position I should set on Listener to make him hear the sound on right speaker while Player.Position.X < Sound.Position.X, and then on the left speaker when Player.Position.X > Sound.Position.X?

11
DotNet / Re: SFML.NET 2.2 for .NET 4.6.2
« on: October 03, 2016, 05:38:20 pm »

12
DotNet / Re: SFML.NET 2.2 for .NET 4.6.1
« on: October 03, 2016, 04:17:47 pm »
Thanks for the answer.
And what about the sfml.net 2.4? Any news?

13
DotNet / SFML.NET 2.2 for .NET 4.6.1
« on: October 03, 2016, 04:07:32 pm »
I've tried to create a new project using .net 4.6.1, but I figured out that the max .net version suported by sml.net is .net 4.

Then I downloaded the sourcecode of sfml.net, I made a update on the project to run with the newest version of .net 4.6.1.

Then I reimported the .dlls references (sfmlnet-graphcis-2, sfmlnet-system-2, sfmlnet-audio-2, sfmlnet-window-2) on my original game, I set the version to .net 4.6.1 and is running nice! Now I can use some new features from .net, like
myObject?.Update();

But I want to know about the "SFML.Net-2.2\extlibs" that should be imported on the project and need to be present on the .exe path, specially the csfml- ones.

They need to be updated too?

14
DotNet / Re: Issue using Joystick static methods
« on: August 29, 2016, 08:57:17 pm »
Sorry ressurrect the post, but I'm with the same problem here. When I create a new custom Gamepad object, it looks through Joystick.IsConnected(0) but always receive false. Using current .net version 2.2 on Windows 10 (connecting XBOX One controller). On C++ version runs ok.

This is my custom Gamepad class:

public class Gamepad {

        public Gamepad(uint index) {
                this.index = index;
                if (Joystick.IsConnected(this.index)) Console.WriteLine(String.Format("Gamepad Connected\nID:{0}\n", Joystick.GetIdentification(this.index)));
                else Console.WriteLine("No gamepad connected.");
        }
}
 

On my Game class:

public class Game {
   
        public Game(string title) {
                this.windowTitle = title;
                this.window = new RenderWindow(new VideoMode(WINDOW_WIDTH, WINDOW_HEIGHT), windowTitle);
                this.window.SetFramerateLimit(maxFPS);

                this.player = new Player();
                this.world = new World();
                this.gamepad0 = new Gamepad(0);
        }

        //....
}
 

Pages: [1]