User Tools

Site Tools


Sidebar

projects

wcp1 (due 20240828)
wcp2 (due 20240904)
pct0 (bonus; due 20240905)
pct1 (bonus; due 20240905)
pct2 (due 20240905)
abc0 (due 20240906)
gtf0 (due 20240911)
pct3 (bonus; due 20240911)
wcp3 (due 20240911)
dtr0 (due 20240918)
pct4 (due 20240918)
wcp4 (due 20240918)
mmf0 (due 20240926)
pct5 (bonus; due 20240926)
wcp5 (due 20240926)
cnv0 (due 20241002)
gfo0 (due 20241002)
pct6 (due 20241002)
wcp6 (due 20241002)
fwg0 (due 20241009)
pct7 (bonus; due 20241009)
wcp7 (due 20241009)
bwp1 (bonus; due 20241016)
cnv1 (due 20241016)
pct8 (due 20241016)
wcp8 (due 20241016)
fwg1 (due 20241023)
pct9 (bonus; due 20241023)
wcp9 (due 20241023)
fwg2 (due 20241030)
gfo1 (due 20241030)
pctA (due 20241030)
wcpA (due 20241030)
fwg3 (due 20241106)
pctB (bonus; due 20241106)
wcpB (due 20241106)
oop0 (due 20241113)
pctC (due 20241113)
wcpC (due 20241113)
pctD (bonus; due 20241120)
wcpD (bonus; due 20241120)
bwp2 (bonus; due 20241204)
gfo2 (due 20241204)
pctE (bonus; due 20241204)
wcpE (bonus; due 20241204)
EoCE (due 20241216)
haas:fall2024:cprog:projects:fwg0

Corning Community College

CSCS1320 C/C++ Programming

PROJECT: Fun With Games (FWG0)

OBJECTIVE

Obtain the latest stable release of Vircon32, along with its DevTools, and modify the “hello, world!” demo to display an image, along with modified text (content, position, attributes).

As has been the case with many projects this semester, you will also be contributing to the project documentation, detailing the necessary steps to obtain, configure, build, and use the items being focused on.

With clarification gained from asking any needed questions, you will proceed to craft useful documentation with the rest of the class. The final result should allow anyone to accomplish the task.

If you struggle with how to form questions, perhaps consider utilizing the college learning commons to receive assistance with forming good questions.

NOTE: Do not add the source code to Vircon32 or DevTools to your repository! Process these outside of your repository. Once installed, your files specifically related to your modified “Hello, World!” cartridge should be added to your repository.

EDIT

You will want to go here to edit and fill in the various sections of the document:

FWG0

URLs

The main Virocon32 site is vircon32.com

The list of Releases can be found on the Vircon32 GitHub repository here: https://github.com/vircon32/ComputerSoftware/releases

  • This repository has .zip and .tar.gz files containing all necessary source code

The list of C header files for Vircon32 is here https://www.vircon32.com/api.html

  • Functions specific to Vircon32 are defined here, including video.h

Build from Source

The aforementioned archive files contain a README detailing the build process.

Cartridge build process

All of the following steps can be simplified by using the Make.sh that is already made for us. It's worth looking within the file to see how it operates. To use this file you can type

 bash Make.sh 

The .sh represents that it is a shell script file.

compile

First we need to compile the C code, which can be done with the following command from the Vircon32 developer tools:

compile CODE.c -o obj/CODE.asm || abort_build

Where CODE is the name of your file, which may be preceded with “Tutorial” if you're keeping the same name as the demo file.

assemble

Once you've compiled your code successfully, you can use the following Vircon32 tool to assemble the ASM code:

assemble obj/CODE.asm -o obj/CODE.vbin || abort_build

Where, again, CODE is whatever you decided to name this project.

image processing

To use the images we want with the Vircon32 console/emulator, we have to first use one of the development tools provided to us. This tool is called png2vircon, and if you have it in your path you should be able to use it as such:

 png2vircon IMAGE.png 

where IMAGE is the file name of your png.

packing the ROM

Using the Vircon32 API

displaying text

Text can be displayed with the set_drawing_point() and print() methods

set_drawing_point(0, 0);
print("Hello World");

The print() method draws text using the drawing point as the uppermost left part of the text

processing textures and regions

select_texture(int texture_id)

  • “Sets the selected texture to the given texture ID. All texture functions will apply to that texture from that moment”
  • Selects a .vtex texture that will be used for other functions (like select_region)

select_region(int region_id)

  • “Sets the selected texture region to the given texture ID. All region functions will apply to that region ID from the selected texture”
  • Selects/creates a region that is used by other functions (like define_region)

define_region(int min_x, int min_y, int max_x, int max_y, int hotspot_x, int hotspot_y)

  • Defines the currently selected texture region, as a rectangle within the selected texture. All arguments are given in pixel coordinates within the selected texture
  • Defines the bounds of the region, used for other function (like draw_region_at
  • Allows a specific portion of a texture to be used as a sprite
  • Allows a single texture/.png/.vtex to be used for many sprites/regions
displaying a region at location
 

SUBMISSION

To be successful in this project, the following criteria (or their equivalent) must be met:

  • Project must be submit on time, by the deadline.
    • Late submissions will lose 33% credit per day, with the submission window closing on the 3rd day following the deadline.
  • Executed programs must display in a manner similar to provided output
    • output formatted, where applicable, must match that of project requirements
  • Processing must be correct based on input given and output requested
  • Output, if applicable, must be correct based on values input
  • Code must be nicely and consistently indented
  • Code must be consistently written, to strive for readability from having a consistent style throughout
  • Code must be commented
    • Any “to be implemented” comments MUST be removed
      • these “to be implemented” comments, if still present at evaluation time, will result in points being deducted.
      • Sufficient comments explaining the point of provided logic MUST be present
  • No global variables (without instructor approval), no goto statements, no calling of main()!
  • Track/version the source code in your lab46 semester repository
  • Submit a copy of your source code to me using the submit tool by the deadline.

Submit Tool Usage

Let's say you have completed work on the project, and are ready to submit, you would do the following:

lab46:~/src/SEMESTER/DESIG/PROJECT$ submit DESIG PROJECT file1 file2 file3 ... fileN

You should get some sort of confirmation indicating successful submission if all went according to plan. If not, check for typos and or locational mismatches.

RUBRIC

I'll be evaluating the project based on the following criteria:

182:fwg0:final tally of results (182/182)
*:fwg0:submitted adequately modified demo code for project by duedate [52/52]
*:fwg0:source file, build script, and cartridge submitted [52/52]
*:fwg0:code compiles, cartridge builds with no warning or error [52/52]
*:fwg0:committed project related changes to semester repo [26/26]

Pertaining to the collaborative authoring of project documentation

  • each class member is to participate in the contribution of relevant information and formatting of the documentation
    • minimal member contributions consist of:
      • near the class average edits (a value of at least four productive edits)
      • near the average class content change average (a value of at least 1024 bytes (absolute value of data content change))
      • no zero-sum commits (adding in one commit then later removing in its entirety for the sake of satisfying edit requirements)
    • adding and formatting data in an organized fashion, aiming to create an informative and readable document that anyone in the class can reference
    • content contributions will be factored into a documentation coefficient, a value multiplied against your actual project submission to influence the end result:
      • no contributions, co-efficient is 0.50
      • less than minimum contributions is 0.75
      • met minimum contribution threshold is 1.00

Additionally

  • Solutions not abiding by spirit of project will be subject to a 50% overall deduction
  • Solutions not utilizing descriptive why and how comments will be subject to a 25% overall deduction
  • Solutions not utilizing indentation to promote scope and clarity or otherwise maintaining consistency in code style and presentation will be subject to a 25% overall deduction
  • Solutions not organized and easy to read (assume a terminal at least 90 characters wide, 40 characters tall) are subject to a 25% overall deduction
haas/fall2024/cprog/projects/fwg0.txt · Last modified: 2024/09/22 15:11 by 127.0.0.1