Class selection improvement (part 1)

This commit is contained in:
Zergling_man 2025-08-04 17:40:40 +10:00
parent 27c877d586
commit ec813331f9
29 changed files with 381 additions and 114 deletions

32
chara_select.gd Executable file
View File

@ -0,0 +1,32 @@
extends Control
var children={}
func _ready():
for child in get_children(true): children[child]={'hover':false,'active':false}
for child in children.keys():
child.pressed.connect(focused.bind(child))
child.mouse_entered.connect(hover.bind(child,true))
child.mouse_exited.connect(hover.bind(child,false))
func _draw():
var colour=''
var childs=children.keys()
for i in range(len(children)):
for j in range(i,len(children)):
if darken([i,j],childs): colour='#444444'
else: colour='#aaaaaa'
draw_line(childs[i].position+(childs[i].size/2),childs[j].position+(childs[i].size/2),colour)
func focused(this):
children[this]['active']=!children[this]['active']
queue_redraw()
func hover(this,now):
children[this]['hover']=now
queue_redraw()
func darken(nums,keys):
for num in nums:
if children[keys[num]]['active'] or children[keys[num]]['hover']: return true
return false

1
chara_select.gd.uid Executable file
View File

@ -0,0 +1 @@
uid://eq3s4dof0p87

69
chara_select.tscn Executable file
View File

@ -0,0 +1,69 @@
[gd_scene load_steps=10 format=3 uid="uid://dhc4noca3k127"]
[ext_resource type="Texture2D" uid="uid://cudn5uokwl2jg" path="res://design/combat.png" id="1_6pjo3"]
[ext_resource type="Script" uid="uid://eq3s4dof0p87" path="res://chara_select.gd" id="1_c1i8x"]
[ext_resource type="Texture2D" uid="uid://3iafuab3ke05" path="res://design/movement.png" id="2_c1i8x"]
[ext_resource type="Texture2D" uid="uid://d0xunbur8ms2m" path="res://design/combat_black.png" id="3_4fssb"]
[ext_resource type="Texture2D" uid="uid://dp1ovkq0nkf4u" path="res://design/light.png" id="3_tl244"]
[ext_resource type="Texture2D" uid="uid://na231etds2kt" path="res://design/health.png" id="4_meqh1"]
[ext_resource type="Texture2D" uid="uid://x0671ly8wp4y" path="res://design/movement_black.png" id="5_iowvs"]
[ext_resource type="Texture2D" uid="uid://r1llnaacjefg" path="res://design/light_black.png" id="7_uddub"]
[ext_resource type="Texture2D" uid="uid://cxtp5qwd4wxiv" path="res://design/health_black.png" id="9_0km68"]
[node name="chara_select" type="Control"]
layout_mode = 3
anchors_preset = 0
offset_right = 576.0
offset_bottom = 648.0
script = ExtResource("1_c1i8x")
[node name="combat" type="TextureButton" parent="."]
layout_mode = 1
offset_right = 120.0
offset_bottom = 120.0
texture_normal = ExtResource("1_6pjo3")
texture_hover = ExtResource("3_4fssb")
ignore_texture_size = true
stretch_mode = 0
[node name="movement" type="TextureButton" parent="."]
layout_mode = 1
anchors_preset = 2
anchor_top = 1.0
anchor_bottom = 1.0
offset_top = -120.0
offset_right = 120.0
grow_vertical = 0
texture_normal = ExtResource("2_c1i8x")
texture_hover = ExtResource("5_iowvs")
ignore_texture_size = true
stretch_mode = 0
[node name="light" type="TextureButton" parent="."]
layout_mode = 1
anchors_preset = 1
anchor_left = 1.0
anchor_right = 1.0
offset_left = -120.0
offset_bottom = 120.0
grow_horizontal = 0
texture_normal = ExtResource("3_tl244")
texture_hover = ExtResource("7_uddub")
ignore_texture_size = true
stretch_mode = 0
[node name="health" type="TextureButton" parent="."]
layout_mode = 1
anchors_preset = 3
anchor_left = 1.0
anchor_top = 1.0
anchor_right = 1.0
anchor_bottom = 1.0
offset_left = -120.0
offset_top = -120.0
grow_horizontal = 0
grow_vertical = 0
texture_normal = ExtResource("4_meqh1")
texture_hover = ExtResource("9_0km68")
ignore_texture_size = true
stretch_mode = 0

