Compare commits

...

3 Commits

Author SHA1 Message Date
24cc1b8f04 Add Player and BattleScene 2022-07-16 08:15:35 +01:00
e1d837a35d Add Dice Assets 2022-07-16 08:02:13 +01:00
7a010d2b53 Inital Godot Project 2022-07-15 20:20:15 +01:00
32 changed files with 351 additions and 0 deletions

BIN
Assets/Dice/Dice1.kra Normal file

Binary file not shown.

BIN
Assets/Dice/Dice1.kra~ Normal file

Binary file not shown.

BIN
Assets/Dice/Dice1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

View File

@ -0,0 +1,35 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/Dice1.png-c31ee42d20faf89dc4419ed68829ce60.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Assets/Dice/Dice1.png"
dest_files=[ "res://.import/Dice1.png-c31ee42d20faf89dc4419ed68829ce60.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

BIN
Assets/Dice/Dice1.png~ Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

BIN
Assets/Dice/Dice2.kra Normal file

Binary file not shown.

BIN
Assets/Dice/Dice2.kra~ Normal file

Binary file not shown.

BIN
Assets/Dice/Dice2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

View File

@ -0,0 +1,35 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/Dice2.png-071424701e7950d00863aca8d7bce48a.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Assets/Dice/Dice2.png"
dest_files=[ "res://.import/Dice2.png-071424701e7950d00863aca8d7bce48a.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

BIN
Assets/Dice/Dice2.png~ Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

BIN
Assets/Dice/Dice3.kra Normal file

Binary file not shown.

BIN
Assets/Dice/Dice3.kra~ Normal file

Binary file not shown.

BIN
Assets/Dice/Dice3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB

View File

@ -0,0 +1,35 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/Dice3.png-1247edbb8b811fdca6f8f31c30f98988.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Assets/Dice/Dice3.png"
dest_files=[ "res://.import/Dice3.png-1247edbb8b811fdca6f8f31c30f98988.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

BIN
Assets/Dice/Dice3.png~ Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 65 KiB

BIN
Assets/Dice/Dice4.kra Normal file

Binary file not shown.

BIN
Assets/Dice/Dice4.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

View File

@ -0,0 +1,35 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/Dice4.png-907fc471552aba76e9f05721a54bf30e.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Assets/Dice/Dice4.png"
dest_files=[ "res://.import/Dice4.png-907fc471552aba76e9f05721a54bf30e.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

BIN
Assets/Dice/Dice5.kra Normal file

Binary file not shown.

BIN
Assets/Dice/Dice5.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

View File

@ -0,0 +1,35 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/Dice5.png-733d23747b8b3fddf4ab02cc8fea8d30.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Assets/Dice/Dice5.png"
dest_files=[ "res://.import/Dice5.png-733d23747b8b3fddf4ab02cc8fea8d30.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

BIN
Assets/Dice/Dice6.kra Normal file

Binary file not shown.

BIN
Assets/Dice/Dice6.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

View File

@ -0,0 +1,35 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/Dice6.png-2d93387d45159a25196d35634d9d79e6.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Assets/Dice/Dice6.png"
dest_files=[ "res://.import/Dice6.png-2d93387d45159a25196d35634d9d79e6.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

3
Characters/Player.gd Normal file
View File

@ -0,0 +1,3 @@
extends Node2D
export var starting_pos : Vector2 = Vector2.ZERO

10
Characters/Player.tscn Normal file
View File

@ -0,0 +1,10 @@
[gd_scene load_steps=3 format=2]
[ext_resource path="res://icon.png" type="Texture" id=1]
[ext_resource path="res://Characters/Player.gd" type="Script" id=2]
[node name="Player" type="Node2D"]
script = ExtResource( 2 )
[node name="Sprite" type="Sprite" parent="."]
texture = ExtResource( 1 )

29
Scenes/BattleScene.gd Normal file
View File

@ -0,0 +1,29 @@
extends Node2D
var movement_queue = []
func _physics_process(delta):
if Input.is_action_just_pressed("ui_up"):
movement_queue.append(Vector2.UP)
if Input.is_action_just_pressed("ui_down"):
movement_queue.append(Vector2.DOWN)
if Input.is_action_just_pressed("ui_left"):
movement_queue.append(Vector2.LEFT)
if Input.is_action_just_pressed("ui_right"):
movement_queue.append(Vector2.RIGHT)
#remove uneeded inputs from the queue
for i in len(movement_queue) - 1:
#remove if adjacent values are opposites
if (movement_queue[i].x * movement_queue[i+1].x == -1 or
movement_queue[i].y * movement_queue[i+1].y == -1):
movement_queue[i] = Vector2.ZERO
movement_queue[i+1] = Vector2.ZERO
#remove null values
for i in len(movement_queue):
if movement_queue.find(Vector2.ZERO) != -1:
movement_queue.remove(movement_queue.find(Vector2.ZERO))

35
Scenes/BattleScene.tscn Normal file
View File

@ -0,0 +1,35 @@
[gd_scene load_steps=5 format=2]
[ext_resource path="res://icon.png" type="Texture" id=1]
[ext_resource path="res://Characters/Player.tscn" type="PackedScene" id=2]
[ext_resource path="res://Scenes/BattleScene.gd" type="Script" id=3]
[sub_resource type="TileSet" id=1]
0/name = "icon.png 0"
0/texture = ExtResource( 1 )
0/tex_offset = Vector2( 0, 0 )
0/modulate = Color( 1, 1, 1, 1 )
0/region = Rect2( 8, 4, 51, 19 )
0/tile_mode = 0
0/occluder_offset = Vector2( 0, 0 )
0/navigation_offset = Vector2( 0, 0 )
0/shape_offset = Vector2( 0, 0 )
0/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
0/shape_one_way = false
0/shape_one_way_margin = 0.0
0/shapes = [ ]
0/z_index = 0
[node name="BattleScene" type="Node2D"]
script = ExtResource( 3 )
[node name="TileMap" type="TileMap" parent="."]
mode = 2
tile_set = SubResource( 1 )
cell_size = Vector2( 128, 64 )
cell_custom_transform = Transform2D( 128, 0, 32, 64, 0, 0 )
centered_textures = true
format = 1
tile_data = PoolIntArray( 65540, 0, 0, 131074, 0, 0, 131075, 0, 0, 131076, 0, 0, 131077, 0, 0, 131078, 0, 0, 196610, 0, 0, 196611, 0, 0, 196612, 0, 0, 196613, 0, 0, 196614, 0, 0, 262144, 0, 0, 262145, 0, 0, 262146, 0, 0, 262147, 0, 0, 262148, 0, 0, 262149, 0, 0, 262150, 0, 0, 327681, 0, 0, 327682, 0, 0, 327683, 0, 0, 327684, 0, 0, 327685, 0, 0, 327686, 0, 0, 393217, 0, 0, 393218, 0, 0, 393219, 0, 0, 393220, 0, 0, 393221, 0, 0, 393222, 0, 0, 458754, 0, 0, 458755, 0, 0, 458756, 0, 0, 458757, 0, 0, 524291, 0, 0, 524292, 0, 0 )
[node name="Player" parent="." instance=ExtResource( 2 )]

7
default_env.tres Normal file
View File

@ -0,0 +1,7 @@
[gd_resource type="Environment" load_steps=2 format=2]
[sub_resource type="ProceduralSky" id=1]
[resource]
background_mode = 2
background_sky = SubResource( 1 )

BIN
icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

35
icon.png.import Normal file
View File

@ -0,0 +1,35 @@
[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

22
project.godot Normal file
View File

@ -0,0 +1,22 @@
; Engine configuration file.
; It's best edited using the editor UI and not directly,
; since the parameters that go here are not all obvious.
;
; Format:
; [section] ; section goes between []
; param=value ; assign values to parameters
config_version=4
[application]
config/name="Quit Rolling Around"
config/icon="res://icon.png"
[physics]
common/enable_pause_aware_picking=true
[rendering]
environment/default_environment="res://default_env.tres"