diff --git a/chara_select.gd b/chara_select.gd new file mode 100755 index 0000000..a833f2e --- /dev/null +++ b/chara_select.gd @@ -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 diff --git a/chara_select.gd.uid b/chara_select.gd.uid new file mode 100755 index 0000000..2a68954 --- /dev/null +++ b/chara_select.gd.uid @@ -0,0 +1 @@ +uid://eq3s4dof0p87 diff --git a/chara_select.tscn b/chara_select.tscn new file mode 100755 index 0000000..86f9189 --- /dev/null +++ b/chara_select.tscn @@ -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 diff --git a/class_table b/class_table new file mode 100755 index 0000000..dbd109b --- /dev/null +++ b/class_table @@ -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 \ No newline at end of file diff --git a/design/chara_select.xcf b/design/chara_select.xcf new file mode 100755 index 0000000..e2b58cb Binary files /dev/null and b/design/chara_select.xcf differ diff --git a/design/combat.svg b/design/combat.svg index 477f6fb..0ecd6ac 100755 --- a/design/combat.svg +++ b/design/combat.svg @@ -13,13 +13,13 @@ xmlns:svg="http://www.w3.org/2000/svg"> 🗡 🛡 diff --git a/design/combat_black.png b/design/combat_black.png new file mode 100755 index 0000000..847d869 Binary files /dev/null and b/design/combat_black.png differ diff --git a/design/combat_black.png.import b/design/combat_black.png.import new file mode 100755 index 0000000..dde6303 --- /dev/null +++ b/design/combat_black.png.import @@ -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 diff --git a/design/combat_health b/design/combat_health index a420ac4..d673e08 100755 --- a/design/combat_health +++ b/design/combat_health @@ -2,26 +2,28 @@ Combat/health: Warrior Melee: Fists Melee weapons: Axe, sword, spear Spear has large reach - Sword can stab (ignore block) + Sword can stab (ignore block, bad vs dodge (undead)) Axe hits harder + Roughly require the same mats Armour Head, torso, legs, arms - Torso gives general protection + Torso gives general protection (damage reduction) Head prevents concussion 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 Also negates half the effects of broken limbs/concussions - Losing buff cannot kill a player - Weapons and armour have durability and must be remade every so often. + 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 Combat/health: Paladin -Melee: Hammer +Melee: Hammer (can't lose it, main weapon) Mending magic Healing magic is less powerful than most Smite magic, anti-undead Also a big sword, generates a lot of aggro 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 - Weapons and armour have durability and must be remade every so often. \ No newline at end of file + Weapons and armour have durability and must be remade every so often \ No newline at end of file diff --git a/design/combat_light b/design/combat_light index 1cbce57..694e7e3 100755 --- a/design/combat_light +++ b/design/combat_light @@ -1,15 +1,17 @@ Combat/light: Engineer Melee: Spanner - Crafts items - Disarms traps - Operates mechanics - Can make and use guns (very limited) + Makes traps/bombs for dealing with mobs + Bombs very effective vs undead + Makes wards, also provide small light radius + 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 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 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 \ No newline at end of file diff --git a/design/combat_movement b/design/combat_movement index 09cb20d..30817ef 100755 --- a/design/combat_movement +++ b/design/combat_movement @@ -1,15 +1,19 @@ Combat/movement: Hunter Melee: Knife - Knife for cutting up dead things Bow & arrows Arrows are limited Arrows can have rope or oil Applied on shot and requires appropriate material 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 Melee: Dagger - Can climb along small ledges and ropes, etc.; large balance radius - Good at sneaking around and killing enemies; silent takedowns don't generate aggro from other enemies \ No newline at end of file + Large balance radius, good for ledging and such + 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 \ No newline at end of file diff --git a/design/gen b/design/gen index 2613230..119535d 100755 --- a/design/gen +++ b/design/gen @@ -6,34 +6,34 @@ Combat DPSing <-> CCing Health (aka recovery) - Healing - Curing (injuries) - Cooking - Gathering - Carving + Healing <-> Curing (injuries) + Cooking <-> Gathering/Carving Light - Lighting - Searching - Warding + Lighting <-> Searching + Warding <-> Disarming Movement - Balancing - Grappling - Squeezing - Climbing + Balancing <-> Grappling + Squeezing <-> Climbing + +Each character crafts their own shit 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 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. - 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) + Other things you can collect: Metal (various) Oil Water (restores mana) -Berries/mushrooms -Ropes \ No newline at end of file +Berries/mushrooms (being full heals you, being hungry hurts you) +Ropes +Cloth (for bandages) +Leather (from organic mobs, carving) +Meat (^) +Wood \ No newline at end of file diff --git a/design/health.svg b/design/health.svg index c8f643b..7ca5d32 100755 --- a/design/health.svg +++ b/design/health.svg @@ -13,7 +13,7 @@ xmlns:svg="http://www.w3.org/2000/svg"> diff --git a/design/health_black.png b/design/health_black.png new file mode 100755 index 0000000..0ff76e8 Binary files /dev/null and b/design/health_black.png differ diff --git a/design/health_black.png.import b/design/health_black.png.import new file mode 100755 index 0000000..8bc291e --- /dev/null +++ b/design/health_black.png.import @@ -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 diff --git a/design/health_light b/design/health_light index 6cd0890..78d9d66 100755 --- a/design/health_light +++ b/design/health_light @@ -1,23 +1,23 @@ Light/health: Healer -Melee: Backpack +Melee: Crutch Bandages, general curing Cures injuries - Can cure himself of: - General damage - Broken leg - Others can cure him of: - Broken arm - Anyone can cure a concussion, but Healer does it faster + Needs help from others to cure own broken arm or concussion + Wards, also reveal invis in small radius Can make campfires - Lights a reasonable distance - Can cook meat and bake bread on it + Large light radius + 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 Carries rations for passive healing 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 - Resupplies very slowly over time \ No newline at end of file + 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) \ No newline at end of file diff --git a/design/health_movement b/design/health_movement index 85366d9..c217d22 100755 --- a/design/health_movement +++ b/design/health_movement @@ -1,21 +1,20 @@ -Health/movement: Servant +Health/movement: Maid/Butler 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 Needs water, which he can collect from streams Combined with berries and herbs, also serves as food - Can climb, slide, balance (himself and items) - -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 + Not a great gatherer Health/movement: Botanist -Melee: Whip -PLANTS -FLOWERS -AND DRINKS \ No newline at end of file +Melee: Vine + Passively produces berries (randomly) + Also herbs which slowly deal with all injuries + 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 \ No newline at end of file diff --git a/design/light.svg b/design/light.svg index 01b1bbf..a3857b7 100755 --- a/design/light.svg +++ b/design/light.svg @@ -13,7 +13,7 @@ xmlns:svg="http://www.w3.org/2000/svg"> 👁 diff --git a/design/light_black.png b/design/light_black.png new file mode 100755 index 0000000..b230395 Binary files /dev/null and b/design/light_black.png differ diff --git a/design/light_black.png.import b/design/light_black.png.import new file mode 100755 index 0000000..de75865 --- /dev/null +++ b/design/light_black.png.import @@ -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 diff --git a/design/light_movement b/design/light_movement index 1cf6f72..43d0f1a 100755 --- a/design/light_movement +++ b/design/light_movement @@ -1,14 +1,14 @@ Light/movement: Explorer -Melee: Torch - Torches - Can mount on walls - Can light things - Grappling hook - Map +Melee: Whip + Long-lasting torches (medium light radius), can carry or anchor + Map helps detect invis and detect traps for disarm + Whip can grapple for self only + Medium balance radius + Pretty good at squeezing and climbing -MERGE ABOVE INTO BELOW 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 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 diff --git a/design/movement.svg b/design/movement.svg index 3c0931e..1b7f0e2 100755 --- a/design/movement.svg +++ b/design/movement.svg @@ -13,7 +13,7 @@ xmlns:svg="http://www.w3.org/2000/svg"> diff --git a/design/movement_black.png b/design/movement_black.png new file mode 100755 index 0000000..1101d23 Binary files /dev/null and b/design/movement_black.png differ diff --git a/design/movement_black.png.import b/design/movement_black.png.import new file mode 100755 index 0000000..4db80d8 --- /dev/null +++ b/design/movement_black.png.import @@ -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 diff --git a/lobby.gd b/lobby.gd index 9ef0a4b..f0a4dec 100755 --- a/lobby.gd +++ b/lobby.gd @@ -28,22 +28,22 @@ func add_player(pid): if Globals.multiplayer_type&1: # hosting a=PLAYER_SCENE.instantiate() a.name=str(pid) - $fuck_layouts/player_list.add_child(a) + $halves/fuck_layouts/player_list.add_child(a) 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: 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.get_node('PName').text=pname # This tries to force local name on every node but sync will fix it after func remove_player(pid): players.erase(pid) # 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=""): - var box=$fuck_layouts/menu_shiz/chats/shitpost/input + var box=$halves/fuck_layouts/menu_shiz/chats/shitpost/input if message=="": message=box.text rpc("receive_message",pname,message) box.text="" @@ -53,7 +53,7 @@ func receive_message(pid,message): if !Globals.multiplayer_type&2: return # displaying var a=Label.new() 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) # 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 @@ -64,7 +64,7 @@ func receive_message(pid,message): func _start_clicked(): 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 pid=child.get_multiplayer_authority() players[pid]['name']=child.get_node('PName').text @@ -79,5 +79,8 @@ func gamestart(players): emit_signal('game_start',players,Globals.multiplayer_type) hide() +func _leave_clicked(): + pass # Gotta figure this out later + func _idk_clicked(): pass diff --git a/player.tscn b/player.tscn index 5cbd6c9..e4ff561 100755 --- a/player.tscn +++ b/player.tscn @@ -1,10 +1,4 @@ -[gd_scene load_steps=7 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"] +[gd_scene load_steps=2 format=3 uid="uid://b25q27admm4le"] [sub_resource type="SceneReplicationConfig" id="SceneReplicationConfig_sh265"] properties/0/path = NodePath("PName:text") @@ -29,22 +23,16 @@ layout_mode = 2 layout_mode = 2 item_count = 6 popup/item_0/text = "Pyromancer" -popup/item_0/icon = ExtResource("1_sweqy") popup/item_0/id = 0 popup/item_1/text = "Rogue" -popup/item_1/icon = ExtResource("2_2hs0m") popup/item_1/id = 1 popup/item_2/text = "Spelunker" -popup/item_2/icon = ExtResource("3_1jxqw") popup/item_2/id = 2 popup/item_3/text = "Acrobat" -popup/item_3/icon = ExtResource("3_2hs0m") popup/item_3/id = 3 popup/item_4/text = "Paladin" -popup/item_4/icon = ExtResource("4_1jxqw") popup/item_4/id = 4 popup/item_5/text = "Medic" -popup/item_5/icon = ExtResource("4_1jxqw") popup/item_5/id = 5 [node name="sonq" type="MultiplayerSynchronizer" parent="."] diff --git a/src/kyara.cpp b/src/kyara.cpp index a145f5f..62b7688 100755 --- a/src/kyara.cpp +++ b/src/kyara.cpp @@ -40,7 +40,13 @@ Character::Character() add_child(sync,false,INTERNAL_MODE_BACK); shape=memnew(CollisionShape2D); 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); + imba=memnew(CircleShape2D); + imba->set_name("_real_shape"); br_col=memnew(Color); 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); move(input->flags); look_at(input->target); + imba->set_radius(balance_radius_cur); // No idea how I'm actually going to use this yet. queue_redraw(); // Not sure if I should do this. Issues could occur if I'm wrong either side. //CharacterBody2D::_process(delta); @@ -87,8 +94,8 @@ void Character::move(int flags) balance_radius_cur=godot::Math::min(balance_radius_cur,balance_radius); double x=speed*(((flags&8)>>3)-((flags&4)>>2)); double y=speed*(((flags&2)>>1)-((flags&1)>>0)); - // Very C - set_position(get_position()+Vector2(x,y)); + // Very C ^ + move_and_collide(Vector2(x,y)); } void Character::set_balance_radius(const double p_balance_radius) { balance_radius=p_balance_radius; } diff --git a/src/kyara.h b/src/kyara.h index ba1e2e3..22bdc48 100755 --- a/src/kyara.h +++ b/src/kyara.h @@ -6,6 +6,7 @@ // Children: #include "controller.h" #include +#include #include #include // Grandchildren: @@ -30,6 +31,7 @@ private: Controller* input; MultiplayerSynchronizer* sync; CollisionShape2D* shape; + CircleShape2D* snape,* imba; Color* br_col; protected: static void _bind_methods(); diff --git a/ui.tscn b/ui.tscn index 3a40c6c..994481f 100755 --- a/ui.tscn +++ b/ui.tscn @@ -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://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"] layout_mode = 3 @@ -84,60 +85,68 @@ layout_mode = 1 anchors_preset = 0 script = ExtResource("2_m6e0p") -[node name="fuck_layouts" type="VBoxContainer" parent="Lobby"] +[node name="halves" type="HBoxContainer" parent="Lobby"] layout_mode = 0 -offset_right = 516.0 -offset_bottom = 167.0 +offset_right = 1152.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 -[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 -[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) 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 -[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) 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 size_flags_horizontal = 3 placeholder_text = "ni-" 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 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 -[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 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 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 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 -[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") 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="."] 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/Join" to="main_menu" method="_on_join_pressed"] [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="pressed" from="Lobby/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/fuck_layouts/menu_shiz/buttons/idk" to="Lobby" method="_idk_clicked"] +[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/halves/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/buttons/start" to="Lobby" method="_start_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"]