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.


Topics - RyanPaul87

Pages: [1]
1
Hi SFML community, and admin team!

I'm just delving into networking with sfml, and looked at a few boost tutorials. I realise this question has been asked a lot and some people don't follow this path to completion.

I'm currently signed off work long term with mental health ups and downs (nothing too serious) and have a year to myself essentially and want to help myself heal with a bit of coding (logic)

I wanted some 'pre' wisdom and advice before I go too far down the 'wrong' path.

I'd like to grab myself a book on c++ networking or some solid resource so in the next month or two I'm in a stronger position to look at designing an average (or at least a basic foundation) server / client architecture that will support a small 2d online game (upto 50-100 clients maybe, but then might be something I can adapt too over time.

It would be all the usual, sending some raw image data, player positions and player statistics, as well as getting some understanding on prediction models, so the server might predict where the player will walk and save on bandwidth, as well as other strategies. Can you suggest:

  • Any beginners (through to intermedia / advanced) books or tutorials that are relevant but also practical and current enough.

    Any goto source code you might recommend

    Any wisdom yourself

    The best libraries you might recommend.

    Any small / medium similar projects I should look at

Thank you.

2
Network / Sending 'images' over in packets
« on: December 08, 2021, 06:43:20 pm »
I was wondering if some body could give me some starting points, for sending images (or the image data) to a server which would send it to a few dozen clients. Happy to do the work myself but just wanted a jumping point.

I understand I will overload the << >> operators, but, what's the best way to unpack an image (png for instance) into raw data then repack at the other end without losing data.

It doesn't need to be displayed by the server, but pass to other clients, obviously.

Thanks for your patience.

3
Network / Sending Custom Class by packet (to different program)
« on: December 07, 2021, 02:40:08 pm »
Hi, thank you Laurent and others for the tutorial on overriding the << >> operators to be able to send classes.

Before I jump into this, I wondered how this would work on the other end. That is, the receiving program.

The receiving server would also be made myself, and so I can include the .cpp and .h of the class I will be sending over. But I just wanted to check this is necessary. I.e the class has to be defined on the other end / the other exe.

Essentially I will be sending character data for a handful of characters with their statistics.

I know how to override the << >> but just wanted a small bit of help with how I get it at the receiving end. a line or two of code,

i.e the tutorial states
Packet >> Bob;
How then do I make this an object on the receiving side etc. like class instance = packet >> bob (to give a bad psuedo code example).

You can probably see I am quite new to this, but enjoying it. Any comments on what I'm asking, or what you think I'm trying to achieve will be helpful.

Pages: [1]
anything