Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
32 changes: 0 additions & 32 deletions BoostParticle.tscn

This file was deleted.

File renamed without changes.
17 changes: 17 additions & 0 deletions Docs/Magic_Number_Observations.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
Sonic collision shape (CapsuleShape2D)
radius = 10
height = 20

if (abs (avgGPoint.y-position.y) < 21): - this *appears* to be "collison shape height + 1"?

position = Vector2 (avgGPoint.x + 20 * sin (rotation), avgGPoint.y - 20 * cos (rotation)) - avgGPoint.x might be "collision shape radius * 2"?

LeftCast.get_collision_point ().x + cos (rotation) * 8, - this appears to be unconnected to the collision shape values.

Highest degree of confidence with "21", as it seems to be only y-component related.

if (RSideCast.is_colliding () and RSideCast.get_collision_point ().distance_to (position+player_velocity) < 14 and player_velocity.x > 0): and position = RSideCast.get_collision_point () - Vector2 (14, 0) - what does the 14 represent? Where does it come from? This value is used with "handle left and right sideways collision". If the distance from colliding with a wall sideways to the position plus velocity is less than 14 pixels, then position is shifted by that collision point minus 14 (opposite way for left-hand sideways). It seems to be (collision radius * 1.4)? But this would result in very large gaps if the collision radius was, say, 20 or more. So is it collision radius + 4? This does seem more likely (at least, more likely than collision radius * 1.4 does...).

Question is, then, why would it be collision radius + 4 (or even * 1.4)? The default distance from a wall for the player (say, the collison wall at the start of ChaosFestival.tscn) is 21 pixels. So where does the 14 come into it, why the 7 difference? Things seem to be dealt with in multiples of 7? Sideways collision appears to be 14 pixels. Wall collision is 21 pixels.

It feels like I'm approaching all of this from the wrong direction. We shall see.
5 changes: 5 additions & 0 deletions Docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Flow Engine

By [Coderman64](https://github.com/coderman64).

This is an engine to make mainly Sonic Rush-styled games.
46 changes: 46 additions & 0 deletions Docs/Structure.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
Use sub-dirs named by character, concept, usage etc.

<Project Name> - project root.
Builds - executable builds are created here.
Docs - design notes and the like are kept in here.
Resources - Raw resources for assets used by the project. NOT used directly by the project source.
Source - the source files for the project. The project.godot file is in here.
addons - do not use directly; used for external Godot addons that are NOT GDNative.
Assets - All physical assets - graphics, models, shaders, music etc. Store by category/usage.
Audio - All sound files.
Ambient - all looped sound effects. Filenames should include loop offset.
Jingles - non-looped music files to be used for stings and things like starting a new game, ending an act, game over etc.
Music - all looped music. Filenames should include loop offset.
Sound - all non-looped sound effects.
Common - non-audio, non-font assets used by multiple things.
Fonts - fonts used throughout the game.
Graphics - All graphical elements here, including shaders.
Other - any other resource that might not fit any of the other categories.
UI - Theme definitions for the user interface are stored here.
GDNative - do not use directly; used for external Godot addons that ARE GDNative (e.g. external libraries, bindings for other languages), in separate folders for each.
Scenes - all the "scenes" used in the game. Should mirror Scripts.
Singletons - non-game(play) related scenes. For autoload/general-purpose singletons that contain nodes/scripts for convenience use.
Scripts - all the scripts used in the game. Should mirror Scenes.
Singletons - non-game(play) related scripts. For autoload/general-purpose singletons that contain nodes/scripts for convenience use.

Audio bus structure:
Master
Jingles
Music
SFX - unlooped sound effects.
Ambient - looped sound effects.
DON'T add effects to Jingles/Music/SFX directly - create separate buses as needed for this!

Default physics/rendering layers:
2D rendering: 1 = layer_render_default
2D physics: 1 = layer_physics_default; 20 = layer_physics_disabled

For functions called by/connected to signals, use the function name styled as <nodename>_on_<signal type>, e.g. btnQuit_on_press

Autoload bus structure:
helper_functions
random_helpers
sound_player
music_player
jingle_player
config_helper
25 changes: 25 additions & 0 deletions Docs/Template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# The template structure

Most of the template is covered in [the project structure document](Structure.txt). Won't cover how they work - they're fairly sufficiently documented to hopefully make it obvious. This covers the most basic stuff already in the template and what it's for, including `Scripts\Singletons` `Scenes\Singletons`.

## random_helpers

A `Node` script allowing random numbers to be generated as if they were "rolled" by dice, and allows the total to be added to or subtracted from. May contain other random-related functions too.

## helper_functions

A `Node` script, for non-game(play) related settings (resolution, detail, volume etc). Contains convenience functions for adding, creating and switching to nodes/scenes and a function to run code only once.

## *_player (jingle/music/sound)

These are all sound players using `AudioStreamPlayer`. Jingles are non-looped (usually short) pieces of music. Music is obvious, and sounds are looped sounds (ambient) or non-looped. They're set up to use the respective audio buses. Should cover most basic use cases between them. `sound_player` should be used just for non-looped effects; looped sounds should be handled directly.

These are all non-positional; use the appropriate stream players in a scene as required.

## Assets/Fonts/OpenSans-Regular.ttf

Used as a default font for the UI theme.

## Assets/UI/Default.tres

Used as a default UI/HUD theme for the game.
40 changes: 0 additions & 40 deletions LevelItems/AirRing.tscn

This file was deleted.

101 changes: 0 additions & 101 deletions LevelItems/BounceRing.tscn

This file was deleted.

62 changes: 0 additions & 62 deletions LevelItems/EggPawn.tscn

This file was deleted.

31 changes: 0 additions & 31 deletions LevelItems/FallingParticles.tscn

This file was deleted.

16 changes: 0 additions & 16 deletions LevelItems/LayerSwitch.tscn

This file was deleted.

Loading