Small improvements

This commit is contained in:
Ribbon 2024-08-15 20:17:07 -03:00
parent 336b2f24f7
commit 1d27c09514
11 changed files with 33 additions and 52 deletions

View file

@ -1,6 +1,10 @@
# GTA 3 in Godot # GTA 3 in Godot
![Full Map](screenshots/image1.png) ![Screenshots](screenshots/image1.png)
![Screenshots](screenshots/image2.png)
![Screenshots](screenshots/image3.png)
![Screenshots](screenshots/image4.png)
![Screenshots](screenshots/image5.png)
This project aims to reimplement the Grand Theft Auto 3 on the Godot Engine. This project aims to reimplement the Grand Theft Auto 3 on the Godot Engine.
@ -28,6 +32,13 @@ The story mode is also very complex and time consuming to implement.
- Export the executable - Export the executable
- Paste the GTA3 files on the same folder of the executable - Paste the GTA3 files on the same folder of the executable
## Controls
- Arrow Keys/WASD - Move the player
- Z - Control the external car lights
- X - Control the internal car lights
- Space - Play/Pause music
## TODOs ## TODOs
- [ ] Properly verify if the GTA3 files are present before execution - [ ] Properly verify if the GTA3 files are present before execution

View file

@ -1,17 +1,17 @@
[gd_scene load_steps=4 format=3 uid="uid://ifh0620nha84"] [gd_scene load_steps=4 format=3 uid="uid://ifh0620nha84"]
[ext_resource type="Script" path="res://scripts/multiplayer.gd" id="1_i6dgd"] [ext_resource type="Script" path="res://scripts/multiplayer.gd" id="1_i6dgd"]
[ext_resource type="PackedScene" uid="uid://bhnf2ypniaum0" path="res://scenes/car.tscn" id="2_ruqwx"] [ext_resource type="PackedScene" uid="uid://ci2k4eganebbs" path="res://scenes/player.tscn" id="2_8rxc6"]
[ext_resource type="PackedScene" uid="uid://1d8h7r1pvaps" path="res://scenes/world.tscn" id="3_gow6c"] [ext_resource type="PackedScene" uid="uid://1d8h7r1pvaps" path="res://scenes/world.tscn" id="3_gow6c"]
[node name="multiplayer" type="Node3D"] [node name="multiplayer" type="Node3D"]
script = ExtResource("1_i6dgd") script = ExtResource("1_i6dgd")
player_scene = ExtResource("2_ruqwx") player_scene = ExtResource("2_8rxc6")
[node name="world" parent="." instance=ExtResource("3_gow6c")] [node name="world" parent="." instance=ExtResource("3_gow6c")]
[node name="MultiplayerSpawner" type="MultiplayerSpawner" parent="."] [node name="MultiplayerSpawner" type="MultiplayerSpawner" parent="."]
_spawnable_scenes = PackedStringArray("res://scenes/car.tscn") _spawnable_scenes = PackedStringArray("res://scenes/player.tscn")
spawn_path = NodePath("..") spawn_path = NodePath("..")
[node name="host" type="Button" parent="."] [node name="host" type="Button" parent="."]

View file

