Skip to content

Commit

Permalink
bird kill on ground, better playername, fix ping bug,
Browse files Browse the repository at this point in the history
  • Loading branch information
enthus1ast committed Nov 29, 2017
1 parent 81d92b7 commit c7310f9
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 9 deletions.
15 changes: 13 additions & 2 deletions TODO.org
@@ -1,7 +1,7 @@
David
** DONE Highscore counter
** DONE Crypted highscore file
** TODO Online highscore?
** Online highscore?
** DONE Config file (ini)
Fullscreen
ok name
Expand All @@ -17,9 +17,20 @@ David
** DONE stage in highscore
** DONE disable collision on spawn/revive (kill protect)
** DONE Spiel anhalten beim pause drücken SP/MP
** TODO player collision save spot eliminieren
** player collision save spot eliminieren
** DONE dauer spring bug beim ersten mal
** DONE be a bird ausblenden wenn kein bird (jetzt dauerhaft)
** TODO background white alpha fix
** multiple paralax layer for ground
** DONE if connection lost stop ping
** DONE vogel tod auf boden
** DONE namen besser einrücken
** cheat unter windows??

** 32 bit linux
** 32 bit window
** itch bilder
** itch video


Pinned godot versions:
Expand Down
2 changes: 1 addition & 1 deletion game.gd
Expand Up @@ -238,7 +238,7 @@ func _process(delta):
playersLabel.bbcode_text = "Stage: "+str(stage)+"\n"
for player in get_tree().get_nodes_in_group("players"):
var line = str(int(player.alive))+ " " + player.playerName
playersLabel.bbcode_text += utils.computeColorBB(player.playerName, line) + "\n"
playersLabel.bbcode_text += "[right]" + utils.computeColorBB(player.playerName, line) + "[/right]\n"

func _on_VisibilityNotifier2D_screen_exited():
# two ground-tiles for seamless infinite maps
Expand Down
9 changes: 4 additions & 5 deletions game.tscn
Expand Up @@ -158,7 +158,6 @@ __meta__ = {

[node name="hud" type="CanvasLayer" parent="."]

editor/display_folded = true
layer = 1
offset = Vector2( 0, 0 )
rotation = 0.0
Expand Down Expand Up @@ -195,9 +194,9 @@ anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 831.0
margin_left = 740.0
margin_top = 37.0
margin_right = 1548.0
margin_right = 1022.0
margin_bottom = 326.0
rect_pivot_offset = Vector2( 0, 0 )
mouse_filter = 2
Expand All @@ -206,8 +205,8 @@ size_flags_vertical = 4
custom_fonts/normal_font = SubResource( 2 )
custom_constants/line_separation = 0
bbcode_enabled = true
bbcode_text = "Dankrad awdawdawdfalse
Dreaded-gnu fasle"
bbcode_text = "[right]1 Dankrad [/right]
[right]1 aaaaa Dreaded-gnu[/right] "
visible_characters = -1
percent_visible = 1.0
override_selected_font_color = false
Expand Down
10 changes: 9 additions & 1 deletion lobby.gd
Expand Up @@ -25,6 +25,7 @@ onready var BackgroundGame = preload("res://backgroundGame.tscn")
onready var warnPopup = get_node("menu/WarnPopup")
onready var peerTypeInfo = get_node("networkHud/CanvasLayer/peerTypeInfo")
onready var seedInput = get_node("menu/networkPanel/seed")
onready var pingTimer = get_node("networkHud/Timer")

var countdown
var countdownActive = false
Expand Down Expand Up @@ -54,12 +55,18 @@ signal connection_success()
signal connection_fail()
signal pong

func stopAndClearPing():
## stops ping timer and clears the graphik
pingTimer.stop()
pingTimeout.text = ""

func leaveLobby():
networkPanel.set_visible(true)
lobby.set_visible(false)
get_tree().set_network_peer(null)
eNet.close_connection()
eNet = NetworkedMultiplayerENet.new()
stopAndClearPing()
players={}
clearList()
clearChat()
Expand Down Expand Up @@ -142,7 +149,7 @@ func _connected_ok():
lobby.set_visible(true)
dialogWaiting.set_visible(false)
isConnecting = false
get_node("networkHud/Timer").start()
pingTimer.start()

remote func user_ready(_player):
#server responding to Clients connect ok
Expand Down Expand Up @@ -251,6 +258,7 @@ func _server_disconnected():
game.free()
if !has_node("backgroundGame"):
backgroundGameFnc()
stopAndClearPing()
eNet.close_connection()
eNet = NetworkedMultiplayerENet.new()
get_tree().set_network_peer(null)
Expand Down
4 changes: 4 additions & 0 deletions player.gd
Expand Up @@ -333,6 +333,10 @@ func disableInputs():
func _on_player_body_shape_entered( body_id, body, body_shape, local_shape ):
if(body.has_node("obstacleShape") or body.has_node("enemyShape")) and alive and !isKillProtected:
kill()

# Kill bird if it hits the ground
if(type == "bird" and body.is_in_group("ground")) and alive and !isKillProtected:
kill()

func _on_player_body_shape_exited( body_id, body, body_shape, local_shape ):
pass # replace with function body
Expand Down

0 comments on commit c7310f9

Please sign in to comment.