Merge pull request 'Nightly: Basic Movement' (#20) from dev-base into nightly

Reviewed-on: http://git.euph.dev/GameDev/2DHackAndSlay/pulls/20
This commit is contained in:
snoweuph 2023-02-01 08:57:09 +00:00
commit 5049ff6a84
39 changed files with 1380 additions and 1465 deletions

20
.gitattributes vendored Normal file
View file

@ -0,0 +1,20 @@
# Properly detect languages
*.h linguist-language=cpp
*.inc linguist-language=cpp
thirdparty/* linguist-vendored
# Normalize EOL for all files that Git considers text files
* text=auto eol=lf
# Except for bat files, which are Windows only files
*.bat eol=crlf
# And some test files where the EOL matters
*.test.txt -text
# The above only works properly for Git 2.10+, so for older versions
# we need to manually list the binary files we don't want modified.
*.icns binary
*.ico binary
*.jar binary
*.png binary
*.ttf binary
*.tza binary

15
.gitignore vendored
View file

@ -1,13 +1,2 @@
# ---> Godot # Godot 4+ specific ignores
# Godot-specific ignores .godot/**/*
.import/
export.cfg
export_presets.cfg
# Imported translations (automatically generated from CSV files)
*.translation
# Mono-specific ignores
.mono/
data_*/

1
.import/.gdignore Normal file
View file

@ -0,0 +1 @@

View file

@ -0,0 +1,3 @@
source_md5="10ed520358153267dfc60bf74dd09ce5"
dest_md5="ef87b1b2e8d74065d19c8269155ef51a"

View file

@ -0,0 +1,3 @@
source_md5="6eb78fe9767b4eba970e5e746fc22670"
dest_md5="5bd7f492aa4701dde1ee2965b1d4897c"

View file

@ -0,0 +1,3 @@
source_md5="f2378d583d8e011487f50b3f6e434c55"
dest_md5="d1875ea8b9cb6586a76da23ca3297804"

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://b30swkk8pl8r3"
path="res://.godot/imported/colony-db32.png-15441baa6f893f3d7ac9b44cad974223.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Assets/Textures/Tilesets/colony-db32.png"
dest_files=["res://.godot/imported/colony-db32.png-15441baa6f893f3d7ac9b44cad974223.ctex"]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/bptc_ldr=0
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

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://vdjct0e80o51"
path="res://.godot/imported/colony.png-7e0f1c6e1f6ff8cbe6d6c840c822d3ba.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Assets/Textures/Tilesets/colony.png"
dest_files=["res://.godot/imported/colony.png-7e0f1c6e1f6ff8cbe6d6c840c822d3ba.ctex"]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/bptc_ldr=0
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

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 195 B

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dp4tdg3fxe5bf"
path="res://.godot/imported/color_cube.png-4881adb426dcdbd1db4cca9d44eddf4a.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Assets/Textures/color_cube.png"
dest_files=["res://.godot/imported/color_cube.png-4881adb426dcdbd1db4cca9d44eddf4a.ctex"]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/bptc_ldr=0
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

1142
Assets/Tilesets/colony.tres Normal file

File diff suppressed because it is too large Load diff

View file

@ -1,2 +1,14 @@
# 2DHackAndSlay # 2DHackAndSlay
## Branches
- [stable](https://git.euph.dev/GameDev/2DHackAndSlay/src/branch/stable) - This is the Most stable branch and only will get PRs from [nightly](https://git.euph.dev/GameDev/2DHackAndSlay/src/branch/nightly)
- [nightly](https://git.euph.dev/GameDev/2DHackAndSlay/src/branch/nightly) - This Branch will only get PRs from [dev-base](https://git.euph.dev/GameDev/2DHackAndSlay/src/branch/dev-base)its meant for testing
- [dev-base](https://git.euph.dev/GameDev/2DHackAndSlay/src/branch/dev-base) - On This branch the Diffrent dev branches will be merged and code may be written to combine everything. when this branch is at a somewhat stable branch it gets a PR to [nightly](https://git.euph.dev/GameDev/2DHackAndSlay/src/branch/nightly)
- dev-* - Dev branches with their respective goal which will be merged into dev-base
## Resources used:
### Game Art
- https://opengameart.org/content/colony-sim-assets

34
Scenes/Test Scene.tscn Normal file
View file

@ -0,0 +1,34 @@
[gd_scene load_steps=5 format=3 uid="uid://0m5qkeqoo62l"]
[ext_resource type="TileSet" uid="uid://bf1eb4aogv8ru" path="res://Assets/Tilesets/colony.tres" id="2"]
[ext_resource type="Texture2D" uid="uid://dp4tdg3fxe5bf" path="res://Assets/Textures/color_cube.png" id="2_0flm2"]
[ext_resource type="Script" path="res://Scripts/Player/PlayerMovement.gd" id="2_gw00d"]
[sub_resource type="CircleShape2D" id="CircleShape2D_bcrdl"]
radius = 3.0
[node name="Test Scene" type="Node2D"]
[node name="TileMap" type="TileMap" parent="."]
position = Vector2(0, 1)
tile_set = ExtResource("2")
collision_visibility_mode = 1
format = 2
layer_0/name = "Ground"
layer_0/tile_data = PackedInt32Array(1114138, 262144, 1, 1048602, 0, 1, 983066, 0, 1, 1114137, 65536, 0, 1114136, 65536, 0, 1048603, 131072, 1, 1179675, 131072, 2, 1114139, 589824, 0, 983067, 131072, 1, 917531, 589824, 0, 1179674, 65536, 2, 917530, 262144, 0, 1179673, 65536, 2, 917529, 65536, 2, 1179672, 65536, 2, 917528, 65536, 2, 1179671, 0, 2, 1114135, 655360, 3, 1048599, 131072, 1, 983063, 131072, 1, 917527, 589824, 3, 851995, 131072, 1, 851994, 196608, 3, 851993, 65536, 1, 851992, 65536, 1, 851991, 0, 1, 917532, 327680, 2, 917533, 458752, 1, 983069, 327680, 1, 1048605, 327680, 1, 1114141, 458752, 2, 1114140, 327680, 2, 917526, 65536, 0, 917525, 0, 0, 983061, 1769472, 1, 1048597, 0, 1, 1114133, 0, 2, 1114134, 65536, 2, 786456, 65536, 1, 786457, 196608, 2, 720921, 262144, 3, 720920, 262144, 3, 720919, 0, 1, 655383, 262144, 0, 655382, 0, 2, 589848, 65536, 1, 589849, 196608, 2, 655385, 65536, 1, 655384, 262144, 3, 655386, 65536, 1, 720922, 65536, 1, 589850, 65536, 1, 524313, 65536, 1, 524312, 196608, 2, 524311, 262144, 1, 524310, 65536, 0, 589846, 262144, 0, 589847, 65536, 1, 524314, 196608, 1, 655387, 131072, 1, 589851, 131072, 1, 458776, 1638400, 1, 458777, 65536, 0, 458778, 131072, 0, 524315, 131072, 0, 458775, 0, 0, 720916, 851968, 1, 655380, 983040, 1, 589844, 917504, 1, 524308, 917504, 1, 458772, 983040, 0, 458771, 851968, 1, 524307, 1048576, 2, 589843, 851968, 1, 655379, 1048576, 3, 720915, 851968, 1, 589845, 0, 2, 524309, 0, 0, 524306, 786432, 1, 458770, 1048576, 0, 589842, 786432, 1, 655378, 1048576, 1, 655377, 851968, 0, 458769, 851968, 2, 720914, 851968, 1, 720913, 983040, 2, 655376, 851968, 0, 589839, 917504, 1, 655375, 1441792, 3, 524303, 917504, 1, 524302, 786432, 1, 589838, 786432, 1, 458768, 851968, 2, 458767, 983040, 0, 393233, 1048576, 1, 393234, 983040, 2, 393235, 851968, 1, 393236, 983040, 3, 458773, 851968, 2, 720917, 983040, 1, 655381, 917504, 0, 393237, 851968, 1, 786452, 851968, 1, 786453, 851968, 1, 720918, 917504, 0, 786454, 1703936, 1, 851990, 917504, 2, 851989, 851968, 2, 851988, 983040, 0, 851987, 983040, 2, 786451, 983040, 2, 458774, 917504, 2, 393238, 983040, 0, 393239, 851968, 2, 393240, 1638400, 0, 393241, 851968, 2, 393242, 917504, 2, 327706, 917504, 0, 327705, 851968, 0, 327704, 851968, 0, 327703, 851968, 0, 327702, 851968, 0, 327701, 851968, 0, 327700, 851968, 0, 327699, 851968, 0, 327698, 983040, 1, 786455, 1769472, 1, 786450, 851968, 1, 917522, 786432, 2, 917524, 917504, 1, 917523, 1048576, 0, 1048596, 917504, 2, 983059, 786432, 1, 1048595, 786432, 2, 851986, 1048576, 0, 851985, 786432, 2, 786449, 1048576, 0, 786448, 786432, 2, 720912, 1048576, 0, 720911, 786432, 2, 655374, 786432, 2, 458766, 786432, 1, 393231, 851968, 0, 393232, 851968, 0, 327697, 786432, 1, 327694, 917504, 1, 327693, 1310720, 0, 262157, 786432, 1, 262158, 983040, 0, 393230, 1441792, 3, 393229, 786432, 2, 262159, 851968, 2, 262160, 851968, 2, 262161, 1048576, 0, 196625, 851968, 1, 196624, 1048576, 3, 196623, 851968, 1, 196622, 1048576, 1, 262162, 917504, 1, 196626, 983040, 0, 196627, 851968, 2, 196628, 851968, 2, 196629, 917504, 2, 131093, 917504, 0, 131092, 851968, 0, 131091, 851968, 0, 131090, 851968, 0, 131089, 851968, 0, 131088, 851968, 0, 131086, 786432, 0, 131087, 851968, 0, 196621, 786432, 0, 327692, 1114112, 2, 327691, 1114112, 2, 262154, 917504, 0, 327690, 1376256, 0, 393226, 917504, 2, 262153, 851968, 0, 327689, 851968, 1, 393225, 851968, 2, 393224, 786432, 2, 327688, 786432, 1, 262152, 786432, 0, 589855, 0, 0, 655391, 0, 2, 589856, 65536, 0, 655393, 131072, 2, 589857, 131072, 0, 786464, 851968, 1, 786463, 1048576, 3, 786465, 917504, 1, 917537, 917504, 2, 852001, 917504, 1, 852000, 983040, 2, 851999, 1048576, 0, 917535, 786432, 2, 917536, 851968, 2, 720927, 851968, 0, 720929, 917504, 0, 720928, 1572864, 1, 655392, 1572864, 0, 786462, 851968, 1, 786461, 983040, 3, 786460, 1769472, 0, 720924, 786432, 0, 720925, 851968, 0, 720926, 851968, 0, 851996, 786432, 2, 851997, 851968, 2, 851998, 851968, 2, 786458, 65536, 1, 786459, 1703936, 0, 720923, 131072, 1, 983062, 65536, 1, 1048598, 65536, 1, 983060, 1703936, 1)
[node name="Player" type="CharacterBody2D" parent="."]
script = ExtResource("2_gw00d")
[node name="Sprite2D" type="Sprite2D" parent="Player"]
position = Vector2(149, 86)
texture = ExtResource("2_0flm2")
[node name="Camera2D" type="Camera2D" parent="Player"]
position = Vector2(149, 86)
current = true
zoom = Vector2(8, 8)
[node name="CollisionShape2D" type="CollisionShape2D" parent="Player"]
position = Vector2(149, 86)
shape = SubResource("CircleShape2D_bcrdl")

View file

@ -0,0 +1,18 @@
extends CharacterBody2D
@export var speed = 50
# Called when the node enters the scene tree for the first time.
func _ready():
pass # Replace with function body.
func get_input():
var input_direction = Input.get_vector("move_left", "move_right", "move_up", "move_down")
velocity = input_direction * speed
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _physics_process(delta):
get_input()
move_and_slide()

Binary file not shown.

View file

@ -1,21 +0,0 @@
MIT License
Copyright (c) 2016-2022 The Godot Engine community
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

File diff suppressed because it is too large Load diff

View file

@ -1,18 +0,0 @@
[general]
load_once=true
symbol_prefix="godot_"
reloadable=false
singleton=false
[entry]
OSX.64="res://addons/godot-git-plugin/osx/libgitapi.dylib"
Windows.64="res://addons/godot-git-plugin/win64/libgitapi.dll"
X11.64="res://addons/godot-git-plugin/linux/libgitapi.so"
[dependencies]
OSX.64=[ ]
Windows.64=[ ]
X11.64=[ ]

View file

@ -1,9 +0,0 @@
[gd_resource type="NativeScript" load_steps=2 format=2]
[ext_resource path="res://addons/godot-git-plugin/git_api.gdnlib" type="GDNativeLibrary" id=1]
[resource]
resource_name = "GitAPI"
class_name = "GitAPI"
library = ExtResource( 1 )
script_class_name = "GitAPI"

View file

@ -1,7 +0,0 @@
[plugin]
name="Godot Git Plugin"
description="This plugin lets you interact with Git without leaving the Godot editor. More information can be found at https://github.com/godotengine/godot-git-plugin/wiki"
author="ChronicallySerious"
version="v2.1.0"
script="git_api.gdns"

View file

@ -1,6 +1,6 @@
[gd_resource type="Environment" load_steps=2 format=2] [gd_resource type="Environment" load_steps=2 format=2]
[sub_resource type="ProceduralSky" id=1] [sub_resource type="Sky" id=1]
[resource] [resource]
background_mode = 2 background_mode = 2

BIN
icon.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

View file

@ -1,35 +0,0 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://icon.png"
dest_files=[ "res://.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
process/normal_map_invert_y=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

View file

@ -6,36 +6,63 @@
; [section] ; section goes between [] ; [section] ; section goes between []
; param=value ; assign values to parameters ; param=value ; assign values to parameters
config_version=4 config_version=5
_global_script_classes=[ {
"base": "EditorVCSInterface",
"class": "GitAPI",
"language": "NativeScript",
"path": "res://addons/godot-git-plugin/git_api.gdns"
} ]
_global_script_class_icons={
"GitAPI": ""
}
[application] [application]
config/name="2d Hack And Slay" config/name="2d Hack And Slay"
config/icon="res://icon.png" run/main_scene="res://Scenes/Test Scene.tscn"
config/features=PackedStringArray("4.0")
[display]
window/stretch/aspect="ignore"
[editor] [editor]
version_control_autoload_on_startup=true version_control_autoload_on_startup=true
version_control_plugin_name="GitAPI" version_control_plugin_name="GitAPI"
[editor_plugins]
enabled=PackedStringArray()
[gui] [gui]
common/drop_mouse_on_gui_input_disabled=true common/drop_mouse_on_gui_input_disabled=true
[input]
move_up={
"deadzone": 0.5,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":87,"key_label":0,"unicode":119,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194320,"key_label":0,"unicode":0,"echo":false,"script":null)
]
}
move_down={
"deadzone": 0.5,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":83,"key_label":0,"unicode":115,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194322,"key_label":0,"unicode":0,"echo":false,"script":null)
]
}
move_left={
"deadzone": 0.5,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":65,"key_label":0,"unicode":97,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194319,"key_label":0,"unicode":0,"echo":false,"script":null)
]
}
move_right={
"deadzone": 0.5,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":68,"key_label":0,"unicode":100,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194321,"key_label":0,"unicode":0,"echo":false,"script":null)
]
}
[physics] [physics]
common/enable_pause_aware_picking=true common/enable_pause_aware_picking=true
[rendering] [rendering]
textures/canvas_textures/default_texture_filter=0
environment/default_environment="res://default_env.tres" environment/default_environment="res://default_env.tres"

View file