@ -1,5 +1,6 @@
[gd_scene load_steps=4 format=3 uid="uid://ci2k4eganebbs"] [gd_scene load_steps=5 format=3 uid="uid://ci2k4eganebbs"]
[ext_resource type="PackedScene" uid="uid://bhnf2ypniaum0" path="res://scenes/car.tscn" id="1_0aqsi"]
[ext_resource type="Script" path="res://scripts/player/player.gd" id="1_pc2or"] [ext_resource type="Script" path="res://scripts/player/player.gd" id="1_pc2or"]
[ext_resource type="Script" path="res://scripts/car/microphone.gd" id="2_b6cpr"] [ext_resource type="Script" path="res://scripts/car/microphone.gd" id="2_b6cpr"]
@ -8,22 +9,24 @@
[node name="player" type="Node3D"] [node name="player" type="Node3D"]
transform = Transform3D(-1, 0, 8.74228e-08, 0, 1, 0, -8.74228e-08, 0, -1, 0, 0, 0) transform = Transform3D(-1, 0, 8.74228e-08, 0, 1, 0, -8.74228e-08, 0, -1, 0, 0, 0)
[node name="CharacterBody3D" type="CharacterBody3D" parent="."] [node name="car" parent="." instance=ExtResource("1_0aqsi")]
[node name="CharacterBody3D" type="CharacterBody3D" parent="car"]
transform = Transform3D(-1, 0, 8.74228e-08, 0, 1, 0, -8.74228e-08, 0, -1, 0, 0.862511, 0) transform = Transform3D(-1, 0, 8.74228e-08, 0, 1, 0, -8.74228e-08, 0, -1, 0, 0.862511, 0)
script = ExtResource("1_pc2or") script = ExtResource("1_pc2or")
[node name="microphone" type="AudioStreamPlayer3D" parent="CharacterBody3D"] [node name="microphone" type="AudioStreamPlayer3D" parent="car/CharacterBody3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.0516357, 0.237411, -0.0943298) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.0516357, 0.237411, -0.0943298)
stream = SubResource("AudioStreamMicrophone_jxime") stream = SubResource("AudioStreamMicrophone_jxime")
unit_size = 0.3 unit_size = 0.3
script = ExtResource("2_b6cpr") script = ExtResource("2_b6cpr")
[node name="cam_origin" type="Node3D" parent="CharacterBody3D"] [node name="cam_origin" type="Node3D" parent="car/CharacterBody3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.155749, 0) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.155749, 0)
[node name="SpringArm3D" type="SpringArm3D" parent="CharacterBody3D/cam_origin"] [node name="SpringArm3D" type="SpringArm3D" parent="car/CharacterBody3D/cam_origin"]
spring_length = 6.0 spring_length = 6.0
margin = 0.5 margin = 0.5
[node name="camera" type="Camera3D" parent="CharacterBody3D/cam_origin/SpringArm3D"] [node name="camera" type="Camera3D" parent="car/CharacterBody3D/cam_origin/SpringArm3D"]
current = true current = true

View file

@ -1,6 +1,5 @@
[gd_scene load_steps=4 format=3 uid="uid://7kpoyini1lat"] [gd_scene load_steps=3 format=3 uid="uid://7kpoyini1lat"]
[ext_resource type="PackedScene" uid="uid://bhnf2ypniaum0" path="res://scenes/car.tscn" id="1_4u8v6"]
[ext_resource type="PackedScene" uid="uid://1d8h7r1pvaps" path="res://scenes/world.tscn" id="2_c7g1y"] [ext_resource type="PackedScene" uid="uid://1d8h7r1pvaps" path="res://scenes/world.tscn" id="2_c7g1y"]
[ext_resource type="PackedScene" uid="uid://ci2k4eganebbs" path="res://scenes/player.tscn" id="3_rn43x"] [ext_resource type="PackedScene" uid="uid://ci2k4eganebbs" path="res://scenes/player.tscn" id="3_rn43x"]
@ -8,8 +7,5 @@
[node name="world" parent="." instance=ExtResource("2_c7g1y")] [node name="world" parent="." instance=ExtResource("2_c7g1y")]
[node name="car" parent="." instance=ExtResource("1_4u8v6")] [node name="player" parent="." instance=ExtResource("3_rn43x")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1226, 84, -405) transform = Transform3D(-1, 0, 8.74228e-08, 0, 1, 0, -8.74228e-08, 0, -1, -1226, 73, -405)
[node name="player" parent="car" instance=ExtResource("3_rn43x")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.823357, 0.121796)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 MiB

After

Width:  |  Height:  |  Size: 2.3 MiB

Before After
Before After

View file

@ -1,34 +0,0 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://d2shdsd4377lq"
path="res://.godot/imported/image1.png-74d784a9909f532d3ed3cfc6c53c8d5b.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://screenshots/image1.png"
dest_files=["res://.godot/imported/image1.png-74d784a9909f532d3ed3cfc6c53c8d5b.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

BIN
screenshots/image2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

BIN
screenshots/image3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

BIN
screenshots/image4.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 MiB

BIN
screenshots/image5.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 MiB

View file

@ -3,10 +3,15 @@ extends Node3D
@onready var external_lights = [ $left_light, $right_light ] @onready var external_lights = [ $left_light, $right_light ]
@onready var internal_light = $internal_light @onready var internal_light = $internal_light
func _physics_process(_delta): func _process(bool):
if Input.is_action_just_pressed("internal_light"): if Input.is_action_just_pressed("internal_light"):
internal_light.visible = not internal_light.visible internal_light.visible = not internal_light.visible
if Input.is_action_just_pressed("external_lights"): if Input.is_action_just_pressed("external_lights"):
for light in external_lights: for light in external_lights:
light.visible = not light.visible light.visible = not light.visible
func _ready():
internal_light.visible = false
for light in external_lights:
light.visible = false