[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [CPROG] Flushing af stdin



> >gettimeofday kan du selv se hvor lang tid der er gået, og så få din
> >simulations-/spiltid til at forløbe så naturligt som muligt.
> 
> Men i et tetris / slå-din-modstander-ned / platform-spil er du vel sådan set
> ligeglad med hvor lang tid, der i virkeligheden er gået.
> Lige meget hvad du gør, kan du aldrig garantere at du får lov at køre
> dit main-loop igennem 10 gange pr. sek.
> Hvis du så vil tælle den faktiske spilletid kan du lave det separat.
> Altså noget ala:

Jeg er ikke ligeglad. Se denne fantastiske ascii grafik:

frame 1              frame 2           frame 3              frame 4

xxxx 
                     xxxx
                                       xxxx
                                                            xxxx
-------              -------           -------              -------

Hvis frames bliver tegnet til tid (ms) 0, 100, 200, 300 ms er jeg glad. 
Men, hvis nu tiden går som 0, 100, 300, 400 vil jeg tegne sådan her:

frame 1              frame 2           frame 3              frame 4

xxxx                                                        yyy
                     xxxx                                    
                                       
                                       xxxx                 xxxx
-------              -------           -------              -------

Med andre ord: jeg kobler min realtid tæt sammen med min simulationstid -
ellers får jeg jo ikke en tidstro "stress" på spilleren.

Tid og computerspil ikke totalt trivielt.

Mads





 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 20:08 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *