Post

 Resources 

Console

Home | Profile | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 VBGamer
 VBGamer
 What You think about this FPS speed?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

AutoAim
Squire

USA
33 Posts

Posted - Dec 01 2004 :  2:37:38 PM  Show Profile  Visit AutoAim's Homepage  Send AutoAim an AOL message  Send AutoAim an ICQ Message  Click to see AutoAim's MSN Messenger address  Send AutoAim a Yahoo! Message  Reply with Quote
I would let you guys test the program yourself but it toke me a good 30-45 minutes just to get these numbers:
###########################################################
Map View and Screen Size : 800x600
Color Depth: 16 Bit
Tile Size: 64x64
===================================================
| Map Size | Avearge FPS for three runs | Memory Usage Size |
100x100 map = 1503fps, 1480fps, 1409fps (Mem Usage - 3,624K)
500x500 map = 1490fps, 1503fps, 1423fps (Mem Usage - 4,604K)
1000x1000 map = 1497fps, 1493fps, 1585fps (Mem Usage - 7,552K)
2000x2000 map = 1548fps, 1579fps, 1525fps (Mem Usage - 19,264K)
5000x5000 map = 1448fps, 1520fps, 1519fps (Mem Usage - 101,464K)
###########################################################
Computer Specs:
Windows XP Pro (SP2) Version 2002
Intel Pentium 4 2.66 GHz (HT)
1.00 GB RAM
Nvidia Quadro4 900 XGL
===================================================
Current Running Processes: 44
Current Available Physical Memory: 577556K Out Of 1047532K
Current Page File Usage: 338 MB
###########################################################

You think the FPS is good? I like how the FPS stays no matter what map size, but you think that is a good fps for the specs of the computer?

The WannaBe
http://wannabegames.com

sdw
Warrior

USA
160 Posts

Posted - Dec 01 2004 :  5:14:09 PM  Show Profile  Visit sdw's Homepage  Click to see sdw's MSN Messenger address  Reply with Quote
Those results make sense because you're doing the same amount of drawing no matter what size the map is. The map size only effects the amount fo memory used, which is reflected by your results. Maybe you should also post the method you're using to calculate fps, because lets face it 1500 fps is suspiciously high :D Are these results from using DirectDraw, Direct3D, another API?

Go to Top of Page

AutoAim
Squire

USA
33 Posts

Posted - Dec 01 2004 :  6:18:21 PM  Show Profile  Visit AutoAim's Homepage  Send AutoAim an AOL message  Send AutoAim an ICQ Message  Click to see AutoAim's MSN Messenger address  Send AutoAim a Yahoo! Message  Reply with Quote
If it was the winapi then i gave my computer extasy ;-)
its on DirectDraw, then map class source can be viewed here www.angelfire.com/games5/visualgamebasic/mapclasscode.html
to demo exes (100x100 and 500x500 map sizes) www.angelfire.com/games5/visualgamebasic/maptest.zip
and the code to get the fps:
  
'in the game loop:
lngTimeA = GetTickCount()  
        If lngTimeA - lngTimeB >= 1000 Then
        'if its has been one second then  
  
            lngTotal = lngTotal + lngFps  
            lngCount = lngCount + 1  
            lngFps = 0  
  
            lngTimeB = GetTickCount()  
            'update the string fps and clear the fps  
  
'when you close the program:
strFps = Str$(lngTotal / lngCount)  
MsgBox "Average FPS: " & strFps  
  

The WannaBe
http://wannabegames.com
Go to Top of Page

sdw
Warrior

USA
160 Posts

Posted - Dec 01 2004 :  6:26:00 PM  Show Profile  Visit sdw's Homepage  Click to see sdw's MSN Messenger address  Reply with Quote
And that code actually runs with no errors?
Go to Top of Page

AutoAim
Squire

USA
33 Posts

Posted - Dec 01 2004 :  6:30:10 PM  Show Profile  Visit AutoAim's Homepage  Send AutoAim an AOL message  Send AutoAim an ICQ Message  Click to see AutoAim's MSN Messenger address  Send AutoAim a Yahoo! Message  Reply with Quote
whicih code the fps code or map class code? i don't get an errors why?

The WannaBe
http://wannabegames.com
Go to Top of Page

sdw
Warrior

USA
160 Posts

