dev.gamez.lv Forum Index dev.gamez.lv
Latvian Game Developers Community
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups 

Kustība Delfos
Goto page Previous  1, 2, 3, 4, 5  Next
 
dev.gamez.lv Forum Index -> Programmēšana
View previous topic :: View next topic  
Author Message
bubu
Indago Uzvarētājs
Indago Uzvarētājs


Joined: 23 Mar 2004
Posts: 3223
Location: Riga

PostPosted: Sat Apr 16, 2005 11:18 pm    Post subject:

NocK wrote:
Varbūt nepareizu uzskaites laiku uzliku ???
Kā lai mēs to zinām, ko tu tur esi salicis, un ko nē. Ja nestāsti precīzi, ko esi izdarījis/sarakstījis kodā, tad kā lai mēs to uzminam?
Back to top
View user's profile Send e-mail
Kamazs
Guru
Guru


Joined: 17 Jan 2003
Posts: 829
Location: The glorious ancient city of Loja

PostPosted: Sun Apr 17, 2005 12:34 am    Post subject:

Nu 60 fps priekš tādas aplikācijas imo ir pavisam normāli.Varbūt pat VSync:D. Un tas, ka jams vairs nemainās - tas arii ir ok, FPSam jaabuut peec iespeejas stabilaakam.
_________________
...un es uzskatu, ka Fallout ir etalons
Back to top
View user's profile Send e-mail Visit poster's website
NocK



Joined: 06 Jan 2005
Posts: 107

PostPosted: Sun Apr 17, 2005 10:45 am    Post subject:

Nu man 2 taimeri (Timer2 un Timer3):
Code:
procedure TForm1.Timer2Timer(Sender: TObject);
begin
 Label3.Caption:='FPS: '+IntToStr(FPS);
 FPS:=0;
end;

procedure TForm1.Timer3Timer(Sender: TObject);
begin
 FPS:=FPS+1;
end;


Timer2.Interval:=1000;
Timer3.Interval:=10;

Un tajam timer3 es liku i uz 1, 10, 100 īpaši nekas nemainījās! Āaa... Vienreiz uz 100 viņš man 10-9 FPS rādīja.
Back to top
View user's profile Send e-mail Visit poster's website
bubu
Indago Uzvarētājs
Indago Uzvarētājs


Joined: 23 Mar 2004
Posts: 3223
Location: Riga

PostPosted: Sun Apr 17, 2005 12:14 pm    Post subject:

Ghe. Tas tak nav pareizi. FPS := FPS + 1 tev jādara tikai tad, kad zīmē jaunu kadru. Nevis fiksētu skaitu reižu sekundē. Padomā pats, ja tu ik pa 100 milisekundēm pieskaitīsi FPS vieninieku, tad sekundē cik reizes tu to izdarīsi? 1000/100=10, tāttad uz labeļa rādīs skaitli 10.
Back to top
View user's profile Send e-mail
kaszu



Joined: 28 Dec 2004
Posts: 103
Location: Iceberg, Northpole

PostPosted: Sun Apr 17, 2005 3:20 pm    Post subject:

Kaut kaa saadi:

Code:

procedure Render()
begin
    FPS := FPS + 1;
   
    //Ziimeessanas kods

end;

procedure TForm1.Timer2Timer(Sender: TObject);
begin
 Label3.Caption:='FPS: '+IntToStr(FPS);
 FPS:=0;
end;
 
Back to top
View user's profile Send e-mail Visit poster's website
s1
Guest





PostPosted: Mon Apr 18, 2005 8:59 pm    Post subject:

NocK, iesaku izmantot DelphiX, ļoti labs plugins, tieši priekš 2D.
Back to top
Kristians



Joined: 06 Apr 2005
Posts: 99
Location: Ventspils

PostPosted: Tue Apr 19, 2005 4:56 pm    Post subject:

nahren tev 2 taimeri? skat kaa vajag

Code:
 
procedure TForm1.Timer2Timer(Sender: TObject);
begin
 Label3.Caption:='FPS: '+IntToStr(FPS);
 FPS:=0;
end;

un otrai proceduurai jaabut tur kur taas pogas spiezh
tur tjipa
Code:

fps := fps+1;
Back to top
View user's profile Send e-mail
bubu
Indago Uzvarētājs
Indago Uzvarētājs


