Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preparing Alpha Branch #4004

Merged
merged 7 commits into from
Feb 19, 2025
Merged
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[remap]

importer="texture"
type="CompressedTexture2D"
uid="uid://c0kmvkwygg0ox"
path="res://.godot/imported/playerShip3_red.png-94ca45c3e4c27e99caaf86799e6a053a.ctex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://assets/kenny/space-shooter-redux/png/playerShip3_red.png"
dest_files=["res://.godot/imported/playerShip3_red.png-94ca45c3e4c27e99caaf86799e6a053a.ctex"]

[params]

compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
12 changes: 12 additions & 0 deletions apps/gamejam/brackeys/13/project.godot
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,18 @@ config/icon="res://icon.svg"
window/stretch/mode="canvas_items"
window/per_pixel_transparency/allowed=true

[layer_names]

2d_physics/layer_1="timespace"
2d_physics/layer_2="universe"
2d_physics/layer_3="galaxy"
2d_physics/layer_4="environment"
2d_physics/layer_5="planet"
2d_physics/layer_6="spaceship"
2d_physics/layer_7="npc"
2d_physics/layer_8="entity"
2d_physics/layer_9="projectile"

[rendering]

renderer/rendering_method="gl_compatibility"
Expand Down
7 changes: 6 additions & 1 deletion apps/gamejam/brackeys/13/scenes/game.tscn
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
[gd_scene format=3 uid="uid://cbrda40vq26pj"]
[gd_scene load_steps=2 format=3 uid="uid://cbrda40vq26pj"]

[ext_resource type="PackedScene" uid="uid://1s5v0llrjq3" path="res://scenes/spaceship.tscn" id="1_rlyye"]

[node name="Game" type="Node2D"]

[node name="Spaceship" parent="." instance=ExtResource("1_rlyye")]
position = Vector2(500, 300)
19 changes: 19 additions & 0 deletions apps/gamejam/brackeys/13/scenes/spaceship.tscn
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[gd_scene load_steps=4 format=3 uid="uid://1s5v0llrjq3"]

[ext_resource type="Texture2D" uid="uid://c0kmvkwygg0ox" path="res://assets/kenny/space-shooter-redux/png/playerShip3_red.png" id="1_8hcjj"]
[ext_resource type="Script" path="res://scripts/spaceship.gd" id="1_uejed"]

[sub_resource type="CircleShape2D" id="CircleShape2D_s734v"]
radius = 40.05

[node name="Spaceship" type="CharacterBody2D"]
script = ExtResource("1_uejed")

[node name="Sprite2D" type="Sprite2D" parent="."]
position = Vector2(0, -1)
texture = ExtResource("1_8hcjj")