Posted - Dec 01 2004 :  6:36:53 PM  Show Profile  Visit sdw's Homepage  Click to see sdw's MSN Messenger address  Reply with Quote
There is no "End If" in the code above. Either you didn't copy all the code or you typed that all out from memory. In any case, it appears you're not counting the number of frames each second, instead you're doing everything at a 1000ms interval and nothing at a frame-based interval. Take a look at the following link to see how it compares to your current code: http://www.vbgamer.com/msgboard/topic.asp?TOPIC_ID=323.
Go to Top of Page

AutoAim
Squire

USA
33 Posts

Posted - Dec 01 2004 :  6:44:19 PM  Show Profile  Visit AutoAim's Homepage  Send AutoAim an AOL message  Send AutoAim an ICQ Message  Click to see AutoAim's MSN Messenger address  Send AutoAim a Yahoo! Message  Reply with Quote
quote:
Originally posted by sdw
<br>you're doing the same amount of drawing no matter what size the map is. The map size only effects the amount fo memory used, which is reflected by your results.

Well thats really not true, lots of people go thourgh each tile seeing if that tile is on screen or not, so if the map array is gets larger then it has to go through more tiles checking to see if its on screen, well i just knock that part out by finding the beginning upper,left Tile then the End lower,right Tile and only draw those tiles inbetween, no need to go through each tile.


  
        lngFps = lngFps + 1  
        'count the fps  
  
        lngTimeA = GetTickCount()  
        'get the tickcount  
  
        If lngTimeA - lngTimeB >= 1000 Then
        'if its has been one second then  
  
            lngTotal = lngTotal + lngFps  
            lngCount = lngCount + 1  
            lngFps = 0  
            'clear the fps  
  
            lngTimeB = GetTickCount()  
  
        End If
  
  
Loop
  
End Sub
  
Private Sub Game_ShutDown()  
  
bRunning = False
Set Map = Nothing  
Set BackBuffer = Nothing  
DD7.Shutdown  
Set DD7 = Nothing  
  
Me.Hide  
  
strFps = Str$(lngTotal / lngCount)  
MsgBox "Average FPS: " & strFps  
  
End
  
End Sub
  

sorry about that, this mouse is messed up


The WannaBe
http://wannabegames.com

Edited by - AutoAim on Dec 01 2004 7:03:05 PM
Go to Top of Page

sdw
Warrior

USA
160 Posts

Posted - Dec 01 2004 :  6:57:04 PM  Show Profile  Visit sdw's Homepage  Click to see sdw's MSN Messenger address  Reply with Quote
quote:
lots of people go thourgh each tile seeing if that tile is on screen or not

Ehh, you mean starting from element 0? Yes, thats a big no no.

Generally you only need 3 variables for calculating FPS. Try using this instead:
  
If GetTickCount() - lngTime >= 1000 Then
'if its has been one second then
     lngTotal = lngFps  
     lngFps = 0  
     lngTime = GetTickCount()  
else
     lngFps = lngFps + 1  
End If
  

Where lngTotal will hold the number of frames which passed during the last second and is therefore used for displaying the FPS.

Edit: Ok I looked over your code again and looks like it's correct. Do you still get 1500 fps from the code above?

Edited by - sdw on Dec 01 2004 7:02:48 PM
Go to Top of Page

AutoAim
Squire

USA
33 Posts

Posted - Dec 01 2004 :  7:01:16 PM  Show Profile  Visit AutoAim's Homepage  Send AutoAim an AOL message  Send AutoAim an ICQ Message  Click to see AutoAim's MSN Messenger address  Send AutoAim a Yahoo! Message  Reply with Quote
i'm calcutling the avearge (sorry about that to, should have said that) i add to the current fps to the total; every second i add it to the lngtotal again, (the lngcount is to count how many times i have added to the total) then when you end the program it gets the avg and tells the user what the avg fps was

The WannaBe
http://wannabegames.com

Edited by - AutoAim on Dec 01 2004 7:02:20 PM
Go to Top of Page

Threshold
Squire

USA
44 Posts

Posted - Dec 02 2004 :  7:03:29 PM  Show Profile  Reply with Quote
Many people go through each tile? I doubt it. I never did that even when I was a n00b. I did make one game that wasn't tile based and did that. It wasn't all that slow, actually.

Life is short. They say "don't waste it, have fun." They're right, don't waste it...but DO redefine "fun."
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
VBGamer © Go To Top Of Page
This page was generated in 0.25 seconds. Snitz Forums 2000

Copyright © 2002 - 2004 Eric Coleman, Peter Kuchnio , et. al.