User Tools

Site Tools


development:csdk:2.0:getting_started

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
development:csdk:2.0:getting_started [2024/11/14 18:21] – created clydedevelopment:csdk:2.0:getting_started [2024/11/14 18:23] (current) clyde
Line 38: Line 38:
   * src   * src
  
-//src// will be the home for your C code, and src/gt holds the library code provided to help with tasks like drawing images, reading controllers, or playing sounds.+''src'' will be the home for your C code, and src/gt holds the library code provided to help with tasks like drawing images, reading controllers, or playing sounds.
  
-//assets// is where you'll place files such as bitmaps and midis to be picked up by conversion scripts.+''assets'' is where you'll place files such as bitmaps and midis to be picked up by conversion scripts.
  
-//scripts// is where the conversion and build config scripts live.+''scripts'' is where the conversion and build config scripts live.
  
-//lib// contains prebuilt helper binaries and doesn't need to be interacted with that much.+''lib'' contains prebuilt helper binaries and doesn't need to be interacted with that much.
  
 You'll also find, among the files in the project root, ''project.json'' which contains project-level customization options such as the game name and enabled modules. You can leave this as-is for now. You'll also find, among the files in the project root, ''project.json'' which contains project-level customization options such as the game name and enabled modules. You can leave this as-is for now.
Line 97: Line 97:
 </code> </code>
  
-//init_graphics()// takes care of some setup used for other drawing functions, and should be called pretty early on.+''init_graphics()'' takes care of some setup used for other drawing functions, and should be called pretty early on.
  
-The GameTank has a double buffer, and typically you'll be drawing on one frame while the other is being presented to the television. //flip_buffer()// toggles both the render target and the output buffer. In the beginning it's used to clear the screen on both buffers, and then is used on every frame right after the beginning of the video sync period.+The GameTank has a double buffer, and typically you'll be drawing on one frame while the other is being presented to the television. ''flip_buffer()'' toggles both the render target and the output buffer. In the beginning it's used to clear the screen on both buffers, and then is used on every frame right after the beginning of the video sync period.
  
-A notable feature of the SDK is a queued drawing API. The GameTank's blitter gives it the ability to continue executing code while pixels are being copied into the framebuffer. Making the most of this ability requires performing as much CPU computation as we can during a blit operation instead of simply waiting for a blit to finish. Eventually though there is nothing else to do but wait, and //await_draw_queue()// allows us to wait not just for the current draw but for all drawings we've requested that are still pending.+A notable feature of the SDK is a queued drawing API. The GameTank's blitter gives it the ability to continue executing code while pixels are being copied into the framebuffer. Making the most of this ability requires performing as much CPU computation as we can during a blit operation instead of simply waiting for a blit to finish. Eventually though there is nothing else to do but wait, and ''await_draw_queue()'' allows us to wait not just for the current draw but for all drawings we've requested that are still pending.
  
-//queue_draw_box// draws a box with a solid color at a given location. queue_clear_screen and queue_clear_border are essentially shortcuts for calling queue_draw_box on the full screen or the screen edges. This is part of the queued drawing API, so if it is called multiple times consecutively the first box will begin drawing while the sucessive calls are added to a list to be automatically drawn when the previous box finishes.+''queue_draw_box'' draws a box with a solid color at a given location. ''queue_clear_screen'' and ''queue_clear_border'' are essentially shortcuts for calling ''queue_draw_box'' on the full screen or the screen edges. This is part of the queued drawing API, so if it is called multiple times consecutively the first box will begin drawing while the sucessive calls are added to a list to be automatically drawn when the previous box finishes.
  
-//await_vsync// waits for a number of Vertical Sync signals, and is used for synchronizing with the television picture. //await_vsync(1)// doesn't wait for an entire 1/60s frame, but instead waits until the beginning of the next vertical sync period. This is when the electron beam will be approaching the top-left corner of the monitor, and soon begin to emit the next full frame.+''await_vsync'' waits for a number of Vertical Sync signals, and is used for synchronizing with the television picture. ''await_vsync(1)'' doesn't wait for an entire 1/60s frame, but instead waits until the beginning of the next vertical sync period. This is when the electron beam will be approaching the top-left corner of the monitor, and soon begin to emit the next full frame.
  
 ===== Testing on hardware ===== ===== Testing on hardware =====
development/csdk/2.0/getting_started.1731608489.txt.gz · Last modified: 2024/11/14 18:21 by clyde