Bienvenue, Invité. Merci de vous connecter ou de vous inscrire. Avez-vous oublié d'activer ?

Voir les contributions

Cette section vous permet de consulter les contributions (messages, sujets et fichiers joints) d'un utilisateur. Vous ne pourrez voir que les contributions des zones auxquelles vous avez accès.


Sujets - Gorf

Pages: [1]
1
Réseau / [Résolu] Atteindre le backlog d'une Socket TCP ?
« le: Août 27, 2015, 01:05:10 am »
Bonjour à tous.
J'écris un jeu en multijoueur. Lorsqu'un joueur souhaite se déplacer, il envoie un message de "requête" au serveur, qui va s'occuper des calculs physiques correspondants. Ensuite le serveur va périodiquement redistribuer les positions des joueurs à ceux-ci.
Le serveur est donc super important ! Le problème c'est que dans ce jeu on aura tendance à se déplacer *très* souvent, et j'ai cru observer un amoncellement de backlog sur mes sockets côté serveur. Du coup, le serveur perd du temps à traiter des vieilles demandes ce qui accroît le lag. Et c'est pas top.
Voilà donc ma question :

 Y'a t-il un moyen d'accéder à ce backlog et de supprimer/ignorer des paquets plutôt rapidement ?

J'ai pensé à implémenter une clock 25 Hz qui limite la fréquence des demandes mais ça semble toujours ralentir, et se déplacer à 25 Hz c'est déjà assez limite je trouve.

Merci infiniment pour votre temps et bonne journée/nuit ! ^^

EDIT : Encore une fois j'ai oublié ma config : SFML 2.1 mais prêt à upgrader, Windows 8 64bit