Joined: 23 Mar 2004
Posts: 3223
Location: Riga

PostPosted: Tue Apr 19, 2005 5:59 pm    Post subject:

Kristians wrote:
nahren tev 2 taimeri? skat kaa vajag
un otrai proceduurai jaabut tur kur taas pogas spiezh
tur tjipa
Code:

fps := fps+1;
Neesi iedomājies, ka pogas var nospiest vairāk kā divas reizes vienā sekundē ;)
Back to top
View user's profile Send e-mail
Kristians



Joined: 06 Apr 2005
Posts: 99
Location: Ventspils

PostPosted: Tue Apr 19, 2005 8:43 pm    Post subject:

esmu iedomaajies veel vienu variantu
nu tjipa uzbaaz 2 mainiigos kas buus ieprieksheejaas x y koordinaatas
un tas fps skaita cik reižu tie mainiigie mainaas un tad tas timeris pasaka uz intervaalu fps uz intervaala 1000
Back to top
View user's profile Send e-mail
kaszu



Joined: 28 Dec 2004
Posts: 103
Location: Iceberg, Northpole

PostPosted: Tue Apr 19, 2005 10:46 pm    Post subject:

Hmhm... Cik es esmu palasiijis tavus postus, es neko no tiem neesmu spratis, taa arii ir tagad. Vispaar kaapeec viss veel jasarezzggii?

FPS -frames per second ?!
Cik kadri sekundee tiek atteeloti.

Katraa reizee kaa tiek paarzimeets (atteelots) kadrs, taa palielina FPS par vienu. Ik peec sekundes FPS tiek nomests uz 0 (pirms tam laikam gan vajadzeetu izvadiit, lai buutu no taa vispaar kaada jeega).
Back to top
View user's profile Send e-mail Visit poster's website
Kristians



Joined: 06 Apr 2005
Posts: 99
Location: Ventspils

PostPosted: Tue Apr 19, 2005 11:50 pm    Post subject:

aj nu gribi pavisam vienkaarshi panjem delphix paziimee kaut ko uz dxdraw caur dxtimer un turir iebuuveeta funkcija fps
Back to top
View user's profile Send e-mail
bubu
Indago Uzvarētājs
Indago Uzvarētājs


Joined: 23 Mar 2004
Posts: 3223
Location: Riga

PostPosted: Tue Apr 19, 2005 11:57 pm    Post subject:

Ar taimeri veidots spēles main loop nav labs.
Back to top
View user's profile Send e-mail
Kristians



Joined: 06 Apr 2005
Posts: 99
Location: Ventspils

PostPosted: Wed Apr 20, 2005 12:14 am    Post subject:

bubu wrote:
Ar taimeri veidots spēles main loop nav labs.

Nē nu ja te daži nesaprot tad tas ir labs Laughing
Back to top
View user's profile Send e-mail
Kristians



Joined: 06 Apr 2005
Posts: 99
Location: Ventspils

PostPosted: Wed Apr 20, 2005 12:15 am    Post subject:

kaszu wrote:
Hmhm... Cik es esmu palasiijis tavus postus, es neko no tiem neesmu spratis, taa arii ir tagad. Vispaar kaapeec viss veel jasarezzggii?

FPS -frames per second ?!
Cik kadri sekundee tiek atteeloti.

Katraa reizee kaa tiek paarzimeets (atteelots) kadrs, taa palielina FPS par vienu. Ik peec sekundes FPS tiek nomests uz 0 (pirms tam laikam gan vajadzeetu izvadiit, lai buutu no taa vispaar kaada jeega).

Palasi Gigas postus Laughing Laughing Laughing Laughing Laughing Laughing Laughing Laughing Laughing Laughing Laughing Laughing Laughing Laughing
Back to top
View user's profile Send e-mail
bubu
Indago Uzvarētājs
Indago Uzvarētājs


Joined: 23 Mar 2004
Posts: 3223
Location: Riga

PostPosted: Wed Apr 20, 2005 12:16 am    Post subject:

Tu pats saproti, ko saki vispār? Es, piemēram, nē.
Back to top
View user's profile Send e-mail
Display posts from previous:   
dev.gamez.lv Forum Index -> Programmēšana All times are GMT + 2 Hours
Goto page Previous  1, 2, 3, 4, 5  Next
Page 2 of 5

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group