Skip to content
Permalink
Browse files

Uploaded Skeleton Engine

  • Loading branch information...
JenniBee
JenniBee committed Apr 16, 2017
1 parent 9168484 commit a0e2f21c07868c4b8ba7453a5ee475a0e29993bd
Showing with 5,135 additions and 0 deletions.
  1. +66 −0 engine.cfg
  2. +9 −0 game/fallbacks.esc
  3. +3 −0 game/game.esc
  4. BIN game/inventory_items.scn
  5. +4 −0 game/scenes_cache.gd
  6. +47 −0 globals/achievements.gd
  7. +50 −0 globals/action_menu.gd
  8. +23 −0 globals/background.gd
  9. +35 −0 globals/bg_music.gd
  10. +35 −0 globals/bg_music.tscn
  11. +19 −0 globals/dd_player.gd
  12. BIN globals/dd_player.scn
  13. +168 −0 globals/dialog_dialog.gd
  14. +217 −0 globals/dialog_instance.gd
  15. +27 −0 globals/dialog_player.gd
  16. BIN globals/dialog_player.scn
  17. +7 −0 globals/errors.gd
  18. +396 −0 globals/esc_compile.gd
  19. +329 −0 globals/game.gd
  20. BIN globals/game.scn
  21. +750 −0 globals/global_vm.gd
  22. BIN globals/global_vm.scn
  23. +67 −0 globals/hud.gd
  24. +140 −0 globals/interactive.gd
  25. +14 −0 globals/inv_look.gd
  26. +168 −0 globals/inventory.gd
  27. +348 −0 globals/item.gd
  28. +33 −0 globals/music_player.gd
  29. +324 −0 globals/player.gd
  30. +161 −0 globals/resource_queue.gd
  31. +201 −0 globals/save_data.gd
  32. +173 −0 globals/save_data_icloud.gd
  33. +5 −0 globals/scene.gd
  34. +6 −0 globals/scene_base.gd
  35. +7 −0 globals/scene_main.gd
  36. +17 −0 globals/scene_main.tscn
  37. +140 −0 globals/sound.gd
  38. +124 −0 globals/telon.gd
  39. BIN globals/telon.scn
  40. +36 −0 globals/telon_music.gd
  41. +192 −0 globals/terrain.gd
  42. +293 −0 globals/vm_level.gd
  43. BIN globals/white.png
  44. +154 −0 main.gd
  45. BIN main.scn
  46. +16 −0 quick_save.esc
  47. BIN scenes/test/background.png
  48. BIN scenes/test/player.scn
  49. BIN scenes/test/player/idle_down.png
  50. BIN scenes/test/player/idle_right.png
  51. BIN scenes/test/player/idle_up.png
  52. BIN scenes/test/player/walk_down.png
  53. BIN scenes/test/player/walk_right.png
  54. BIN scenes/test/player/walk_up.png
  55. +14 −0 scenes/test/player_anims.gd
  56. BIN scenes/test/test.scn
  57. +27 −0 templates/base_scene.tscn
  58. +27 −0 ui/action_menu.tscn
  59. +52 −0 ui/confirm_popup.gd
  60. BIN ui/dd_default.scn
  61. BIN ui/dialog_default.scn
  62. BIN ui/hud.scn
  63. BIN ui/inventory.scn
  64. +123 −0 ui/main_menu.gd
  65. +65 −0 ui/main_menu.tscn
  66. +23 −0 ui/verb_menu.gd
  67. BIN ui/verb_menu.scn
@@ -0,0 +1,66 @@
[application]

main_scene="res://globals/scene_main.tscn"
save_data="res://globals/save_data.gd"
tooltip_lang_default="en"
speech_suffix=".spx"
max_voice_volume=2

[autoload]

main="res://main.scn"
vm="res://globals/global_vm.scn"

[debug]

print_clicked_control=true

[display]

test_width=1280
test_height=720
width=1920
height=1080
game_width=1920
game_height=1080

[input]

quick_save=[key(F4)]
start=[jbutton(0, 11)]
inventory_toggle=[jbutton(0, 5), jbutton(0, 7), jbutton(0, 9)]
look=[jbutton(0, 3)]
use=[jbutton(0, 2)]
talk=[jbutton(0, 1)]
punch_out_punch=[key(X), jbutton(0, 0)]
punch_out_dodge=[key(Z), jbutton(0, 2)]
menu_request=[key(Escape), jbutton(0, 11)]


[platform]

gamecenter=false
dialog_option_height=1
telon="res://globals/telon.scn"
hud_mobile=false
show_ingame_buttons=false
dialog_instance_scale=1
dialog_type_suffix=""
action_menu_scale=1
logos="res://game/logos.ogm"
use_custom_camera=false
file_cases="res://game/ui/file_cases/file_cases.scn"
ghost_remap=""
disable_screen_shaders=false
window_title_height=32
credits="res://game/ui/credits/credits.txt"
windowed_available=true
screen_resizable=true
exit_button=true

[ui]

main_menu="res://ui/main_menu.tscn"
in_game_menu=""
credits=""
savegames=""
@@ -0,0 +1,9 @@