12
class_table Executable file
View File

@ -0,0 +1,12 @@
combat,health,paladin
combat,health,warrior
combat,light,engineer
combat,light,pyromancer
combat,movement,hunter
combat,movement,rogue
health,light,healer
health,light,packrat
health,movement,maid/butler
health,movement,botanist
light,movement,explorer
light,movement,spelunker

BIN
design/chara_select.xcf Executable file

Binary file not shown.

View File

@ -13,13 +13,13 @@
xmlns:svg="http://www.w3.org/2000/svg"> xmlns:svg="http://www.w3.org/2000/svg">
<text <text
xml:space="preserve" xml:space="preserve"
style="font-size:25px;fill:#aaaaaa" style="font-size:25px;fill:#444444"
x="12.5" x="12.5"
y="21" y="21"
text-anchor="middle">🗡</text> text-anchor="middle">🗡</text>
<text <text
xml:space="preserve" xml:space="preserve"
style="font-size:25px;fill:#aaaaaa" style="font-size:25px;fill:#444444"
x="12.5" x="12.5"
y="21" y="21"
text-anchor="middle">🛡</text> text-anchor="middle">🛡</text>

Before

Width:  |  Height:  |  Size: 652 B

After

Width:  |  Height:  |  Size: 652 B

BIN
design/combat_black.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

34
design/combat_black.png.import Executable file
View File

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

View File

