HCGE General Game Template
This is a very basic template, intended for use as a basis from which to build games, or to get better
acquainted with HCGE's various editing and script features; there is no actual gameplay here, and what is
shown is, by far, not representative of the extent of an HCGE game's potential. The following
text will go over a few details regarding this template in specific, and will include a few reference links
to the primary HCGE documentation (assuming that a copy exists in a "Docs" subfolder under the HCGE program folder).
Template File Structure:
- /alias - This is where any custom Alias Files should be stored
- /art - This is where most global sprite art is usually stored. This is also where HCGE expects to find a global sprite palette image
- globpal.tga - This is the file where HCGE expects to find the global sprite palette colors. Some global sprite art can also be stored in and retrieved from this file if desired, which is the case in this template. The one Game-Global Object Sprite (the diamond) is stored here
- /chars - This is where Player Character data is usually stored. This folder and these files may have any name, but the names must match the references used in other scripts. These files are only examples, and any particular game will have more files with more complex content and different names as may be appropriate
- /dump - This is where HCGE will store any "dump" output files when they are requested from within any of its editors
- (there is nothing here by default)
- /font - This is where custom game-global fonts are usually stored. At minimum, every game requires three fonts to be loaded as game-global, which are used by the editors and main menu. These are: Font 0- 8x8 Unhighlighted alphanumeric+symbols, Font 1- 8x8 Highlighted alphanumeric+symbols, and Font 2- 4x6 "hex". This folder and these files may have any name, but the names must match the references used in other scripts. These files are only examples; any particular game may use different font graphics, and may have more font files as may be appropriate
- default.fnt - In this template, this is the font setup script for the default 8x8 white font (editors, main menus), loaded by fonts.def as Font 0
- dfont.tga - In this template, this is an art file where the graphics for the default 8x8 white font are stored, and is loaded by default.fnt
- fonts.def - This is an example global fonts listing file, which loads all of the fonts stored in this folder. In this template, it is loaded by game.def
- sfont.tga - In this template, this is an art file where the graphics for the default 4x6 tiny font are stored, and is loaded by tiny.fnt
- tiny.fnt - In this template, this is the font setup script for the default 4x6 tiny font (editors, main menus), loaded by fonts.def as Font 2
- yellow.fnt - In this template, this is the font setup script for the default 8x8 highlight (yellow) font (editors, main menus), loaded by fonts.def as Font 1
- yfont.tga - In this template, this is an art file where the graphics for the default 8x8 highlight (yellow) font are stored, and is loaded by yellow.fnt
- /funcs - This is where most global level event/sentry functions are usually stored. This folder and these files may have any name, but the names must match the references used in other scripts. These files are only examples, and any particular game will have more files with more complex content and different names as may be appropriate
- mainfunc.def - This is an example global level event/sentry function file. These are the functions that can be used to initialize the level, perform actions when a boundary event occurs, or can be called by the level init or boundary event functions to run "in the background" for controlling persistent level events, general timers, etc. These functions may also be referenced by any part of the game by explicitly using a Func_Call/Run/Stop_Game_Function Script Command. This file is loaded by game.def
- /music - This is where most global music is usually stored. This folder and these files may have any name, but the names must match the references used in other scripts. Any particular game will have more music files as may be appropriate
- (there is nothing here in this template)
- /objects - This is where most global game object script function files are usually stored. This folder and these files may have any name, but the names must match the references used in other scripts. These files are only examples, and any particular game will have more files with more complex content and different names as may be appropriate
- /sfx - This is where most global sound effects are usually stored. At minimum, every game requires one sound effect to be loaded as game-global; the very first global sound effect loaded by the game must be a silent waveform. This folder and these files may have any name, but the names must match the references used in other scripts. Any particular game will have more sound effect files as may be appropriate
- sfx000.wav - This is a silent waveform suitable for loading as game-global sound effect 0. This file is loaded by sfx.def
- /stats - This is where most global "Status Objects" are usually stored. This folder and these files may have any name, but the names must match the references used in other scripts. These files are only examples, and any particular game will have more files with more complex content and different names as may be appropriate
- stat.def - This is an example global Status Script. This example script displays some player and viewport values at the top of the screen during gameplay. This file is loaded by game.def
- stat.tga - This is an example Status Script art file. Nothing is currently in here. This file is loaded by stat.def
- /tables - This is where most global table files are usually stored. This folder and these files may have any name, but the names must match the references used in other scripts. These files are only examples, and any particular game will have more files with more complex content and different names as may be appropriate
- template.def - This is an example Table File. It's really not used for anything in this template, and is only here for reference. This file is loaded by tables.def
- /zone00 - This is where HCGE expects to find the zone.def file that loads the data for for Zone 0, and generally contains all of that data as well. Any of the files other than zone.def may have any name, but the names must match the references used in other scripts. These files are only examples, and any particular game will have more files with more complex content and different names as may be appropriate
- 1.itm - This is an example Object Layout File. These files are created by HCGE when Objects are saved using the Func_Save_Objects script command, usually in conjunction with Debug Mode, or from within the Object Editor. In this template, this is what spawns the diamond and circle objects that appear on the trees in the included level. This file is loaded by the Func_Load_Objects Script Command in this level's init function
- 1.lev - This is an example Level Layout File. These files are created by HCGE when level layouts are saved from within the Level Editor, or when the Level Ripper is used to convert PCX or TGA image data into HCGE level and tile data. This is the file that contains the data for using the tiles to build all portions of the level displayed in this template. This file is loaded by the Func_Load_Level Script Command in this level's init function
- 1.til - This is an example Tile File. These files are created by HCGE when tile graphic and property data are saved from within the Tile Editor, or when the Level Ripper is used to convert PCX or TGA image data into HCGE level and tile data. This is the file that contains the graphic tiles that are used to build all portions of the level displayed in this template. This file is loaded by the Func_Load_Tiles Script Command in this level's init function
- 1.wav - This is an example of a music file used as level music. In this template, this file contains a silent waveform, but may be replaced to actually insert music into the level. This file is loaded by zone00/music.def
- music.def - This is an example zone Music Def file. This file is loaded by zone00/zone.def
- objani.def - This is an example zone Scripted Object Animation Function File. These are the functions that may be assigned to an object type to run as Animations and are primarily for setting the object's display frame(s), but may be made to perform other actions at the same time. This file is loaded by zone00/objects.def
- objcol.def - This is an example zone Scripted Object Collision Function File. These are the functions that may be assigned to an object type to run during the Collision Phase, and are used to test for and respond to collisions against players. This file is loaded by zone00/objects.def
- objdbp.def - This is an example zone Scripted Object Debug Placement Function File. These are the functions that may be assigned to an object type to run immediately after an object of that type has been placed using Debug Mode, and are generally used to control modifiable settings on the newly-spawned object under varying circumstances, but may be used to modify other gameplay elements as well. This file is loaded by zone00/objects.def
- objects.def - This is an example zone Object Def file. This file is loaded by zone00/zone.def
- objects.tga - This is an example art file containing the raw object graphics that have been stored into "sprites.spr"
- objmv.def - This is an example zone Scripted Object Movement Function File. These are the functions that may be assigned to an object type to run during the Movement Phase, and are generally used to control the object's movement and other states throughout its existence during gameplay, but may be made to perform other actions at the same time. This file is loaded by zone00/objects.def
- objpcol.def - This is an example zone Scripted Object Projectile Collision Function File. These are the functions that may be assigned to an object type to run during the Collision Phase, and are used to test for and respond to collisions against other objects. This file is loaded by zone00/objects.def
- sprites.spr - This is an HCGE "sprite file" containing all Zone Object graphics for zone00 in a format usable by HCGE's Sprite Editor, and which is loaded by "zone00/objects.def"
- zone.def - This is the Zone Def file that HCGE expects to find in the zone's folder, which loads all zone-specific data
- zonefunc.def - This is an example zone level event/sentry function file. These are the functions that can be used to initialize the level, perform actions when a boundary event occurs, or can be called by the level init or boundary event functions to run "in the background" for controlling persistent level events, general timers, etc. These functions may also be referenced by any part of the game by explicitly using a Func_Call/Run/Stop_Game_Function Script Command. This file is loaded by zone00/zone.def
- alias.def - This is the Alias Def that HCGE expects to find in the game folder if any Aliases are to be loaded
- game.def - This is the Game Def File that HCGE expects to find in the game folder, which loads most game-global data
- Info.txt - This is the "Info" file for this game. It is displayed in the in-program interface when "Info" is selected while highlighting the selection for this game. It may contain any textual information, but each line must be no longer than 38 characters. Note the capital "I"
- key3ds.def - This is the Key Map File that HCGE expects to find in the game folder, which defines this game's key mappings for 3DS
- keygcw.def - This is the Key Map File that HCGE expects to find in the game folder, which defines this game's key mappings for GCW-Zero
- keymap.def - This is the Key Map File that HCGE expects to find in the game folder, which defines this game's key mappings for PC and Mac platforms
- keypsp.def - This is the Key Map File that HCGE expects to find in the game folder, which defines this game's key mappings for PSP
- keywii.def - This is the Key Map File that HCGE expects to find in the game folder, which defines this game's key mappings for Wii
- keywiz.def - This is the Key Map File that HCGE expects to find in the game folder, which defines this game's key mappings for GP2X Wiz
- music.def - This is an example global Music Def File. This file is loaded by game.def
- objects.def - This is an example global Object Def File. This file is loaded by game.def
- sfx.def - This is an example global Sound Effect Def File. This file is loaded by game.def
- tables.def - This is the Table Def File that HCGE expects to find if any game-global Table Files are to be loaded. This file may be omitted if no tables are needed