Differences

This shows you the differences between two versions of the page.

Link to this comparison view

pjv:laboratoare:2025:a05 [2025/12/10 12:33]
alexandru.gradinaru [Client]
pjv:laboratoare:2025:a05 [2025/12/10 12:46] (current)
alexandru.gradinaru [Cerinte]
Line 32: Line 32:
 ==== Cerinte ===== ==== Cerinte =====
  
-Realizarea unui joc multiplayer de tip social:+Realizarea unui joc multiplayer de tip social, prin folosirea/​implementarea unui server multiplayer dedicat: 
 + 
 + 
 +  * Player avatar sincronizat la nivel de pozitie si animatii: minim 2 playeri/​clienti 
 +  * Comunicare chat cu interfata grafica 
  
-<​hidden>​ 
-  * Player avatar sincronizat la nivel de pozitie si animatii 
-  * Comunicare chat sau voice 
-  * Server multiplayer dedicat, implementare proprie 
-</​hidden>​ 
  
    
Line 257: Line 257:
                         // instantiate network user                         // instantiate network user
                         obj = Instantiate(networkPrefab,​ position, Quaternion.identity) as GameObject;                         obj = Instantiate(networkPrefab,​ position, Quaternion.identity) as GameObject;
 +                        ​
 +                        //keep a list with all network players
 +                        networkPlayerManager.Add(id,​ playObj);
                     }                     }
  
Line 266: Line 269:
     ​     ​
 </​code>​ </​code>​
-  * actualizam sincronizarile din server pentru toti playerii. Pentru asta in general avem nevoie sa tinem minte toata lista de clienti ​(inclusiv cel local)+  * actualizam sincronizarile din server pentru toti playerii. Pentru asta in general avem nevoie sa tinem minte toata lista de clienti ​
 <​code>​ <​code>​
 Dictionary<​ushort,​ NetworkPlayerObj>​ networkPlayers = new Dictionary<​ushort,​ NetworkPlayerObj>​();​ Dictionary<​ushort,​ NetworkPlayerObj>​ networkPlayers = new Dictionary<​ushort,​ NetworkPlayerObj>​();​
Line 461: Line 464:
     }     }
    </​code>​    </​code>​
 +   
 +   
  
 +Pentru sincronizarea de animatii se poate proceda in mai multe feluri, in functie si de modul de gestiune al animatiilor:​
 +     * fie se trimite si un indicator de stare al animatiei si se sincornizeaza over network
 +     * fie se folosesc valori de speed, hieght etc (calculate prin diferenta sau luate/​transmise direct)
 ==== Chat ===== ==== Chat =====
  
pjv/laboratoare/2025/a05.1765362823.txt.gz · Last modified: 2025/12/10 12:33 by alexandru.gradinaru
CC Attribution-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0