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

Add game features, update graphics #12

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,6 @@ mono_crash.*.json
# ignore potentially large filetypes
*.csv
*.obj
*.ogg
*.ogg
*.png
*.jpg
Comment on lines +23 to +25
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we discussed this before, but don't we want include these artifacts to ensure the reproducibility of the project?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They are not included for the same reason as the .csv, .ogg, and .obj files, which is that they can be large and take up too much space in the repo.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are they all large? I think we need to find some solution to this. Can you post some information about file sizes?

Copy link
Collaborator Author

@bquan0 bquan0 Feb 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.csv

  • points.csv is 222KB
  • tank10.csv is 223MB (large)
  • tworoom10msht.csv is 28MB

.obj

  • GeigerCounter.obj is 3MB
  • TwoRoomModel.obj is 43KB

.ogg

  • geigercounter.ogg is 6 KB

.jpg

  • In total, the textures folder is 18.5MB
  • Each .jpg ranges from 0.4MB to 2MB, and there are 4 .jpg used for each PBR texture. There are currently 5 PBR textures in game.

The fonts folder is 451KB.

Another thing to consider is that the .git folder will become very large if there are ever any changes made to these large binary files.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah... a little larger than we'd like and I don't want to get into git large file stuff...

That said, we would like to have an easy way for someone else to replicate this. We can host these files somewhere and have a step to download and unpack them into the right place.

We may also want to think about how we separate them out. For example, I could imagine building a library of textures (jpg) and sounds (ogg), but the geometry (obj) and rad data (csv) are unique to a particular case.

1 change: 1 addition & 0 deletions default_env.tres
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
[resource]
background_mode = 2
background_sky = SubResource( 1 )
ss_reflections_enabled = true
93 changes: 93 additions & 0 deletions fonts/TitilliumWeb/OFL.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
Copyright (c) 2009-2011 by Accademia di Belle Arti di Urbino and students of MA course of Visual design. Some rights reserved.

This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
http://scripts.sil.org/OFL


-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------

PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.

The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.

DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.

"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).

"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).

"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.

"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.

PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:

1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.

2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.

3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.

4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.

5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.

TERMINATION
This license becomes null and void if any of the above conditions are
not met.

DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.
Binary file added fonts/TitilliumWeb/TitilliumWeb-Bold.ttf
Binary file not shown.
Binary file added fonts/TitilliumWeb/TitilliumWeb-Regular.ttf
Binary file not shown.
21 changes: 20 additions & 1 deletion project.godot
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@ config_version=4
[application]

config/name="VoxelTest"
run/main_scene="res://scenes/Main.tscn"
run/main_scene="res://scenes/MainMenu.tscn"

[autoload]

Global="*res://scripts/Global.gd"

[gui]

Expand Down Expand Up @@ -69,6 +73,21 @@ toggle_debug={
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":86,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
]
}
sprint={
"deadzone": 0.5,
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777237,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
]
}
esc={
"deadzone": 0.5,
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777217,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
]
}
interact={
"deadzone": 0.5,
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":70,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
]
}

[physics]

Expand Down
167 changes: 101 additions & 66 deletions scenes/GeigerCounter.tscn
Original file line number Diff line number Diff line change
@@ -1,88 +1,123 @@
[gd_scene load_steps=14 format=2]
[gd_scene load_steps=26 format=2]

[ext_resource path="res://scripts/GeigerViewport.gd" type="Script" id=1]
[ext_resource path="res://fonts/Montserrat-Medium.ttf" type="DynamicFontData" id=2]
[ext_resource path="res://fonts/Cutive_Mono/CutiveMono-Regular.ttf" type="DynamicFontData" id=3]
[ext_resource path="res://geigercounter.ogg" type="AudioStream" id=4]
[ext_resource path="res://scripts/ClickSound.gd" type="Script" id=5]
[ext_resource path="res://textures/SoundButton.png" type="Texture" id=6]
[ext_resource path="res://textures/PowerButton.png" type="Texture" id=7]
[ext_resource path="res://models/GeigerCounter.obj" type="ArrayMesh" id=8]
[ext_resource path="res://textures/UnitButton.png" type="Texture" id=9]
[ext_resource path="res://textures/SoundWaves.png" type="Texture" id=10]
[ext_resource path="res://textures/SoundIcon.png" type="Texture" id=11]
[ext_resource path="res://textures/BatteryIcon.png" type="Texture" id=12]

