diff --git a/content/boards/index.md b/content/boards/index.md index f1df3e7..2dfefc8 100644 --- a/content/boards/index.md +++ b/content/boards/index.md @@ -33,7 +33,7 @@ type: page {{< boards-section "collect-coin" "Collect The Coin" "/games/collect-the-coin" "" "Written in Python. (Runs anywhere Python can, Windows, Linux, and macOS, except for web browsers due to performance issues)" >}} -{{< boards-section "long-ninja" "Long Titled Ninja Game" "https://longestboi.itch.io/long-title-ninja" "./lone-ninja.webp" "A top-down 3d shooter in Unity. (Runs on Windows, and Linux. Could run on macOS, but no builds)" >}} +{{< boards-section "long-ninja" "Long Titled Ninja Game" "/games/lone-ninja" "./lone-ninja.webp" "A top-down 3d shooter in Unity. (Runs on Windows, and Linux. Could run on macOS, but no builds)" >}} {{< dots >}} @@ -67,7 +67,7 @@ type: page {{< boards-section "tfttar" "Tales From Teren: The Approaching Rot" "/games/tfttar" "./TFTTAR.webp" "TFTTAR is a web-based visual novel that needs to run on desktop and mobile browsers and uses the ChoiceScript framework. ChoiceScript uses its own interpreted language that is very restrictive because non-programmers are the intended target. Due to these restrictions, I had to use JavaScript to implement some features the designers required; this included making custom BBCode tags and hacking the framework to allow for a button that takes you to a codex at any point in the game." >}} -{{< boards-section "pytris" "Pytris" "/games/pytris" "./Pytris.webp" "Pytris contains one of the more complex engines I’ve written in Python. It has Godot-like signals, GUI objects, global data, and high framerates for an interpreted language." >}} +{{< boards-section "pytris" "Pytris" "/games/pytris" "./Pytris.webp" "Pytris contains one of the more complex engines I’ve written in Python. It has Godot-like signals, immediate mode GUI objects, global data, and high framerates for an interpreted language." >}} {{< boards-section "peggle" "Peggle Clone" "/games/peggle-clone" "./Peggle.webp" "I've built my Peggle clone project in Godot 4.2, which is slowly gaining more support in the games industry. The game uses Godot's features like groups, signals, Autoloads, etc, to make every scene portable. Godot allows you to use multiple languages, but for simplicity, I used GDscript, an interpreted language endemic to Godot. Wherever possible, I've specified the type of any variable; this allows the game to run slightly faster, as Godot doesn't have to interpret what the type may be." >}} @@ -77,5 +77,6 @@ type: page {{< boards-section "tfttar" "Tales From Teren: The Approaching Rot" "/games/tfttar" "./TFTTAR.webp" "I was the main developer for _Tales From Teren_ for its first semester and implemented many features that the designers, writers, and artists needed, some of which never made it into the project." >}} -{{< boards-section "biomines" "Biomines" "https://alemeji1gamedev.itch.io/biomines-demo-milestone-1" "./biomines.webp" "I worked as a programming advisor for the first semester of the project. I advised how the repos should be set up, including file structure, how the project settings should be, and more." >}} +{{< boards-section "biomines" "Biomines" "https://github.com/Biomines-Prod-Studio/Biomines/commits/develop/?author=Longestboi" "./biomines.webp" "I worked as a programming advisor for the first semester of [Biomines](https://alemeji1gamedev.itch.io/biomines-demo-milestone-1). I advised how the repos should be set up, including file structure, how the project settings should be, and more." >}} + diff --git a/content/games/collect-the-coin/index.md b/content/games/collect-the-coin/index.md index 6c2eab6..c2e818f 100644 --- a/content/games/collect-the-coin/index.md +++ b/content/games/collect-the-coin/index.md @@ -17,7 +17,11 @@ _Collect The Coin_ is a side-scroller where you **Collect a Coin**. _Collect The {{< dots >}} # Video Demo -{{< rawhtml >}}
{{< youtube WLLQswQx6ss >}}
{{< /rawhtml >}} +{{< rawhtml >}}
{{< youtube WLLQswQx6ss >}}
{{< /rawhtml >}} +{{< dots >}} + +# Code Walk + Demo +{{< rawhtml >}}
{{< youtube Uj-Q4aqEaak >}}
{{< /rawhtml >}} {{< dots >}} # Download diff --git a/content/games/lone-ninja/game-name.webp b/content/games/lone-ninja/game-name.webp new file mode 100644 index 0000000..67806e2 Binary files /dev/null and b/content/games/lone-ninja/game-name.webp differ diff --git a/content/games/lone-ninja/index.md b/content/games/lone-ninja/index.md new file mode 100644 index 0000000..d154200 --- /dev/null +++ b/content/games/lone-ninja/index.md @@ -0,0 +1,40 @@ +--- +title: "Long Titled Ninja Game" +date: 2023-12-17 +type: page +titleImageOverride: "game-name.webp" +titleImageStyle: "width: 30%; height: auto; margin: auto; image-rendering: crisp-edges;" +summary: "A defected ninja defends himself from his former clanmates." +roles: ["Creator", "Programmer"] +genre: "Top-down Shooter" +bannerImage: "lone-ninja.webp" +pannelImage: "panel-image.webp" +--- + +# Top-down Shooter +In this game, you play as a ninja forced to defect because he was assigned to assassinate a close friend. When you refuse to assassinate this friend, your clanmates, not knowing that your target is a friend, force you out of the clan and start to hunt you down. If they had known the target was close to you, they likely would have reassigned the assassination to someone else. + +Also, ninjas have guns, for some reason. +{{< dots >}} + +# Video Demo +{{< rawhtml >}}
{{< youtube J9MZjKa0yho >}}
{{< /rawhtml >}} +{{< dots >}} + +# Milestones & Progress + +## Milestone 1 +{{< rawhtml >}}
{{< youtube -VVDnwgLnfA >}}
{{< /rawhtml >}} + +## Milestone 2 +{{< rawhtml >}}
{{< youtube DbL0FebMGCQ >}}
{{< /rawhtml >}} + +## Milestone 3 +{{< rawhtml >}}
{{< youtube UW861vPU2mg >}}
{{< /rawhtml >}} + +## Milestone 4 +{{< rawhtml >}}
{{< youtube 8O1nCIY_AOY >}}
{{< /rawhtml >}} +{{< dots >}} + +# Download +{{< itch userName="longestboi" gameTitle="long-title-ninja" >}} diff --git a/content/games/lone-ninja/lone-ninja.webp b/content/games/lone-ninja/lone-ninja.webp new file mode 100644 index 0000000..0d6c76a Binary files /dev/null and b/content/games/lone-ninja/lone-ninja.webp differ diff --git a/content/games/lone-ninja/panel-image.webp b/content/games/lone-ninja/panel-image.webp new file mode 100644 index 0000000..1583ebc Binary files /dev/null and b/content/games/lone-ninja/panel-image.webp differ diff --git a/content/games/peggle-clone/Peggle-banner.webp b/content/games/peggle-clone/Peggle-banner.webp new file mode 100644 index 0000000..fc0b818 Binary files /dev/null and b/content/games/peggle-clone/Peggle-banner.webp differ diff --git a/content/games/peggle-clone/index.md b/content/games/peggle-clone/index.md index 0b7a374..ae5d25f 100644 --- a/content/games/peggle-clone/index.md +++ b/content/games/peggle-clone/index.md @@ -1,25 +1,25 @@ --- title: "Peggle Clone" date: 2024-07-22 -#titleImageOverride: "Collect-The-Coin.webp" -#titleImageStyle: "width: 30%; height: auto; margin: auto; image-rendering: crisp-edges;" type: page -summary: "A recreation of of the classic pachinko game Peggle in the Godot game engine" +summary: "A recreation of of the classic pachinko-puzzle game Peggle in the Godot game engine" roles: ["Creator", "Programmer"] genre: "Puzzle" -bannerImage: "" -pannelImage: "" +bannerImage: "Peggle-banner.webp" +pannelImage: "Peggle-banner.webp" --- # A Peggle clone -_\*TODO\*_ +My clone of Peggle is written in the Godot game engine, and utilizes many of Godot's features, like type hints, which speeds up GDScript as it doesn't need to find a given type, signals, an implementation of the _[observer pattern](https://en.wikipedia.org/wiki/Observer_pattern)_, and more. + +This clone was made during the downtime of a game programming internship, as the client was unable to complete the GDD during the internship period. {{< dots >}} # Video Demo -_\*TODO\*_ +{{< rawhtml >}}
{{< youtube 3KPSR-Rbs9I >}}
{{< /rawhtml >}} {{< dots >}} -# Download -_\*TODO\*_ +# Structure +This prototype project is structured in a way to make diff --git a/content/games/pytris/index.md b/content/games/pytris/index.md index 164dcd1..db2a295 100644 --- a/content/games/pytris/index.md +++ b/content/games/pytris/index.md @@ -16,8 +16,58 @@ _Pytris_ is a clone of the classic tetromino puzzle game Tetris. I built this ga I've achieved this by utilizing Pygame's built-in sprite type, `DirtySprite`, and the `LayeredDirty` sprite group. The "Dirty" part of these types denotes when or if the sprite should get redrawn, stopping the renderer from wasting time constantly redrawing some sprites, like backgrounds and other static objects. -# Video (?) -*Video of it here???* +# Code Showcase -# Game -*Link or embedded game here...* +## Signal.py (Obeserver Pattern Object) +```python +from typing import Callable +import inspect + +class Signal(): + def __init__(self, function_definition: Callable): + self.function_definition = function_definition + self.funcs = [] + + def emit(self, *args): + for func in self.funcs: + func(*args) + + def connect(self, func: Callable): + self.funcs.append(func) +``` + +## Typical Pytris Object Init Function +The typical pytris object initialization function looks rather +```python +def __init__(self, **kwargs): + GameObject.__init__(self, **kwargs) + + self.bkg = GameObject( + name="TetrominoBox Background", + layer=game_globals.Layer.Middle, + parent=self, + image=pygame.image.load("assets/Box_test.png"), + ) + + self.sup_bkg = GameObject( + name="Tetrominobox SuperBackground", + layer=game_globals.Layer.Middle, + parent=self.bkg, + image=pygame.image.load("assets/Box_test_super.png") + ) + + self.sup_bkg.set_position(( + self.bkg.rect.centerx - (self.sup_bkg.rect.width / 2), + 0 + )) + + self.tetromino = GameObject( + name="TetrominoBox Tetromino", + layer=game_globals.Layer.Foreground, + image=pygame.Surface((0, 0)), + parent=self + ) +``` + +# Status +Currently the game is not available as I haven't had time to finish it. I'll update this page when I do. diff --git a/static/js/refractor/lang/gdscript.js b/static/js/refractor/lang/gdscript.js new file mode 100644 index 0000000..55b8988 --- /dev/null +++ b/static/js/refractor/lang/gdscript.js @@ -0,0 +1,42 @@ +// @ts-nocheck +gdscript.displayName = 'gdscript' +gdscript.aliases = [] + +/** @type {import('../core.js').Syntax} */ +export default function gdscript(Prism) { + Prism.languages.gdscript = { + comment: /#.*/, + string: { + pattern: + /@?(?:("|')(?:(?!\1)[^\n\\]|\\[\s\S])*\1(?!"|')|"""(?:[^\\]|\\[\s\S])*?""")/, + greedy: true + }, + 'class-name': { + // class_name Foo, extends Bar, class InnerClass + // export(int) var baz, export(int, 0) var i + // as Node + // const FOO: int = 9, var bar: bool = true + // func add(reference: Item, amount: int) -> Item: + pattern: + /(^(?:class|class_name|extends)[ \t]+|^export\([ \t]*|\bas[ \t]+|(?:\b(?:const|var)[ \t]|[,(])[ \t]*\w+[ \t]*:[ \t]*|->[ \t]*)[a-zA-Z_]\w*/m, + lookbehind: true + }, + nodepath: /\$\w+/, + annotation: + /(?:@tool|@icon|@static_unload|@onready|@export|@export_enum|@export_file|@export_dir|@export_global_file|@export_global_dir|@export_multiline|@export_placeholder|@export_range|@export_exp_easing|@export_color_no_alpha|@export_node_path|@export_flags|@export_flags_2d_render|@export_flags_2d_physics|@export_flags_2d_navigation|@export_flags_3d_render|@export_flags_3d_physics|@export_flags_3d_navigation|@export_flags_avoidance|@export_storage|@export_custom|@export_category|@export_group|@export_subgroup|@warning_ignore|@rpc)\b/, + controlflow: + /\b(?:continue|elif|else|for|if|match|return|while)\b/, + keyword: + /\b(?:and|as|assert|break|breakpoint|class|class_name|const|enum|extends|func|in|is|master|mastersync|not|null|or|pass|preload|puppet|puppetsync|remote|remotesync|self|setget|signal|static|super|tool|var|while|yield)\b/, + function: /\b[a-z_]\w*(?=[ \t]*\()/i, + // variable: /\$\w+/, + number: [ + /\b0b[01_]+\b|\b0x[\da-fA-F_]+\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.[\d_]+)(?:e[+-]?[\d_]+)?\b/, + /\b(?:INF|NAN|PI|TAU)\b/ + ], + constant: /\b[A-Z][A-Z_\d]*\b/, + boolean: /\b(?:false|true)\b/, + operator: /->|:=|&&|\|\||<<|>>|[-+*/%&|!<>=]=?|[~^]/, + punctuation: /[.:,;()[\]{}]/ + } +} diff --git a/themes/customTheme/layouts/_default/_markup/render-codeblock.html b/themes/customTheme/layouts/_default/_markup/render-codeblock.html index c5534a6..2ee31a0 100644 --- a/themes/customTheme/layouts/_default/_markup/render-codeblock.html +++ b/themes/customTheme/layouts/_default/_markup/render-codeblock.html @@ -4,18 +4,23 @@ import {refractor as refractor} from 'https://esm.sh/refractor@4?bundle' import renpy from '/js/refractor/lang/renpy.js' import hlsl from '/js/refractor/lang/hlsl.js' + import gdscript from '/js/refractor/lang/gdscript.js' window.toHtml = toHtml; window.refractor = refractor; + refractor.register(gdscript) refractor.register(renpy) refractor.register(hlsl) + + console.log(refractor) + export { toHtml, refractor } {{ end }} diff --git a/themes/customTheme/layouts/partials/text-heading.html b/themes/customTheme/layouts/partials/text-heading.html index f80c60f..63e83d0 100644 --- a/themes/customTheme/layouts/partials/text-heading.html +++ b/themes/customTheme/layouts/partials/text-heading.html @@ -1,6 +1,6 @@ {{ if eq .Level 1}}
- {{ .Text }} + {{ htmlUnescape .Text }}
{{ else if eq .Level 2}} @@ -15,6 +15,6 @@
{{ else }} -{{ .Text }} +{{ htmlUnescape .Text }} {{ end }} diff --git a/themes/customTheme/static/css/codeblock.css b/themes/customTheme/static/css/codeblock.css index 1e4db55..913a444 100644 --- a/themes/customTheme/static/css/codeblock.css +++ b/themes/customTheme/static/css/codeblock.css @@ -17,7 +17,7 @@ pre.code-block > * > * { font-size: .92em; font-family: Iosevka Web,Consolas,Courier,monospace; font-weight: 500; - color: #eae1af; + color: #eae1afx; } pre.code-block > span { @@ -26,11 +26,70 @@ pre.code-block > span { --cyan: #8ec07c; --green: #b8bb26; --yellow: #fabd2f; + --orange: #fe8019; --red: #fb4934; --purple: #d3869b; --grey: #7c6f64; } +pre.code-block:has(.gdscript-code-block) { + background: #202531; +} + +pre.code-block > .gdscript-code-block { + --blue: #66e5ff; + --cyan: #8effda; + --yellow: #ffeca1; + --red: #ff7085; + --orange: #ffb373; + --green: #63c259; + --light-blue: #abc9ff; + --magenta: #ff8ccc; +} + +span.gdscript-code-block > span.token.controlflow { + color: var(--magenta); +} + +span.gdscript-code-block > span.token.nodepath { + color: var(--green); +} + +span.gdscript-code-block > span.token.operator { + color: var(--light-blue); +} + +span.gdscript-code-block > span.token.keyword, +span.gdscript-code-block > span.token.boolean { + color: var(--red); +} + +span.gdscript-code-block > span.token.string { + color: var(--yellow); +} + +span.gdscript-code-block > span.token.function { + color: var(--blue); +} + +span.gdscript-code-block > span.token.class-name { + color: var(--cyan); +} + +span.gdscript-code-block > span.token.annotation { + color: var(--orange); +} + +span.gdscript-code-block > span.token.comment { + font-style: italic; + color: rgba(204, 206, 211, 0.5); +} + + +span.python-code-block > span.token.class-name { + color: var(--orange); +} + span.renpy-code-block > span.token.comment, span.rpy-code-block > span.token.comment, span.python-code-block > span.token.comment, @@ -49,6 +108,7 @@ span.c-code-block > span.token.keyword { span.renpy-code-block > span.token.tag, span.rpy-code-block > span.token.tag, +span.python-code-block > span.token.keyword, span.javascript-code-block > span.token.tag, span.javascript-code-block > span.token.keyword, span.hlsl-code-block > span.token.keyword { diff --git a/themes/customTheme/static/css/shortcodes.css b/themes/customTheme/static/css/shortcodes.css index a6c29c9..59395f0 100644 --- a/themes/customTheme/static/css/shortcodes.css +++ b/themes/customTheme/static/css/shortcodes.css @@ -97,7 +97,7 @@ word-break: break-word; } -.board-section > .text > .subsection > .description{ +.board-section > .text > .subsection > .description { color: var(--text-color-90); font-size: .9em; font-weight: lighter; @@ -105,6 +105,12 @@ padding-right: .5em; } +/*.board-section > .text > .subsection > .description > * { + color: var(--text-color-90); + font-size: .9em; + font-weight: lighter; +}*/ + .board-section > .text > .subsection > .buttons { align-self: end; } diff --git a/themes/customTheme/static/css/site.css b/themes/customTheme/static/css/site.css index 76ba101..af77ff2 100644 --- a/themes/customTheme/static/css/site.css +++ b/themes/customTheme/static/css/site.css @@ -136,6 +136,16 @@ a { text-decoration: var(--link-color) underline 0.1336em; } +em, strong, a { + font-size: inherit; + color: inherit; + font-weight: inherit; +} + +strong { + font-weight: bold; +} + /* I have no idea what this code is for */ /*ul, dd { padding-left: 1em;