Please login or register.

Login with username, password and session length
Advanced search  

News:

Latest WME version: WME 1.9.1 (January 1st, 2010) - download

Author Topic: How to handle Loops and FPS questions  (Read 2620 times)

0 Members and 1 Guest are viewing this topic.

plobone

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 17
    • View Profile
How to handle Loops and FPS questions
« on: March 13, 2014, 08:14:16 PM »

Hello there!!

I'm experimenting a little bit with the idea of making an action adventure game and I
have a few questions refering to while loops.

The game will be a third person view, the camera will follow constantly the character.

The cursor will help to move the actor in the scene, pick up objects, talk to entities, change scenes.
ButI want while im pressing down the TAB key the simple cursor to transform to weapon
cursor and kill enemies when click on them...After I release TAB key the cursor will
transform back to normal and do the regular actions.


I have achieved that by making a while loop in a new script file, in the script folder of
project manager. Also I have another script file with a while loop that controls the
camera movement.

---And I was wondering is this the correct way to handle the loops?

---Should I put both of these loops in one script file?These are loops that will run all the time in the game.

---Also I was checking the fps rate... only for one second in the startup of the game the framerate
is 60 and after that goes 250+ ...This happended from the moment I made the while loop for the camera.
That kind of frame rate is normal??

Thank you very much for your time!
CHeEERRZZz

 
Logged

piere

  • Supporter
  • Frequent poster
  • *
  • Karma: 4
  • Offline Offline
  • Posts: 301
  • Sorry for any bad english in my posts. Game on !
    • View Profile
Re: How to handle Loops and FPS questions
« Reply #1 on: March 19, 2014, 05:08:35 AM »

60 fps is a good framerate for any game. The industry standard is 30, so anything above that is good. FPS can slow down if your loops go too fast, so if that happens just make sure to increase the sleep count.
Logged
 

Page created in 0.039 seconds with 20 queries.