[sub_resource type="CubeMesh" id=1]
size = Vector3( 1, 1, 1 )
[sub_resource type="SpatialMaterial" id=12]
albedo_color = Color( 0.145098, 0.145098, 0.145098, 1 )

[sub_resource type="SpatialMaterial" id=19]
flags_transparent = true
albedo_color = Color( 0.427451, 0.427451, 0.427451, 0.352941 )

[sub_resource type="SpatialMaterial" id=14]
albedo_color = Color( 0.709804, 0.0666667, 0.0666667, 1 )

[sub_resource type="SpatialMaterial" id=15]

[sub_resource type="SpatialMaterial" id=20]
albedo_color = Color( 0.364706, 0.364706, 0.364706, 1 )

[sub_resource type="SpatialMaterial" id=2]
albedo_color = Color( 0.0156863, 0.160784, 0.501961, 1 )
[sub_resource type="SpatialMaterial" id=21]
albedo_texture = ExtResource( 7 )
uv1_scale = Vector3( 1.992, -1.974, 1 )

[sub_resource type="CubeMesh" id=3]
[sub_resource type="SpatialMaterial" id=22]
albedo_texture = ExtResource( 6 )
uv1_scale = Vector3( 2, 2, 1 )

[sub_resource type="SpatialMaterial" id=23]
albedo_texture = ExtResource( 9 )
uv1_scale = Vector3( 2, -2, 1 )

[sub_resource type="SpatialMaterial" id=18]
albedo_color = Color( 0.0705882, 0.0705882, 0.0705882, 1 )

[sub_resource type="CubeMesh" id=24]
size = Vector3( 1, 1, 1 )

[sub_resource type="SpatialMaterial" id=6]
albedo_color = Color( 0, 0, 0, 1 )
[sub_resource type="SpatialMaterial" id=25]
albedo_texture = ExtResource( 12 )
uv1_scale = Vector3( 2.553, 0.69, 1 )
uv1_offset = Vector3( 0.055, 0.327, 0 )

[sub_resource type="ViewportTexture" id=8]
viewport_path = NodePath("Sprite3D/GeigerViewport")
[sub_resource type="SpatialMaterial" id=26]
albedo_texture = ExtResource( 11 )
uv1_scale = Vector3( 2.287, 1.197, 1 )
uv1_offset = Vector3( 0.131, 0.194, 0 )

[sub_resource type="DynamicFont" id=7]
size = 40
outline_size = 1
font_data = ExtResource( 2 )
[sub_resource type="SpatialMaterial" id=27]
albedo_texture = ExtResource( 10 )
uv1_scale = Vector3( 1.145, 1.366, 1 )
uv1_offset = Vector3( 0.372, 0.136, 0 )

[sub_resource type="ViewportTexture" id=11]
viewport_path = NodePath("Sprite3D2/GeigerViewport")
[sub_resource type="DynamicFont" id=28]
size = 100
outline_size = 3
font_data = ExtResource( 3 )

[sub_resource type="DynamicFont" id=10]
[sub_resource type="DynamicFont" id=29]
size = 100
outline_size = 3
font_data = ExtResource( 3 )

[node name="GeigerCounter" type="Spatial"]

[node name="MeshInstance" type="MeshInstance" parent="."]
transform = Transform( 3, 0, 0, 0, 5, 0, 0, 0, 1, 0, -1.49012e-08, 0 )
mesh = SubResource( 1 )
skeleton = NodePath("../../../..")
material/0 = SubResource( 2 )

[node name="MeshInstance2" type="MeshInstance" parent="."]
transform = Transform( 2, 0, 0, 0, 2, 0, 0, 0, 1, 0, 1, 0.1 )
mesh = SubResource( 3 )
material/0 = SubResource( 6 )

[node name="Sprite3D" type="Sprite3D" parent="."]
transform = Transform( 0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, 1.09795e-10, 1.838, 0.634 )
texture = SubResource( 8 )

[node name="GeigerViewport" type="Viewport" parent="Sprite3D"]
size = Vector2( 362, 50 )
transparent_bg = true
render_target_v_flip = true
script = ExtResource( 1 )

[node name="Label" type="Label" parent="Sprite3D/GeigerViewport"]
margin_right = 78.0
margin_bottom = 14.0
custom_fonts/font = SubResource( 7 )
text = "Current Radiation"
align = 1
valign = 1

