Skip to content

Commit e53706d

Browse files
committed
initial commit
0 parents  commit e53706d

825 files changed

Lines changed: 116682 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
node_modules
2+
fontemon_blender_addon.zip
3+
gameToFont/output/*
4+
gameToFont/intermediate/*
5+
imageToCharStringConverter/cli/js/*
6+
textPreviewTool/js/*
7+
imageToCharStringConverter/gui/js*
8+
imageToCharStringConverter/gui/dev/js*
9+
imageToCharStringConverter/gui/api/js*
10+
gameToFont/js
11+
util/blackjack/js/*
12+
util/blackjack/out/*
13+
util/ora-to-png/js/*
14+
.vscode
15+
from .vscode
16+
__pycache__
17+
blender/saveFiles/*
18+
*.tsbuildinfo

LICENSE

Lines changed: 700 additions & 0 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
Project structure. Included is a suite of tools to create font games.
2+
3+
# Tutorial:
4+
5+
For a quick tutorial about how to make your own game go here: TODO
6+
7+
# For developers:
8+
9+
The project is structured around a blender addon called `fontemon-blender-addon`. The addon also s
10+
11+
- blender: Fontemon uses [blender](https://www.blender.org/) for level creation
12+
and game layout using a custom addon called fontemon-blender-addon.
13+
14+
Along with 3 other tools for development:
15+
16+
- imageToCharStringConverter: Convert an image to a charstring (a vector graphics format needed by the font.)
17+
- textPreviewTool: A tool for writing text boxes with instant feedback.
18+
- testFontInBrowser: A GUI for testing the font in the browser
19+
20+
These other tools are served by a simple HTTP server run by the blender addon
21+
22+
Each tool has it's own README.md in it's root directory.
23+
# Getting started
24+
25+
Start with the README.md in the ./blender/README.md
26+

blender/README.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# Fontemon game engine in blender!
2+
3+
Fontemon uses [blender](https://www.blender.org/) for level creation and game layout.
4+
5+
## Installation
6+
7+
I used blender 2.92.0. I cannot guarantee that the tools will work with any other version.
8+
9+
1. Install [blender 2.92](https://www.blender.org/download/releases/2-92/)
10+
2. Install the fontemon_blender_addon (instructions below)
11+
3. Open one of the blender files in ${projectRoot}/blender/blenderFiles/\*
12+
13+
All blender files included here need the fontemon_blender_addon
14+
First you need to zip the source files into a .zip file
15+
16+
1. zip fontemon_blender_addon
17+
2. Open blender
18+
3. Open the Preferences Window: Edit > Preferences
19+
4. On the left hand side click the Add-ons menu button: Add-ons
20+
5. Near the top of the window, click the Install button: Install
21+
6. Navigate to this directory and click on "fontemon_blender_addon.zip"
22+
7. Near the bottom of the window, click the Install Add-on button
23+
8. Wait
24+
9. Once the fontemon addon appears, click the empty checkbox on the left hand side. Once you see a check in the checkbox, the add-on is installed and enabled!
25+
26+
- Guaranteed to work with blender 2.92. If you are having trouble, try using blender 2.92
27+
28+
## The anatomy of a font game.
29+
30+
### Definitions
31+
32+
A font game is divided into a network or "tree" of "scenes".
33+
Each scene is a uninterrupted sequence of "frames".
34+
Each scene will transition to the next scene based on "conditions".
35+
36+
Example:
37+
38+
- The font game starts.
39+
- The player presses any key and the title appears. This is the first "frame" of the first "scene"
40+
- The player presses any key and the title shifts to the right a bit. This is the second "frame" of the first "scene"
41+
- If they player presses the "a" key we will show the picture of the sun, otherwise will will show a picture of the moon.
42+
Here we have two "conditions" each leading to two different "scenes".
43+
- The first condition is "a" key leading to first frame of the sun "scene"
44+
- The second condition is called the "default" condition, this is the condition we go to when no other conditions are met. This condition leads to the first frame of the moon "scene".
45+
46+
47+
48+
- Use Show in Orthographic to show/hide frames
49+
- Only one asset can be used in frame at a time.
50+
- Save all charstrings in ${projectRootDir}/images/charStrings
51+
52+
# FontTools
53+
54+
Included is a custom fork of fontTools modified for speed. On my machine, it is about 30-50x faster than normal font tools which means I can compile font games
55+
in seconds rather than minutes.
56+
## Note to future self
57+
Look for changes by searching for the string "LFDS"
58+
(without quotes)
59+
578 KB
Binary file not shown.
578 KB
Binary file not shown.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
class FontPanel:
2+
bl_space_type = "VIEW_3D"
3+
bl_region_type = "UI"
4+
bl_context = "objectmode"
5+
bl_category = 'Font'
6+
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
class ItemsPanel:
2+
bl_space_type = "VIEW_3D"
3+
bl_region_type = "UI"
4+
bl_context = "objectmode"
5+
bl_category = 'Item'
6+
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
class ObjectDataPanel:
2+
bl_space_type = "PROPERTIES"
3+
bl_region_type = "WINDOW"
4+
bl_context = "data"
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
class ObjectWindowPanel:
2+
bl_space_type = "PROPERTIES"
3+
bl_region_type = "WINDOW"
4+
bl_context = "object"

0 commit comments

Comments
 (0)