@ -2,26 +2,28 @@ Combat/health: Warrior
Melee: Fists Melee: Fists
Melee weapons: Axe, sword, spear Melee weapons: Axe, sword, spear
Spear has large reach Spear has large reach
Sword can stab (ignore block) Sword can stab (ignore block, bad vs dodge (undead))
Axe hits harder Axe hits harder
Roughly require the same mats
Armour Armour
Head, torso, legs, arms Head, torso, legs, arms
Torso gives general protection Torso gives general protection (damage reduction)
Head prevents concussion Head prevents concussion
Arms and legs prevent broken limbs Arms and legs prevent broken limbs
Can wear strong (metal) armour but non-combat allies can only wear weak (leather) armour
Carries pills that buff health temporarily Carries pills that buff health temporarily
Also negates half the effects of broken limbs/concussions Also negates half the effects of broken limbs/concussions
Losing buff cannot kill a player Buff increases max and current health, but only decreases max health when it expires (serves as slow healing)
Weapons and armour have durability and must be remade every so often. Weapons and armour have durability and must be remade every so often
Combat/health: Paladin Combat/health: Paladin
Melee: Hammer Melee: Hammer (can't lose it, main weapon)
Mending magic Mending magic
Healing magic is less powerful than most Healing magic is less powerful than most
Smite magic, anti-undead Smite magic, anti-undead
Also a big sword, generates a lot of aggro Also a big sword, generates a lot of aggro
Also a shield Also a shield
Has to worry about mana, more of a tank-style; recharges slowly but he can cast a lot in a burst Has to worry about mana, more of a tank-style; recharges slowly but can cast a lot in a burst
Reliant on mana potions Reliant on mana potions
Weapons and armour have durability and must be remade every so often. Weapons and armour have durability and must be remade every so often

View File

@ -1,15 +1,17 @@
Combat/light: Engineer Combat/light: Engineer
Melee: Spanner Melee: Spanner
Crafts items Makes traps/bombs for dealing with mobs
Disarms traps Bombs very effective vs undead
Operates mechanics Makes wards, also provide small light radius
Can make and use guns (very limited) Wards reveal many hidden things
Uses a lot of materials (metals, oil, water, wood)
Can collect some materials from disarming traps (own or others')
REMAKE ABOVE
Combat/light: Pyromancer Combat/light: Pyromancer
Melee: Blast glove Melee: Blast glove
Can light flame on his head, small light radius Can light flame on own head, small light radius, large warding radius
Can shoot fireballs, small physical damage, small light radius while travelling, ignites targets Can shoot fireballs, small physical damage, small light radius while travelling, ignites targets
Can shoot flamethrower, short-range, high fire damage, basically melts all organic units Can shoot flamethrower, short-range, high fire damage, basically melts all organic units
Pretty much useless vs undead (still better than a non-combat ofc)
Has to worry about mana but it recharges reasonably fast while resting Has to worry about mana but it recharges reasonably fast while resting

View File

@ -1,15 +1,19 @@
Combat/movement: Hunter Combat/movement: Hunter
Melee: Knife Melee: Knife
Knife for cutting up dead things
Bow & arrows Bow & arrows
Arrows are limited Arrows are limited
Arrows can have rope or oil Arrows can have rope or oil
Applied on shot and requires appropriate material Applied on shot and requires appropriate material
Both can be lit on fire Both can be lit on fire
Better at fighting organic than undead
But fire-rope arrows can handle them
Very good climber, trained in the Amazon jungle
MERGE BELOW INTO ABOVE
Combat/movement: Rogue Combat/movement: Rogue
Melee: Dagger Melee: Dagger
Can climb along small ledges and ropes, etc.; large balance radius Large balance radius, good for ledging and such
Good at sneaking around and killing enemies; silent takedowns don't generate aggro from other enemies Can squeeze through any gap
Afraid of heights (has climbing skill but hard to use)
Good at sneaking around and killing enemies; silent takedowns don't generate aggro from other enemies
Sneaking very effective vs. undead

View File

@ -6,34 +6,34 @@ Combat
DPSing <-> CCing DPSing <-> CCing
Health (aka recovery) Health (aka recovery)
Healing Healing <-> Curing (injuries)
Curing (injuries) Cooking <-> Gathering/Carving
Cooking
Gathering
Carving
Light Light
Lighting Lighting <-> Searching
Searching Warding <-> Disarming
Warding
Movement Movement
Balancing Balancing <-> Grappling
Grappling Squeezing <-> Climbing
Squeezing
Climbing Each character crafts their own shit
Stuff about injuries: Stuff about injuries:
Unable to use a broken arm (both broken = no fighting), slows many activities down, and outright prevents some. Both broken prevents a lot of things. Unable to use a broken arm (both broken = no fighting), slows many activities down, and outright prevents some. Both broken prevents a lot of things.
Unable to walk on a broken leg (one broken = 50% move speed) Unable to walk on a broken leg (one broken = 50% move speed)
Concussions can knock you right out, if dealt with a heavy blow. If not, then it dazes you, and you stumble around a bit for a few seconds. Then it gets a lot better, but you still risk stuff by being concussed. Concussions can knock you right out, if dealt with a heavy blow. If not, then it dazes you, and you stumble around a bit for a few seconds. Then it gets a lot better, but you still risk stuff by being concussed.
Dungeons should be randomly generated. Each room should have several ways of getting through it, but some should be easier than others (figuring out which generally requires strong lighting to observe the whole room). Dungeons should be randomly generated. Each room should have several ways of getting through it, but some should be easier than others (figuring out which generally requires strong lighting to observe the whole room).
Most rooms have a treasure chest. Getting it is significantly harder than bypassing it, but it yields very good rewards (it should be enough to outright replace a role, if you collect every chest) Most rooms have a treasure chest. Getting it is significantly harder than bypassing it, but it yields very good rewards (it should be enough to outright replace a role, if you collect every chest)
Other things you can collect: Other things you can collect:
Metal (various) Metal (various)
Oil Oil
Water (restores mana) Water (restores mana)
Berries/mushrooms Berries/mushrooms (being full heals you, being hungry hurts you)
Ropes Ropes
Cloth (for bandages)
Leather (from organic mobs, carving)
Meat (^)
Wood

View File

@ -13,7 +13,7 @@
xmlns:svg="http://www.w3.org/2000/svg"> xmlns:svg="http://www.w3.org/2000/svg">
<text <text
xml:space="preserve" xml:space="preserve"
style="font-size:25px;fill:#aaaaaa" style="font-size:25px;fill:#444444"
x="12.5" x="12.5"
y="21" y="21"
text-anchor="middle">❤</text> text-anchor="middle">❤</text>

Before

Width:  |  Height:  |  Size: 528 B

After

Width:  |  Height:  |  Size: 528 B

BIN
design/health_black.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

34
design/health_black.png.import Executable file
View File

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

View File

@ -1,23 +1,23 @@
Light/health: Healer Light/health: Healer
Melee: Backpack Melee: Crutch
Bandages, general curing Bandages, general curing
Cures injuries Cures injuries
Can cure himself of: Needs help from others to cure own broken arm or concussion
General damage Wards, also reveal invis in small radius
Broken leg
Others can cure him of:
Broken arm
Anyone can cure a concussion, but Healer does it faster
Can make campfires Can make campfires
Lights a reasonable distance Large light radius
Can cook meat and bake bread on it Can cook meat and meals on it
Can break it up into short-lived torches (small light radius)
MERGE ABOVE INTO BELOW
Light/health: Medic Light/health: Packrat
Melee: Backpack Melee: Backpack
Carries rations for passive healing Carries rations for passive healing
Carries medkit for splinting Carries medkit for splinting
Carries torches, can place them on anchor points (even if they're used by grappling hook) Carries eternal torches (small light radius)
Can place them on anchor points
Carries mana potions Carries mana potions
Resupplies very slowly over time Resupplies very slowly over time
Can still craft as well
Can steal some simple traps
Passively detects invis in medium radius (gotta steal everything afterall)

View File

@ -1,21 +1,20 @@
Health/movement: Servant Health/movement: Maid/Butler
Melee: Kick Melee: Kick
Large balance radius
Can climb and squeeze pretty well
Can splint people at anchor points, fixing fractures
Can steal food from dead organic enemies
Can prepare cool beverages out of almost anything Can prepare cool beverages out of almost anything
Needs water, which he can collect from streams Needs water, which he can collect from streams
Combined with berries and herbs, also serves as food Combined with berries and herbs, also serves as food
Can climb, slide, balance (himself and items) Not a great gatherer
MERGE ABOVE INTO BELOW
Health/movement: Acrobat
Melee: Kick
Large balance radius
Can splint people at anchor points, fixing fractures
Can steal food from dead organic enemies
Health/movement: Botanist Health/movement: Botanist
Melee: Whip Melee: Vine
PLANTS Passively produces berries (randomly)
FLOWERS Also herbs which slowly deal with all injuries
AND DRINKS Makes a mean stew (but not very good at making fire, relies more on others to light his firepit)
Vines act as grappling tool
Also makes climbing easy
Very good gatherer

View File

@ -13,7 +13,7 @@
xmlns:svg="http://www.w3.org/2000/svg"> xmlns:svg="http://www.w3.org/2000/svg">
<text <text
xml:space="preserve" xml:space="preserve"
style="font-size:25px;fill:#aaaaaa" style="font-size:25px;fill:#444444"
x="12.5" x="12.5"
y="21" y="21"
text-anchor="middle">👁</text> text-anchor="middle">👁</text>

Before

Width:  |  Height:  |  Size: 529 B

After

Width:  |  Height:  |  Size: 529 B

BIN
design/light_black.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

34
design/light_black.png.import Executable file
View File

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

View File

@ -1,14 +1,14 @@
Light/movement: Explorer Light/movement: Explorer
Melee: Torch Melee: Whip
Torches Long-lasting torches (medium light radius), can carry or anchor
Can mount on walls Map helps detect invis and detect traps for disarm
Can light things Whip can grapple for self only
Grappling hook Medium balance radius
Map Pretty good at squeezing and climbing
MERGE ABOVE INTO BELOW
Light/movement: Spelunker Light/movement: Spelunker
Melee: Hook
Has a grappling hook, can attach to anywhere at large radius, and travel across. If he anchors the rope on an anchor point, anyone can cross on it Has a grappling hook, can attach to anywhere at large radius, and travel across. If he anchors the rope on an anchor point, anyone can cross on it
Grappling hook can be retrieved by him from any point along it, only from hook by others, they can throw it back to him (large radius) Grappling hook can be retrieved by him from any point along it, only from hook by others, they can throw it back to him (large radius)
Has a lantern, small passive light radius, large light radius while held Has a lantern, small passive light radius, large light radius while held

View File

@ -13,7 +13,7 @@
xmlns:svg="http://www.w3.org/2000/svg"> xmlns:svg="http://www.w3.org/2000/svg">
<text <text
xml:space="preserve" xml:space="preserve"
style="font-size:25px;fill:#aaaaaa" style="font-size:25px;fill:#444444"
x="12.5" x="12.5"
y="21" y="21"
text-anchor="middle">羽</text> text-anchor="middle">羽</text>

Before

Width:  |  Height:  |  Size: 528 B

After

Width:  |  Height:  |  Size: 528 B

BIN
design/movement_black.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

View File

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

View File

@ -28,22 +28,22 @@ func add_player(pid):
if Globals.multiplayer_type&1: # hosting if Globals.multiplayer_type&1: # hosting
a=PLAYER_SCENE.instantiate() a=PLAYER_SCENE.instantiate()
a.name=str(pid) a.name=str(pid)
$fuck_layouts/player_list.add_child(a) $halves/fuck_layouts/player_list.add_child(a)
else: else:
a=$fuck_layouts/player_list.find_child(str(pid),false,false) a=$halves/fuck_layouts/player_list.find_child(str(pid),false,false)
while a==null: while a==null:
await get_tree().process_frame await get_tree().process_frame
a=$fuck_layouts/player_list.find_child(str(pid),false,false) a=$halves/fuck_layouts/player_list.find_child(str(pid),false,false)
a.set_multiplayer_authority(pid) a.set_multiplayer_authority(pid)
a.get_node('PName').text=pname # This tries to force local name on every node but sync will fix it after a.get_node('PName').text=pname # This tries to force local name on every node but sync will fix it after
func remove_player(pid): func remove_player(pid):
players.erase(pid) players.erase(pid)
# Kinda works? Sometimes posts errors from other clients but still behaves correctly so idk # Kinda works? Sometimes posts errors from other clients but still behaves correctly so idk
$fuck_layouts/player_list.remove_child($fuck_layouts/player_list.get_node(str(pid))) $halves/fuck_layouts/player_list.remove_child($halves/fuck_layouts/player_list.get_node(str(pid)))
func _on_send_message_pressed(message=""): func _on_send_message_pressed(message=""):
var box=$fuck_layouts/menu_shiz/chats/shitpost/input var box=$halves/fuck_layouts/menu_shiz/chats/shitpost/input
if message=="": message=box.text if message=="": message=box.text
rpc("receive_message",pname,message) rpc("receive_message",pname,message)
box.text="" box.text=""
@ -53,7 +53,7 @@ func receive_message(pid,message):
if !Globals.multiplayer_type&2: return # displaying if !Globals.multiplayer_type&2: return # displaying
var a=Label.new() var a=Label.new()
a.text=str(pid)+": "+message a.text=str(pid)+": "+message
var scroll=$fuck_layouts/menu_shiz/chats/elder var scroll=$halves/fuck_layouts/menu_shiz/chats/elder
scroll.get_node('messages').add_child(a) scroll.get_node('messages').add_child(a)
# I don't really understand this magic number but it works on my machine. # I don't really understand this magic number but it works on my machine.
# The offset is actually 128px, but this means it should grab even if you only see ~3/4 of the last message # The offset is actually 128px, but this means it should grab even if you only see ~3/4 of the last message
@ -64,7 +64,7 @@ func receive_message(pid,message):
func _start_clicked(): func _start_clicked():
var pid=0 var pid=0
for child in $fuck_layouts/player_list.get_children(true): for child in $halves/fuck_layouts/player_list.get_children(true):
if child.name=='player_spawner': continue if child.name=='player_spawner': continue
pid=child.get_multiplayer_authority() pid=child.get_multiplayer_authority()
players[pid]['name']=child.get_node('PName').text players[pid]['name']=child.get_node('PName').text
@ -79,5 +79,8 @@ func gamestart(players):
emit_signal('game_start',players,Globals.multiplayer_type) emit_signal('game_start',players,Globals.multiplayer_type)
hide() hide()
func _leave_clicked():
pass # Gotta figure this out later
func _idk_clicked(): func _idk_clicked():
pass pass

View File

@ -1,10 +1,4 @@
[gd_scene load_steps=7 format=3 uid="uid://b25q27admm4le"] [gd_scene load_steps=2 format=3 uid="uid://b25q27admm4le"]
[ext_resource type="Texture2D" uid="uid://cudn5uokwl2jg" path="res://design/combat.png" id="1_sweqy"]
[ext_resource type="Texture2D" uid="uid://na231etds2kt" path="res://design/health.png" id="2_2hs0m"]
[ext_resource type="Texture2D" uid="uid://dp1ovkq0nkf4u" path="res://design/light.png" id="3_1jxqw"]
[ext_resource type="Texture2D" uid="uid://jh1ukfckc2dv" path="res://design/movement.svg" id="3_2hs0m"]
[ext_resource type="Texture2D" uid="uid://d1r6x3d1cu61d" path="res://design/health.svg" id="4_1jxqw"]
[sub_resource type="SceneReplicationConfig" id="SceneReplicationConfig_sh265"] [sub_resource type="SceneReplicationConfig" id="SceneReplicationConfig_sh265"]
properties/0/path = NodePath("PName:text") properties/0/path = NodePath("PName:text")
@ -29,22 +23,16 @@ layout_mode = 2
layout_mode = 2 layout_mode = 2
item_count = 6 item_count = 6
popup/item_0/text = "Pyromancer" popup/item_0/text = "Pyromancer"
popup/item_0/icon = ExtResource("1_sweqy")
popup/item_0/id = 0 popup/item_0/id = 0
popup/item_1/text = "Rogue" popup/item_1/text = "Rogue"
popup/item_1/icon = ExtResource("2_2hs0m")
popup/item_1/id = 1 popup/item_1/id = 1
popup/item_2/text = "Spelunker" popup/item_2/text = "Spelunker"
popup/item_2/icon = ExtResource("3_1jxqw")
popup/item_2/id = 2 popup/item_2/id = 2
popup/item_3/text = "Acrobat" popup/item_3/text = "Acrobat"
popup/item_3/icon = ExtResource("3_2hs0m")
popup/item_3/id = 3 popup/item_3/id = 3
popup/item_4/text = "Paladin" popup/item_4/text = "Paladin"
popup/item_4/icon = ExtResource("4_1jxqw")
popup/item_4/id = 4 popup/item_4/id = 4
popup/item_5/text = "Medic" popup/item_5/text = "Medic"
popup/item_5/icon = ExtResource("4_1jxqw")
popup/item_5/id = 5 popup/item_5/id = 5
[node name="sonq" type="MultiplayerSynchronizer" parent="."] [node name="sonq" type="MultiplayerSynchronizer" parent="."]

View File

@ -40,7 +40,13 @@ Character::Character()
add_child(sync,false,INTERNAL_MODE_BACK); add_child(sync,false,INTERNAL_MODE_BACK);
shape=memnew(CollisionShape2D); shape=memnew(CollisionShape2D);
shape->set_name("_shape"); shape->set_name("_shape");
snape=memnew(CircleShape2D);
snape->set_radius(50);
snape->set_name("_real_shape");
shape->set_shape(snape);
add_child(shape,false,INTERNAL_MODE_BACK); add_child(shape,false,INTERNAL_MODE_BACK);
imba=memnew(CircleShape2D);
imba->set_name("_real_shape");
br_col=memnew(Color); br_col=memnew(Color);
br_col->r=1.0; br_col->r=1.0;
} }
@ -52,6 +58,7 @@ void Character::_process(double delta)
balance_radius_cur=godot::Math::max(balance_radius_cur,8.0); balance_radius_cur=godot::Math::max(balance_radius_cur,8.0);
move(input->flags); move(input->flags);
look_at(input->target); look_at(input->target);
imba->set_radius(balance_radius_cur); // No idea how I'm actually going to use this yet.
queue_redraw(); queue_redraw();
// Not sure if I should do this. Issues could occur if I'm wrong either side. // Not sure if I should do this. Issues could occur if I'm wrong either side.
//CharacterBody2D::_process(delta); //CharacterBody2D::_process(delta);
@ -87,8 +94,8 @@ void Character::move(int flags)
balance_radius_cur=godot::Math::min(balance_radius_cur,balance_radius); balance_radius_cur=godot::Math::min(balance_radius_cur,balance_radius);
double x=speed*(((flags&8)>>3)-((flags&4)>>2)); double x=speed*(((flags&8)>>3)-((flags&4)>>2));
double y=speed*(((flags&2)>>1)-((flags&1)>>0)); double y=speed*(((flags&2)>>1)-((flags&1)>>0));
// Very C // Very C ^
set_position(get_position()+Vector2(x,y)); move_and_collide(Vector2(x,y));
} }
void Character::set_balance_radius(const double p_balance_radius) { balance_radius=p_balance_radius; } void Character::set_balance_radius(const double p_balance_radius) { balance_radius=p_balance_radius; }