2
Général / [RÉSOLU]SFML2 compilée "maison" en Statique
« le: Mai 11, 2013, 03:36:31 pm »
Bonjour, j'ai hier enfin compilé la SFML2 moi-même (et mis à jour GCC en 4.8 aussi), et lorsque j'utilise la build en statique que j'ai fait (.a), le compilateur me sort ça :
Citer
/usr/local/lib/libsfml-window-s.a(WindowImplX11.cpp.o): In function `sf::priv::WindowImplX11::setMouseCursorVisible(bool)':
WindowImplX11.cpp:(.text+0x6f): undefined reference to `XDefineCursor'
/usr/local/lib/libsfml-window-s.a(WindowImplX11.cpp.o): In function `sf::priv::WindowImplX11::setVisible(bool)':
WindowImplX11.cpp:(.text+0xb3): undefined reference to `XUnmapWindow'
WindowImplX11.cpp:(.text+0xd1): undefined reference to `XMapWindow'
/usr/local/lib/libsfml-window-s.a(WindowImplX11.cpp.o): In function `sf::priv::WindowImplX11::setSize(sf::Vector2<unsigned int> const&)':
WindowImplX11.cpp:(.text+0x10d): undefined reference to `XResizeWindow'
/usr/local/lib/libsfml-window-s.a(WindowImplX11.cpp.o): In function `sf::priv::WindowImplX11::getPosition() const':
WindowImplX11.cpp:(.text+0x15e): undefined reference to `XGetWindowAttributes'
/usr/local/lib/libsfml-window-s.a(WindowImplX11.cpp.o): In function `sf::priv::WindowImplX11::getSize() const':
WindowImplX11.cpp:(.text+0x1ae): undefined reference to `XGetWindowAttributes'
/usr/local/lib/libsfml-window-s.a(WindowImplX11.cpp.o): In function `sf::priv::WindowImplX11::setPosition(sf::Vector2<int> const&)':
WindowImplX11.cpp:(.text+0x1fd): undefined reference to `XMoveWindow'
/usr/local/lib/libsfml-window-s.a(WindowImplX11.cpp.o): In function `sf::priv::WindowImplX11::setIcon(unsigned int, unsigned int, unsigned char const*)':
WindowImplX11.cpp:(.text+0x3c5): undefined reference to `XCreateImage'
WindowImplX11.cpp:(.text+0x410): undefined reference to `XCreatePixmap'
WindowImplX11.cpp:(.text+0x441): undefined reference to `XCreateGC'
WindowImplX11.cpp:(.text+0x497): undefined reference to `XPutImage'
WindowImplX11.cpp:(.text+0x4b0): undefined reference to `XFreeGC'
WindowImplX11.cpp:(.text+0x6b0): undefined reference to `XCreatePixmapFromBitmapData'
WindowImplX11.cpp:(.text+0x6b7): undefined reference to `XAllocWMHints'
WindowImplX11.cpp:(.text+0x6e5): undefined reference to `XSetWMHints'
WindowImplX11.cpp:(.text+0x6ed): undefined reference to `XFree'
WindowImplX11.cpp:(.text+0x6fb): undefined reference to `XFlush'
/usr/local/lib/libsfml-window-s.a(WindowImplX11.cpp.o): In function `sf::priv::WindowImplX11::setTitle(sf::String const&)':
WindowImplX11.cpp:(.text+0xb66): undefined reference to `XInternAtom'
WindowImplX11.cpp:(.text+0xb8a): undefined reference to `XInternAtom'
WindowImplX11.cpp:(.text+0xbc9): undefined reference to `XChangeProperty'
WindowImplX11.cpp:(.text+0xc14): undefined reference to `XStoreName'
/usr/local/lib/libsfml-window-s.a(WindowImplX11.cpp.o): In function `sf::priv::WindowImplX11::switchToFullscreen(sf::VideoMode const&)':
WindowImplX11.cpp:(.text+0xdcd): undefined reference to `XQueryExtension'
WindowImplX11.cpp:(.text+0xdfc): undefined reference to `XRRGetScreenInfo'
WindowImplX11.cpp:(.text+0xe16): undefined reference to `XRRConfigCurrentConfiguration'
WindowImplX11.cpp:(.text+0xe2f): undefined reference to `XRRConfigSizes'
WindowImplX11.cpp:(.text+0xea6): undefined reference to `XRRSetScreenConfig'
WindowImplX11.cpp:(.text+0xeb4): undefined reference to `XRRFreeScreenConfigInfo'
/usr/local/lib/libsfml-window-s.a(WindowImplX11.cpp.o): In function `sf::priv::WindowImplX11::createHiddenCursor()':
WindowImplX11.cpp:(.text+0xf86): undefined reference to `XCreatePixmap'
WindowImplX11.cpp:(.text+0xfaa): undefined reference to `XCreateGC'
WindowImplX11.cpp:(.text+0xfd2): undefined reference to `XDrawPoint'
WindowImplX11.cpp:(.text+0xfe4): undefined reference to `XFreeGC'
WindowImplX11.cpp:(.text+0x1030): undefined reference to `XCreatePixmapCursor'
WindowImplX11.cpp:(.text+0x1048): undefined reference to `XFreePixmap'
/usr/local/lib/libsfml-window-s.a(WindowImplX11.cpp.o): In function `sf::priv::WindowImplX11::initialize()':
WindowImplX11.cpp:(.text+0x10a2): undefined reference to `XInternAtom'
WindowImplX11.cpp:(.text+0x10d2): undefined reference to `XSetWMProtocols'
WindowImplX11.cpp:(.text+0x10f8): undefined reference to `XOpenIM'
WindowImplX11.cpp:(.text+0x1144): undefined reference to `XCreateIC'
WindowImplX11.cpp:(.text+0x1166): undefined reference to `XMapWindow'
WindowImplX11.cpp:(.text+0x1174): undefined reference to `XFlush'
/usr/local/lib/libsfml-window-s.a(WindowImplX11.cpp.o): In function `sf::priv::WindowImplX11::WindowImplX11(unsigned long)':
WindowImplX11.cpp:(.text+0x12c0): undefined reference to `XSelectInput'
/usr/local/lib/libsfml-window-s.a(WindowImplX11.cpp.o): In function `sf::priv::WindowImplX11::WindowImplX11(sf::VideoMode, sf::String const&, unsigned long)':
WindowImplX11.cpp:(.text+0x142c): undefined reference to `XCreateWindow'
WindowImplX11.cpp:(.text+0x14bf): undefined reference to `XQueryExtension'
WindowImplX11.cpp:(.text+0x14ee): undefined reference to `XRRGetScreenInfo'
WindowImplX11.cpp:(.text+0x150b): undefined reference to `XRRConfigCurrentConfiguration'
WindowImplX11.cpp:(.text+0x1527): undefined reference to `XRRConfigSizes'
WindowImplX11.cpp:(.text+0x1592): undefined reference to `XRRSetScreenConfig'
WindowImplX11.cpp:(.text+0x15a4): undefined reference to `XRRFreeScreenConfigInfo'
WindowImplX11.cpp:(.text+0x15f0): undefined reference to `XInternAtom'
WindowImplX11.cpp:(.text+0x16cd): undefined reference to `XChangeProperty'
WindowImplX11.cpp:(.text+0x1709): undefined reference to `XSetWMNormalHints'

Voilà, je suis sous Ubuntu 12.04 avec GCC 4.8 donc, la SFML2.
Apparemment, c'est un problème avec Xlib, faut-il en installer la version statique aussi ?
Au cas-ou, j'ai aussi compilée en .so, mais pour plus de praticité à l'installation de mon programme, je préfèrerais la statique.

Merci de vos réponses.

PS : 1 Euro que Laurent sera premier !  ;D

3
Graphique / [Résolu]Les Vues??
« le: Mai 05, 2013, 09:58:32 pm »
Bonjour à tous,
aujourd'hui (ou plutôt cette nuit),  j'ai une question très simple à vous poser.
En fait, je ne comprends pas le concept de Vue.  :-\
Ça serait sympa si je pouvais avoir un exemple :>

Est-ce que ça pourrait être, par exemple, centré sur un personnage, se déplaçant sur un terrain (avec des tiles), terrain ayant sa propre vue ?

Merci de vos réponses!

Pages: [1]
anything