Results 1 to 3 of 3

Thread: Some stuff I want to ask

  1. #1
    Squire
    Join Date
    Jun 2012
    Location
    Mexico
    Posts
    26

    Red face Some stuff I want to ask

    Well I have 3 questions... I'm going to start

    the first one, a friend of mine have an android 2.1 device, I have send an apk to him and when he touched the screen at any time on any place (even on bare bones) it will crash, the device he is using was not designed for android 2.1 (its 1.5 but rooted), but most opengl games work even with touch, since I know its not my code, maybe you could test it? I'm also trying to fix it, but I haven't been able... or maybe I need to change something on the build target or parameters? the keyboard keys are being detected and working ok, just the touch kills the app

    second one, is there a way to get time? like SDL_getticks or something like that? I want to shoot every 100 ms or so, and well I want to know if there is already a general way to get the time, or we will have to implement it?

    if I set my game to run at 30 or 60 fps and the game runs at 15 fps, the update function will still be called 30 times? to keep the game physics and render speed fast and stable? (if the game runs at 8 fps and the update also gets down to 8 it will super slow,if the game runs at 1230812038120 fps and the update aswell it will run too fast :S) also at main.cpp I see int g_fpsLimit = 0; //0 for no fps limit (default) Use MESSAGE_SET_FPS_LIMIT to set can you give an example of how to send the message?

    Thank you very much!
    Zaxuhe//
    Game developer

  2. #2
    Administrator Seth's Avatar
    Join Date
    Jul 2002
    Location
    Japan
    Posts
    5,377

    Default

    Quote Originally Posted by Zaxuhe View Post
    Well I have 3 questions... I'm going to start

    the first one, a friend of mine have an android 2.1 device, I have send an apk to him and when he touched the screen at any time on any place (even on bare bones) it will crash, the device he is using was not designed for android 2.1 (its 1.5 but rooted), but most opengl games work even with touch, since I know its not my code, maybe you could test it? I'm also trying to fix it, but I haven't been able... or maybe I need to change something on the build target or parameters? the keyboard keys are being detected and working ok, just the touch kills the app

    second one, is there a way to get time? like SDL_getticks or something like that? I want to shoot every 100 ms or so, and well I want to know if there is already a general way to get the time, or we will have to implement it?

    if I set my game to run at 30 or 60 fps and the game runs at 15 fps, the update function will still be called 30 times? to keep the game physics and render speed fast and stable? (if the game runs at 8 fps and the update also gets down to 8 it will super slow,if the game runs at 1230812038120 fps and the update aswell it will run too fast :S) also at main.cpp I see int g_fpsLimit = 0; //0 for no fps limit (default) Use MESSAGE_SET_FPS_LIMIT to set can you give an example of how to send the message?

    Thank you very much!
    1. Hmm, I suspect it has something to do with the touch input code, it actually has two methods and it switches to the "advanced" method if OS 2.1 is detected. Because this is a rooted hack of an old phone I don't think it's going to be something that will affect many people... step one would be to look at the debug log while it's running though.
    2. Yes, use GetSystemTimeTick() to get the system timer in milliseconds. (every 1000, a second has passed)
    3. The FPS limiter limits both update and render to the desired fps. If you want anything fancy (like locked step updates) you have to implement it in the app yourself. For less fancy but framerate independent speed, you can use speed*GetApp()->GetDelta() where you would normally use just speed.


    To lock the FPS at a lower speed, you do it like this:

    GetBaseApp()->SetFPSLimit(15);

    (If you look in BaseApp.cpp, you'll see it's using MESSAGE_SET_FPS_LIMIT internally)
    Seth A. Robinson
    Robinson Technologies

  3. #3
    Squire
    Join Date
    Jun 2012
    Location
    Mexico
    Posts
    26

    Default

    Thank you very much! will try to fix on the android and if I can solve it, I will post a patch
    Zaxuhe//
    Game developer

Similar Threads

  1. Naming conventions and other stuff
    By Ian in forum Novashell Game Creation System
    Replies: 1
    Last Post: 01-03-2007, 03:46 AM
  2. fqmods.cjb.net back with some new stuff.
    By in forum Funeral Quest
    Replies: 4
    Last Post: 10-20-2004, 05:25 PM
  3. HELP!!! how can i grab stuff!!!
    By in forum Dink Smallwood HD
    Replies: 2
    Last Post: 11-24-2003, 08:50 AM
  4. Some stuff on the servers
    By in forum Funeral Quest
    Replies: 1
    Last Post: 07-18-2003, 01:10 PM
  5. New Attack Info Stuff?
    By redink1 in forum Funeral Quest
    Replies: 4
    Last Post: 01-14-2003, 12:28 AM

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •