View previous topic :: View next topic |
Author |
Message |
bubu Indago Uzvarētājs
![Indago Uzvarētājs Indago Uzvarētājs](https://forums.gamedev.lv/images/ranks/cup1.gif)
Joined: 23 Mar 2004 Posts: 3223 Location: Riga
|
Posted: 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 |
|
![](templates/subSilver/images/spacer.gif) |
Kamazs Guru
![Guru Guru](https://forums.gamedev.lv/images/ranks/guru.gif)
![](http://superfantasy.nemirst.lv/kamaz_jaun.png)
Joined: 17 Jan 2003 Posts: 829 Location: The glorious ancient city of Loja
|
Posted: 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 |
|
![](templates/subSilver/images/spacer.gif) |
NocK
![](http://www.gfx-dream.lv/up/images/6267Untitled-1.gif)
Joined: 06 Jan 2005 Posts: 107
|
Posted: 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 |
|
![](templates/subSilver/images/spacer.gif) |
bubu Indago Uzvarētājs
![Indago Uzvarētājs Indago Uzvarētājs](https://forums.gamedev.lv/images/ranks/cup1.gif)
Joined: 23 Mar 2004 Posts: 3223 Location: Riga
|
Posted: 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 |
|
![](templates/subSilver/images/spacer.gif) |
kaszu
Joined: 28 Dec 2004 Posts: 103 Location: Iceberg, Northpole
|
Posted: 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 |
|
![](templates/subSilver/images/spacer.gif) |
s1 Guest
|
Posted: Mon Apr 18, 2005 8:59 pm Post subject: |
|
NocK, iesaku izmantot DelphiX, ļoti labs plugins, tieši priekš 2D. |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
Kristians
![](http://anekdotov.net/pic/comp/1101fc.gif)
Joined: 06 Apr 2005 Posts: 99 Location: Ventspils
|
Posted: 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
|
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
bubu Indago Uzvarētājs
![Indago Uzvarētājs Indago Uzvarētājs](https://forums.gamedev.lv/images/ranks/cup1.gif)
Joined: 23 Mar 2004 Posts: 3223 Location: Riga
|
Posted: 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
| Neesi iedomājies, ka pogas var nospiest vairāk kā divas reizes vienā sekundē ;) |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
Kristians
![](http://anekdotov.net/pic/comp/1101fc.gif)
Joined: 06 Apr 2005 Posts: 99 Location: Ventspils
|
Posted: 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 |
|
![](templates/subSilver/images/spacer.gif) |
kaszu
Joined: 28 Dec 2004 Posts: 103 Location: Iceberg, Northpole
|
Posted: 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 |
|
![](templates/subSilver/images/spacer.gif) |
Kristians
![](http://anekdotov.net/pic/comp/1101fc.gif)
Joined: 06 Apr 2005 Posts: 99 Location: Ventspils
|
Posted: 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 |
|
![](templates/subSilver/images/spacer.gif) |
bubu Indago Uzvarētājs
![Indago Uzvarētājs Indago Uzvarētājs](https://forums.gamedev.lv/images/ranks/cup1.gif)
Joined: 23 Mar 2004 Posts: 3223 Location: Riga
|
Posted: Tue Apr 19, 2005 11:57 pm Post subject: |
|
Ar taimeri veidots spēles main loop nav labs. |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
Kristians
![](http://anekdotov.net/pic/comp/1101fc.gif)
Joined: 06 Apr 2005 Posts: 99 Location: Ventspils
|
Posted: 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](images/smiles/icon_lol.gif) |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
Kristians
![](http://anekdotov.net/pic/comp/1101fc.gif)
Joined: 06 Apr 2005 Posts: 99 Location: Ventspils
|
Posted: 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](images/smiles/icon_lol.gif) |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
bubu Indago Uzvarētājs
![Indago Uzvarētājs Indago Uzvarētājs](https://forums.gamedev.lv/images/ranks/cup1.gif)
Joined: 23 Mar 2004 Posts: 3223 Location: Riga
|
Posted: Wed Apr 20, 2005 12:16 am Post subject: |
|
Tu pats saproti, ko saki vispār? Es, piemēram, nē. |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
|