:use
debug "use fallback!"
say player "I can't do that"

:pick_up
debug "pick_up fallback!"
say player "That's not a good idea"
@@ -0,0 +1,3 @@
:load

change_scene res://scenes/test/test.scn
Binary file not shown.
@@ -0,0 +1,4 @@
const scenes = [
"res://globals/game.scn",
#"res://game/player/player.xml",
]
@@ -0,0 +1,47 @@
var GameCenter = null
var iOS = null
var achieves_left = 2

func flush():
while GameCenter.get_pending_event_count() > 0:
GameCenter.pop_pending_event()

func award(aid):
if GameCenter == null:
return

flush()

printt("******** awarding achievement ", aid)
GameCenter.award_achievement( { "name": aid, "progress": 100, "show_completion_banner": true } )

var vm = OS.get_main_loop().get_root().get_node("/root/vm")
if vm.settings.rate_shown:
return

achieves_left -= 1
if achieves_left > 0:
return

printt("showing rate screen")
var url = iOS.get_rate_url(Globals.get("ios/app_id"))
vm.show_rate(url)

vm.settings.rate_shown = true
vm.save_settings()


func reset():
if GameCenter == null:
return

flush()
GameCenter.reset_achievements()

func is_ready():
return true

func start():
if Globals.has_singleton("GameCenter"):
GameCenter = Globals.get_singleton("GameCenter")
iOS = Globals.get_singleton("iOS")
@@ -0,0 +1,50 @@
var target
var actions

func action_pressed(action):
get_tree().call_group(0, "game", "action_menu_selected", target, action)

func target_visibility_changed():
stop()

func start(p_target):
#actions[0].grab_focus()

if target != p_target:
target = p_target
target.connect("visibility_changed", self, "target_visibility_changed")

var scale = Globals.get("platform/action_menu_scale")
set_scale(Vector2(scale, scale))

func stop():
if target != null:
target.disconnect("visibility_changed", self, "target_visibility_changed")
target = null
hide()

func _input(event):
if !is_visible():
return
if !get_node("/root/vm").can_interact():
return
if !event.is_pressed():
return

for a in actions:
if event.is_action(a.get_name()):
action_pressed(a.get_name())
break

func _ready():

actions = []
var acts = get_node("actions")
for i in range(acts.get_child_count()):
var c = acts.get_child(i)
if !c.is_type("Button"):
continue
actions.push_back(c)
c.connect("pressed", self, "action_pressed", [c.get_name()])

set_process_input(true)
@@ -0,0 +1,23 @@
extends Control

export var action = "walk"

func input(event):
if event.type == InputEvent.MOUSE_BUTTON && event.pressed:
if (event.button_index == 1):
get_tree().call_group(0, "game", "clicked", self, get_pos() + Vector2(event.x, event.y))
elif (event.button_index == 2):
emit_right_click()

func get_action():
return action

func _init():
add_user_signal("right_click_on_bg")

func _ready():
connect("input_event", self, "input")
add_to_group("background")

func emit_right_click():
emit_signal("right_click_on_bg")
@@ -0,0 +1,35 @@
extends "res://globals/item.gd"

var stream
var current_music

func game_cleared():
set_state("off", true)
if global_id != "":
vm.register_object(global_id, self)

func set_state(p_state, p_force = false):

if p_state == state && !p_force && stream.is_playing():
return

.set_state(p_state, p_force)

if stream == null:
return

if state == "off" || state == "default":
stream.set_stream(null)
return

var res = load(p_state)
stream.set_stream(res)
if res != null:
stream.set_loop(true)
stream.play()
stream.set_volume(vm.settings.music_volume)



func _ready():
stream = get_node("stream")
@@ -0,0 +1,35 @@
[gd_scene load_steps=2 format=1]

[ext_resource path="res://globals/bg_music.gd" type="Script" id=1]

[node name="bg_music" type="Control"]

focus/ignore_mouse = false
focus/stop_mouse = true
size_flags/horizontal = 2
size_flags/vertical = 2
margin/left = 0.0
margin/top = 0.0
margin/right = 40.0
margin/bottom = 40.0
script/script = ExtResource( 1 )
animations = null
speed = 300
scale_on_map = false
light_on_map = false
tooltip = ""
action = ""
events_path = ""
global_id = "bg_music"
use_combine = false
inventory = false
use_action_menu = true
interact_angle = -1
talk_animation = "talk"
active = true
placeholders = {

}
use_custom_z = false


@@ -0,0 +1,19 @@
func start(params, level):
var type
if params.size() < 2 || !has_resource(params[1]):
type = "default"
else:
type = params[1]

type = type + Globals.get("platform/dialog_type_suffix")

printt("******* instancing dialog ", type)

var inst = get_resource(type).instance()
get_parent().add_child(inst)

# check the type and instance it here?
inst.call_deferred("start", params, level)

func _ready():
add_to_group("dialog_dialog")
BIN +702 Bytes globals/dd_player.scn
Binary file not shown.

0 comments on commit a0e2f21

Please sign in to comment.
You can’t perform that action at this time.