View File

@ -6,6 +6,7 @@
// Children: // Children:
#include "controller.h" #include "controller.h"
#include <godot_cpp/classes/collision_shape2d.hpp> #include <godot_cpp/classes/collision_shape2d.hpp>
#include <godot_cpp/classes/circle_shape2d.hpp>
#include <godot_cpp/classes/sprite2d.hpp> #include <godot_cpp/classes/sprite2d.hpp>
#include <godot_cpp/classes/multiplayer_synchronizer.hpp> #include <godot_cpp/classes/multiplayer_synchronizer.hpp>
// Grandchildren: // Grandchildren:
@ -30,6 +31,7 @@ private:
Controller* input; Controller* input;
MultiplayerSynchronizer* sync; MultiplayerSynchronizer* sync;
CollisionShape2D* shape; CollisionShape2D* shape;
CircleShape2D* snape,* imba;
Color* br_col; Color* br_col;
protected: protected:
static void _bind_methods(); static void _bind_methods();

52
ui.tscn
View File

@ -1,7 +1,8 @@
[gd_scene load_steps=3 format=3 uid="uid://1qpp4ng383lf"] [gd_scene load_steps=4 format=3 uid="uid://1qpp4ng383lf"]
[ext_resource type="Script" uid="uid://baxkcpwuj61it" path="res://menu.gd" id="1_fyqef"] [ext_resource type="Script" uid="uid://baxkcpwuj61it" path="res://menu.gd" id="1_fyqef"]
[ext_resource type="Script" uid="uid://uwpqjqvde2ot" path="res://lobby.gd" id="2_m6e0p"] [ext_resource type="Script" uid="uid://uwpqjqvde2ot" path="res://lobby.gd" id="2_m6e0p"]
[ext_resource type="PackedScene" uid="uid://dhc4noca3k127" path="res://chara_select.tscn" id="3_27fn8"]
[node name="scene" type="Control"] [node name="scene" type="Control"]
layout_mode = 3 layout_mode = 3
@ -84,60 +85,68 @@ layout_mode = 1
anchors_preset = 0 anchors_preset = 0
script = ExtResource("2_m6e0p") script = ExtResource("2_m6e0p")
[node name="fuck_layouts" type="VBoxContainer" parent="Lobby"] [node name="halves" type="HBoxContainer" parent="Lobby"]
layout_mode = 0 layout_mode = 0
offset_right = 516.0 offset_right = 1152.0
offset_bottom = 167.0 offset_bottom = 648.0
alignment = 1
[node name="menu_shiz" type="HBoxContainer" parent="Lobby/fuck_layouts"] [node name="fuck_layouts" type="VBoxContainer" parent="Lobby/halves"]
layout_mode = 2 layout_mode = 2
[node name="chats" type="VBoxContainer" parent="Lobby/fuck_layouts/menu_shiz"] [node name="menu_shiz" type="HBoxContainer" parent="Lobby/halves/fuck_layouts"]
layout_mode = 2 layout_mode = 2
[node name="elder" type="ScrollContainer" parent="Lobby/fuck_layouts/menu_shiz/chats"] [node name="chats" type="VBoxContainer" parent="Lobby/halves/fuck_layouts/menu_shiz"]
layout_mode = 2
[node name="elder" type="ScrollContainer" parent="Lobby/halves/fuck_layouts/menu_shiz/chats"]
custom_minimum_size = Vector2(512, 128) custom_minimum_size = Vector2(512, 128)
layout_mode = 2 layout_mode = 2
[node name="messages" type="VBoxContainer" parent="Lobby/fuck_layouts/menu_shiz/chats/elder"] [node name="messages" type="VBoxContainer" parent="Lobby/halves/fuck_layouts/menu_shiz/chats/elder"]
layout_mode = 2 layout_mode = 2
[node name="shitpost" type="HBoxContainer" parent="Lobby/fuck_layouts/menu_shiz/chats"] [node name="shitpost" type="HBoxContainer" parent="Lobby/halves/fuck_layouts/menu_shiz/chats"]
custom_minimum_size = Vector2(512, 0) custom_minimum_size = Vector2(512, 0)
layout_mode = 2 layout_mode = 2
[node name="input" type="LineEdit" parent="Lobby/fuck_layouts/menu_shiz/chats/shitpost"] [node name="input" type="LineEdit" parent="Lobby/halves/fuck_layouts/menu_shiz/chats/shitpost"]
layout_mode = 2 layout_mode = 2
size_flags_horizontal = 3 size_flags_horizontal = 3
placeholder_text = "ni-" placeholder_text = "ni-"
keep_editing_on_text_submit = true keep_editing_on_text_submit = true
[node name="send_message" type="Button" parent="Lobby/fuck_layouts/menu_shiz/chats/shitpost"] [node name="send_message" type="Button" parent="Lobby/halves/fuck_layouts/menu_shiz/chats/shitpost"]
layout_mode = 2 layout_mode = 2
text = "Shitpost" text = "Shitpost"
[node name="buttons" type="VBoxContainer" parent="Lobby/fuck_layouts/menu_shiz"] [node name="buttons" type="VBoxContainer" parent="Lobby/halves/fuck_layouts/menu_shiz"]
layout_mode = 2 layout_mode = 2
[node name="start" type="Button" parent="Lobby/fuck_layouts/menu_shiz/buttons"] [node name="start" type="Button" parent="Lobby/halves/fuck_layouts/menu_shiz/buttons"]
layout_mode = 2 layout_mode = 2
text = "Start" text = "Start"
[node name="leave" type="Button" parent="Lobby/fuck_layouts/menu_shiz/buttons"] [node name="leave" type="Button" parent="Lobby/halves/fuck_layouts/menu_shiz/buttons"]
layout_mode = 2 layout_mode = 2
text = "Leave" text = "Leave"
[node name="idk" type="Button" parent="Lobby/fuck_layouts/menu_shiz/buttons"] [node name="idk" type="Button" parent="Lobby/halves/fuck_layouts/menu_shiz/buttons"]
layout_mode = 2 layout_mode = 2
text = "idk" text = "idk"
[node name="player_list" type="HBoxContainer" parent="Lobby/fuck_layouts"] [node name="player_list" type="HBoxContainer" parent="Lobby/halves/fuck_layouts"]
layout_mode = 2 layout_mode = 2
[node name="player_spawner" type="MultiplayerSpawner" parent="Lobby/fuck_layouts/player_list"] [node name="player_spawner" type="MultiplayerSpawner" parent="Lobby/halves/fuck_layouts/player_list"]
_spawnable_scenes = PackedStringArray("uid://b25q27admm4le") _spawnable_scenes = PackedStringArray("uid://b25q27admm4le")
spawn_path = NodePath("..") spawn_path = NodePath("..")
[node name="chara_select" parent="Lobby/halves" instance=ExtResource("3_27fn8")]
custom_minimum_size = Vector2(576, 648)
layout_mode = 2
[node name="Game" type="Game" parent="."] [node name="Game" type="Game" parent="."]
visible = false visible = false
@ -145,7 +154,8 @@ visible = false
[connection signal="pressed" from="main_menu/Net/buttons/Host" to="main_menu" method="_on_host_pressed"] [connection signal="pressed" from="main_menu/Net/buttons/Host" to="main_menu" method="_on_host_pressed"]
[connection signal="pressed" from="main_menu/Net/buttons/Join" to="main_menu" method="_on_join_pressed"] [connection signal="pressed" from="main_menu/Net/buttons/Join" to="main_menu" method="_on_join_pressed"]
[connection signal="game_start" from="Lobby" to="Game" method="start"] [connection signal="game_start" from="Lobby" to="Game" method="start"]
[connection signal="text_submitted" from="Lobby/fuck_layouts/menu_shiz/chats/shitpost/input" to="Lobby" method="_on_send_message_pressed"] [connection signal="text_submitted" from="Lobby/halves/fuck_layouts/menu_shiz/chats/shitpost/input" to="Lobby" method="_on_send_message_pressed"]
[connection signal="pressed" from="Lobby/fuck_layouts/menu_shiz/chats/shitpost/send_message" to="Lobby" method="_on_send_message_pressed"] [connection signal="pressed" from="Lobby/halves/fuck_layouts/menu_shiz/chats/shitpost/send_message" to="Lobby" method="_on_send_message_pressed"]
[connection signal="pressed" from="Lobby/fuck_layouts/menu_shiz/buttons/start" to="Lobby" method="_start_clicked"] [connection signal="pressed" from="Lobby/halves/fuck_layouts/menu_shiz/buttons/start" to="Lobby" method="_start_clicked"]
[connection signal="pressed" from="Lobby/fuck_layouts/menu_shiz/buttons/idk" to="Lobby" method="_idk_clicked"] [connection signal="pressed" from="Lobby/halves/fuck_layouts/menu_shiz/buttons/leave" to="Lobby" method="_leave_clicked"]
[connection signal="pressed" from="Lobby/halves/fuck_layouts/menu_shiz/buttons/idk" to="Lobby" method="_idk_clicked"]