[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
position = Vector2(0, 4)
rotation = -0.0497135
shape = SubResource("CircleShape2D_s734v")
32 changes: 32 additions & 0 deletions apps/gamejam/brackeys/13/scripts/spaceship.gd
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
class_name Spaceship extends CharacterBody2D

## Attacks
signal gunship_fire

## Defense
signal shield_decay



const SPEED = 300.0
const JUMP_VELOCITY = -400.0


func _physics_process(delta: float) -> void:
# Add the gravity. for later on.
if not is_on_floor():
velocity += get_gravity() * delta

# Handle jump.
if Input.is_action_just_pressed("ui_accept") and is_on_floor():
velocity.y = JUMP_VELOCITY

# Get the input direction and handle the movement/deceleration.
# As good practice, you should replace UI actions with custom gameplay actions.
var direction := Input.get_axis("ui_left", "ui_right")
if direction:
velocity.x = direction * SPEED
else:
velocity.x = move_toward(velocity.x, 0, SPEED)

move_and_slide()
27 changes: 17 additions & 10 deletions apps/kbve/kbve.com/astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ import partytown from '@astrojs/partytown';
import sitemap from '@astrojs/sitemap';
import tailwind from '@astrojs/tailwind';
import mdx from '@astrojs/mdx';
import rehypeMermaid from "rehype-mermaid";
import rehypeMermaid from 'rehype-mermaid';
import starlight from '@astrojs/starlight';

import { fileURLToPath } from 'node:url';
import markdownConfig from './markdown.config';
import starlightSiteGraph from 'starlight-site-graph'
import starlightSiteGraph from 'starlight-site-graph';

import { defineConfig as defineViteConfig } from 'vite';
// import topLevelAwait from 'vite-plugin-top-level-await';
Expand Down Expand Up @@ -39,11 +39,13 @@ export default defineConfig({
// },
integrations: [
starlight({
plugins: [starlightSiteGraph({
graphConfig: {
"renderArrows": true
}
})],
plugins: [
starlightSiteGraph({
graphConfig: {
renderArrows: true,
},
}),
],
title: 'KBVE Docs',
editLink: {
baseUrl: 'https://github.com/kbve/kbve/edit/dev/apps/kbve.com',
Expand Down Expand Up @@ -240,12 +242,17 @@ export default defineConfig({
],
// markdown: markdownConfig,
markdown: {
rehypePlugins: [[rehypeMermaid, { strategy: "img-svg", dark: true }]],
},
rehypePlugins: [[rehypeMermaid, { strategy: 'img-svg', dark: true }]],
},
vite: defineViteConfig({
ssr: {
noExternal: ['path-to-regexp'],
},
},
server: {
watch: {
ignored: ['**/*'],
},
},
build: {
rollupOptions: {
// maxConcurrency: 2,
Expand Down
68 changes: 67 additions & 1 deletion apps/kbve/kbve.com/src/content/docs/project/brackeys.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,16 @@ tags:
- gaming
---


import {
Aside,
Steps,
Card,
CardGrid,
Code,
FileTree,
} from '@astrojs/starlight/components';

## Barckeys Game Jam


Expand Down Expand Up @@ -132,4 +142,60 @@ inspired by spaceteam
#### Space Shooter Redux
The spaceship asset pack that we will be using is from [Kenny Space Shooter Redux](https://kenney.nl/assets/space-shooter-redux), released as a CC0.
There are two folders, `_space-shooter-redux` and `space-shooter-redux`, all of the assets from the pack are under the `_space-shooter-redux` and objects that we will use will be copied over to `space-shooter-redux`.
Without having to dump a bunch of assets, I will try to use as many as needed and then going to delete the `_space-shooter-redux` folder.
Without having to dump a bunch of assets, I will try to use as many as needed and then going to delete the `_space-shooter-redux` folder.

### Layers

These are the layers that I am thinking we will be operating in:

```

2d_physics/layer_1="timespace"
2d_physics/layer_2="universe"
2d_physics/layer_3="galaxy"
2d_physics/layer_4="environment"
2d_physics/layer_5="planet"
2d_physics/layer_6="spaceship"
2d_physics/layer_7="npc"
2d_physics/layer_8="entity"
2d_physics/layer_9="projectile"

```

The first three layers, `timespace`, `universe` and `galaxy` will act as the background layers and the `environment` will be the first delta-time layer from the client-side point of view.
Using the layer 1 through 3, we can create a parallax style simulation of space.
The actual ship that the player controls will inherit the layer 6 aka `spaceship`.
Finally we would split the `npc` and `entity` layer because we might want the `npc` to have additional abilities, like a star path finding.


<Steps>

1. Timespace
- Tracks the time without a reference to frames.

2. Universe
- Client-side background

3. Galaxy
- Sub-background with the purpose of creating a parallax effect.

4. Environment
- Tracks the delta-time, with a reference to the client's frame.

5. Planet
- This layer will include spacestations and presents an entity that has true collision.
- Players will be to enter the planet, which can open up minigames or special UI screens.

6. Spaceship
- The actual layermask for the player.

7. NPC
- Layermask for pirates or friendly ships.

8. Entity
- Layermask for objects that can be mined, cause damage and/or hold any interaction.

9. Projectile
- Ammo shells and lasers, used to raycast hits as well.

</Steps>
25 changes: 25 additions & 0 deletions apps/kbve/kbve.com/src/content/journal/02-18.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,31 @@ imaginary world problem - Damn, these reusable workflows on the cloud vm are so
Next, the focus was getting the `utils-godot-itch-build-pipeline.yml`, which is another reusable workflow that I plan to call during this gamejam.
Eventually the goal will be to make this monorepo super modular and easy to build out even faster, there might be a point where we can go from concept to full startup in less than 48 hours.

- 11:58PM

To test the reusable workflow, we would call it under the `jobs` like this:

```yaml

jobs:
trigger-godot-build:
uses: KBVE/kbve/.github/workflows/utils-godot-itch-build-pipeline.yml@main
with:
branch: "dev"
deploy_to_itch: true
godot_version: "4.3"
export_name: "TowerDef"
project_path: "./apps/rust_godot_towerdefense/godot"
build_artifact_name: "towerdefense_web_build"
itch_username: "kbve"
itch_gameid: "tower-defense"
secrets:
butler_api: ${{ secrets.ITCH_API }}


```

However, I will do this tomorrow, after I finish up the core player script and the movement.

### B13

Expand Down