[node name="Sprite3D2" type="Sprite3D" parent="."]
transform = Transform( 0.35, 0, 0, 0, 0.35, 0, 0, 0, 0.35, 0, 1.126, 0.64 )
texture = SubResource( 11 )

[node name="GeigerViewport" type="Viewport" parent="Sprite3D2"]
size = Vector2( 549, 111 )
transparent_bg = true
render_target_v_flip = true
script = ExtResource( 1 )

[node name="Label" type="Label" parent="Sprite3D2/GeigerViewport"]
margin_right = 40.0
margin_bottom = 14.0
custom_fonts/font = SubResource( 10 )
text = "0.0000000"
align = 1
valign = 1

[node name="ClickSound" type="AudioStreamPlayer3D" parent="."]
stream = ExtResource( 4 )
script = ExtResource( 5 )

[node name="MeshInstance" type="MeshInstance" parent="."]
transform = Transform( 1.5, 0.000250392, -0.00210797, 0.00210788, 0.000523183, 1.5, 0.000251116, -1.5, 0.000522832, -0.0278158, 0.516422, -0.0447059 )
mesh = ExtResource( 8 )
material/0 = SubResource( 12 )
material/1 = SubResource( 19 )
material/2 = SubResource( 14 )
material/3 = SubResource( 15 )
material/4 = SubResource( 20 )
material/5 = SubResource( 20 )
material/6 = SubResource( 20 )
material/7 = SubResource( 14 )
material/8 = SubResource( 21 )
material/9 = SubResource( 22 )
material/10 = SubResource( 23 )
material/11 = SubResource( 18 )
material/12 = SubResource( 18 )

[node name="Battery" type="MeshInstance" parent="."]
transform = Transform( 0.205, 0, 0, 0, 0.099, 0, 0, 0, 0.001, 0.475, 1.493, 0.512 )
mesh = SubResource( 24 )
skeleton = NodePath("")
material/0 = SubResource( 25 )

[node name="Sound" type="MeshInstance" parent="."]
transform = Transform( 0.1, 0, 0, 0, 0.1, 0, 0, 0, 0.001, 0.209346, 1.493, 0.512 )
mesh = SubResource( 24 )
skeleton = NodePath("")
material/0 = SubResource( 26 )

[node name="Waves" type="MeshInstance" parent="."]
transform = Transform( 0.05, 0, 0, 0, 0.1, 0, 0, 0, 0.001, 0.276648, 1.49226, 0.512 )
mesh = SubResource( 24 )
skeleton = NodePath("")
material/0 = SubResource( 27 )

[node name="ValueLabel" type="Label3D" parent="."]
transform = Transform( 0.2, 0, 0, 0, 0.2, 0, 0, 0, 0.2, -0.021, 1.075, 0.512 )
modulate = Color( 0, 0, 0, 1 )
text = "0.0000000"
font = SubResource( 28 )

[node name="UnitsLabel" type="Label3D" parent="."]
transform = Transform( 0.13, 0, 0, 0, 0.13, 0, 0, 0, 0.13, 0.372197, 0.935638, 0.512812 )
modulate = Color( 0, 0, 0, 1 )
text = "μSv/hr"
font = SubResource( 29 )
34 changes: 34 additions & 0 deletions scenes/Instructions1.tscn
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[gd_scene load_steps=5 format=2]

[ext_resource path="res://fonts/TitilliumWeb/TitilliumWeb-Bold.ttf" type="DynamicFontData" id=1]
[ext_resource path="res://fonts/TitilliumWeb/TitilliumWeb-Regular.ttf" type="DynamicFontData" id=2]

[sub_resource type="DynamicFont" id=1]
size = 37
font_data = ExtResource( 1 )

[sub_resource type="DynamicFont" id=2]
size = 37
font_data = ExtResource( 2 )

[node name="Instructions1" type="HBoxContainer"]
margin_right = 40.0
margin_bottom = 40.0
rect_pivot_offset = Vector2( -419, -74 )

[node name="Title" type="Label" parent="."]
margin_right = 230.0
margin_bottom = 117.0
rect_min_size = Vector2( 230, 117 )
custom_fonts/font = SubResource( 1 )
text = "Instructions:"

[node name="Description" type="Label" parent="."]
margin_left = 234.0
margin_right = 734.0
margin_bottom = 117.0
rect_min_size = Vector2( 500, 0 )
size_flags_stretch_ratio = 2.0
custom_fonts/font = SubResource( 2 )
text = "Navigate the facility and receive as little radiation as possible."
autowrap = true
Loading