Thread: SkyLock graphics demo (scrolling, etc.)

  1. #1
    Used Registerer jdinger's Avatar
    Join Date
    Feb 2002
    Posts
    1,065

    SkyLock graphics demo (scrolling, etc.)

    Here's the latest tech. demo for my current game, SkyLock. I've now implemented the tile-to-screen engine components (tile plotter, scroller, etc.).

    You'll need to download the resource files (zipped bitmaps and data files) attached to this message and the *.exe (zipped) attached to my reply below.

    Controls are straightforward. Use the mouse to scroll and use the ESC key to exit.

    The game writes a log file (SkyLock.log) which can be read with any standard text editor. If you don't mind could you post your average FPS here along with your basic system specs?

    As of right now I'm noticing some stuttering in my scrolling every so often (even with an average of 157 fps). Which leads me to believe I've got to work on my scrolling algorithms. If anybody has any experience with smooth-scrolling, I'd be happy to post the relevant code, if you wouldn't mind giving it look.

    Thanks again!

    Jason

  2. #2
    Used Registerer jdinger's Avatar
    Join Date
    Feb 2002
    Posts
    1,065
    Here's the *.zip of the executable.

    Just put it in the same directory with the unzipped files from the post above.

    ***Oh yeah*** I know the bitmaps for the top/side/menu bars are hideous (16 color). I reduced the color depth to get them small enough to fit the board's attachment limit.

  3. #3
    Rambling Man
    Join Date
    Jan 2002
    Posts
    1,050
    Um, I'm only getting about 3fps. So you can say that it's going extremely slow for me. The mouse also jumps around a lot when I move it across the screen. My specs are 500mhz, 384ram, Win2k, 4mb video card

  4. #4
    Used Registerer jdinger's Avatar
    Join Date
    Feb 2002
    Posts
    1,065
    Tech, are you getting 3 fps as an initial measurement or is that the average? I'm getting around 150 with VSYNC on and about 61 with VSYNC off, on a PIII 933, 128 MB RAM, 16 MB NVIDIA TNT2.

    Here's an updated *.zip of the executable that will let you turn VSYNC on/off (use T to turn it on, U to turn it off).

  5. #5
    The Earth is not flat. Clyde's Avatar
    Join Date
    Mar 2002
    Posts
    1,403
    p3 500, 8mb intel agp graphics card (yes it's truly lame)

    was getting about 15-18 fps.

    Looks really nice though, shadows look great, i'm about to start programming my first game (i've just finished Tricks of the Windows Game programming gurus), its gonna be a sidescrolling shooter.

  6. #6
    Rambling Man
    Join Date
    Jan 2002
    Posts
    1,050
    No, I was getting 3fps as an average; as I still am with the new zip. Here is the logfile with me trying with vsync on and off:

    15:25:45 - Initialization complete.
    15:25:46 - 4 - fps
    15:25:48 - 3 - fps
    15:25:49 - 3 - fps
    15:25:50 - 3 - fps
    15:25:52 - 3 - fps
    15:25:53 - 3 - fps
    15:25:54 - 3 - fps
    15:25:56 - 3 - fps
    15:25:57 - 3 - fps
    15:25:59 - 3 - fps
    15:26:00 - 3 - fps
    15:26:00 - VSYNC on
    15:26:01 - 3 - fps
    15:26:03 - 3 - fps
    15:26:04 - 3 - fps
    15:26:05 - 3 - fps
    15:26:07 - 3 - fps
    15:26:08 - 3 - fps
    15:26:09 - 3 - fps
    15:26:11 - 3 - fps
    15:26:12 - 3 - fps
    15:26:14 - 3 - fps
    15:26:15 - 3 - fps
    15:26:16 - 3 - fps
    15:26:18 - 3 - fps
    15:26:18 - VSYNC off
    15:26:19 - 3 - fps
    15:26:21 - 3 - fps
    15:26:22 - 3 - fps
    15:26:23 - 3 - fps
    15:26:25 - 3 - fps
    15:26:26 - 3 - fps
    15:26:27 - 3 - fps
    15:26:29 - 3 - fps
    15:26:30 - 3 - fps
    15:26:31 - 3 - fps
    15:26:34 - 3 - fps
    15:26:34 - CleanUp start point.
    15:26:34 - CleanUp complete.

  7. #7
    C++ Developer XSquared's Avatar
    Join Date
    Jun 2002
    Location
    Ontario, Canada
    Posts
    2,718
    p3 1ghz 512mb sdram, gf3 ti500 /w 64mb ddr ram,

    401 fps /w vsync
    412 w/o vsync

    i did notice that the scrolling stuttered a bit, so if you could send me the code, i will have a look @ it 4 ya

    (i'm pretty sure that i know what your problem is, but i'd have to see the code first)
    Last edited by XSquared; 06-30-2002 at 07:44 PM.

  8. #8
    . Driveway's Avatar
    Join Date
    May 2002
    Posts
    469
    SkyLock version 1.0.0
    debug log file
    06/30/02 - 21:53:00
    -----------------
    21:53:00 - Initialize Start Point
    21:53:00 - DirectInput object created OK.
    21:53:00 - diKeyboard object created/acquired OK.
    21:53:00 - Mouse device created OK.
    21:53:00 - Mouse data format set OK.
    21:53:00 - Mouse cooperative level set OK.
    21:53:00 - Mouse device acquired OK.
    21:53:00 - diMouse object created/acquired OK.
    21:53:02 - Surface loaded into VidRam OK.
    21:53:02 - Surface loaded into VidRam OK.
    21:53:02 - Surface loaded into VidRam OK.
    21:53:02 - Surface loaded into VidRam OK.
    21:53:02 - Surface loaded into VidRam OK.
    21:53:02 - Surface loaded into VidRam OK.
    21:53:02 - Surface loaded into VidRam OK.
    21:53:02 - Surface loaded into VidRam OK.
    21:53:02 - Initialization complete.
    21:53:02 - 1 - fps
    21:53:03 - 61 - fps
    21:53:04 - 61 - fps
    21:53:05 - 62 - fps
    21:53:06 - 62 - fps
    21:53:07 - 61 - fps
    21:53:08 - 62 - fps
    21:53:09 - 61 - fps
    21:53:10 - 61 - fps
    21:53:11 - 62 - fps
    21:53:12 - 62 - fps
    21:53:13 - 62 - fps
    21:53:14 - 61 - fps
    21:53:15 - 61 - fps
    21:53:16 - 62 - fps
    21:53:17 - 62 - fps
    21:53:18 - 62 - fps
    21:53:19 - 62 - fps
    21:53:20 - 62 - fps
    21:53:21 - 62 - fps
    21:53:22 - 62 - fps
    21:53:23 - 62 - fps
    21:53:24 - 62 - fps
    21:53:25 - 61 - fps
    21:53:26 - 62 - fps
    21:53:27 - 62 - fps
    21:53:28 - 30 - fps
    21:53:28 - CleanUp start point.
    21:53:28 - CleanUp complete.

    1.7 Ghz, 512 mg RAM, 32 mb TNT2
    Yes, stuutered here too

  9. #9
    Registered User red_baron's Avatar
    Join Date
    May 2002
    Posts
    274
    nice job but i recommend that when you put the mouse close to the edge it auto scrolls instead of having to scroll the mouse constantly to scroll the page (clear enough )

    22:19:14 - 37 - fps
    22:19:15 - 38 - fps
    22:19:16 - 37 - fps
    22:19:17 - 38 - fps
    22:19:18 - 37 - fps
    22:19:19 - 37 - fps
    22:19:20 - 37 - fps
    22:19:20 - VSYNC on
    22:19:21 - 38 - fps
    22:19:22 - 33 - fps
    22:19:23 - 37 - fps
    22:19:24 - 37 - fps
    22:19:25 - 38 - fps
    22:19:26 - 38 - fps
    22:19:27 - 38 - fps
    22:19:28 - 37 - fps
    22:19:29 - 37 - fps
    22:19:30 - 37 - fps
    22:19:31 - 30 - fps
    22:19:32 - 37 - fps
    22:19:33 - 29 - fps
    22:19:34 - 37 - fps
    22:19:35 - 37 - fps
    22:19:36 - 36 - fps
    22:19:37 - 37 - fps
    22:19:38 - 37 - fps
    22:19:39 - 37 - fps
    22:19:40 - 36 - fps
    22:19:41 - 36 - fps
    22:19:42 - VSYNC off
    22:19:42 - 37 - fps
    22:19:43 - 32 - fps
    22:19:44 - 37 - fps
    22:19:45 - 37 - fps
    22:19:46 - 37 - fps
    22:19:47 - 37 - fps
    22:19:48 - 35 - fps
    22:19:49 - 37 - fps
    22:19:50 - 37 - fps
    22:19:52 - 32 - fps

    333mhz, 320Mb ram, 16mb ati
    ¿Red Baron?

    "Imagination is more important than knowledge"
    -Albert Einstein (1879-1955)

    Check out my games!

    [code] /* dont forget code tags! */ [/code]

  10. #10
    Used Registerer jdinger's Avatar
    Join Date
    Feb 2002
    Posts
    1,065
    I know what the fps problem is (and I feel stupid for missing it! ). I was so happy that I got my scrolling done that I bypassed using dirty rectangles and I was blitting everything to the offscreen buffer each frame (instead of only what was covered in the current viewable area).

    As far as the stuttering scrolling, XSquared, I email you the relevant code tomorrow. Thanks for offering to look it over.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. SkyLock graphics engine demo
    By jdinger in forum Game Programming
    Replies: 18
    Last Post: 06-26-2002, 07:58 AM
  2. SkyLock graphics update...
    By jdinger in forum Game Programming
    Replies: 11
    Last Post: 05-29-2002, 03:11 PM
  3. Graphics Demo
    By ModsMan in forum A Brief History of Cprogramming.com
    Replies: 6
    Last Post: 03-29-2002, 07:08 PM
  4. scrolling of the window in c language graphics
    By denny in forum C Programming
    Replies: 7
    Last Post: 12-27-2001, 11:41 PM