mirror of
https://github.com/cyberarm/i-mic-fps.git
synced 2025-12-15 07:32:35 +00:00
Compare commits
3 Commits
f10b98b0f0
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| ce089afbf1 | |||
| 3851eb1630 | |||
| 2da9edb6d0 |
29
Gemfile.lock
29
Gemfile.lock
@@ -1,11 +1,9 @@
|
||||
GIT
|
||||
remote: https://github.com/cyberarm/cyberarm_engine
|
||||
revision: d1d87db070578fefe97f275b63157b4212a44a89
|
||||
revision: 9694cc2270198005bc2388fc6dacddfbb9629f60
|
||||
specs:
|
||||
cyberarm_engine (0.22.0)
|
||||
excon (~> 0.88)
|
||||
cyberarm_engine (0.24.4)
|
||||
gosu (~> 1.1)
|
||||
gosu_more_drawables (~> 0.3)
|
||||
|
||||
GIT
|
||||
remote: https://github.com/gosu/releasy.git
|
||||
@@ -20,21 +18,20 @@ GIT
|
||||
GEM
|
||||
remote: https://rubygems.org/
|
||||
specs:
|
||||
concurrent-ruby (1.1.10)
|
||||
concurrent-ruby (1.2.3)
|
||||
cri (2.1.0)
|
||||
excon (0.96.0)
|
||||
gosu (1.4.5)
|
||||
gosu_more_drawables (0.3.1)
|
||||
i18n (1.12.0)
|
||||
excon (0.110.0)
|
||||
gosu (1.4.6)
|
||||
i18n (1.14.4)
|
||||
concurrent-ruby (~> 1.0)
|
||||
mini_portile2 (2.8.1)
|
||||
nokogiri (1.14.0.rc1)
|
||||
mini_portile2 (~> 2.8.0)
|
||||
mini_portile2 (2.8.5)
|
||||
nokogiri (1.16.3)
|
||||
mini_portile2 (~> 2.8.2)
|
||||
racc (~> 1.4)
|
||||
ocra (1.3.11)
|
||||
opengl-bindings (1.6.13)
|
||||
racc (1.6.2)
|
||||
rake (13.0.6)
|
||||
opengl-bindings (1.6.14)
|
||||
racc (1.7.3)
|
||||
rake (13.2.1)
|
||||
rubyzip (2.3.2)
|
||||
|
||||
PLATFORMS
|
||||
@@ -54,4 +51,4 @@ DEPENDENCIES
|
||||
rubyzip
|
||||
|
||||
BUNDLED WITH
|
||||
2.4.1
|
||||
2.4.8
|
||||
|
||||
@@ -11,7 +11,7 @@ class IMICFPS
|
||||
end
|
||||
|
||||
def delta_time
|
||||
(Gosu.milliseconds - window.delta_time) / 1000.0
|
||||
window.delta_time
|
||||
end
|
||||
|
||||
def button_down?(id)
|
||||
|
||||
@@ -46,7 +46,7 @@ class IMICFPS
|
||||
def tick(delta_time)
|
||||
return unless @map
|
||||
|
||||
Publisher.instance.publish(:tick, delta_time * 1000.0)
|
||||
Publisher.instance.publish(:tick, delta_time)
|
||||
|
||||
@map.update
|
||||
@server&.update
|
||||
|
||||
@@ -33,7 +33,7 @@ class IMICFPS
|
||||
if window.config.get(:options, :fps)
|
||||
create_slot "FPS: #{Gosu.fps}"
|
||||
if window.config.get(:debug_options, :stats)
|
||||
create_slot "Frame time: #{(Gosu.milliseconds - window.delta_time).to_s.rjust(3, '0')}ms"
|
||||
create_slot "Frame time: #{(window.delta_time * 1000).round.to_s}ms"
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -23,10 +23,10 @@ class IMICFPS
|
||||
@camera = PerspectiveCamera.new(aspect_ratio: window.aspect_ratio, position: Vector.new(0, 1.5, 5), orientation: Vector.forward)
|
||||
@camera_controller = CameraController.new(camera: @camera, entity: nil, mode: :fpv)
|
||||
|
||||
label @manifest.name, text_size: 50, text_border: true, text_border_color: Gosu::Color::BLACK
|
||||
label @manifest.model, text_border: true, text_border_color: Gosu::Color::BLACK
|
||||
@camera_position = label "", text_border: true, text_border_color: Gosu::Color::BLACK
|
||||
@camera_orientation = label "", text_border: true, text_border_color: Gosu::Color::BLACK
|
||||
banner @manifest.name, text_size: 50, text_border: true, text_border_color: Gosu::Color::BLACK
|
||||
tagline @manifest.model, text_border: true, text_border_color: Gosu::Color::BLACK
|
||||
@camera_position = tagline "", text_border: true, text_border_color: Gosu::Color::BLACK
|
||||
@camera_orientation = tagline "", text_border: true, text_border_color: Gosu::Color::BLACK
|
||||
|
||||
button "Back" do
|
||||
pop_state
|
||||
|
||||
@@ -29,7 +29,7 @@ class IMICFPS
|
||||
|
||||
def update
|
||||
super
|
||||
Publisher.instance.publish(:tick, Gosu.milliseconds - window.delta_time)
|
||||
Publisher.instance.publish(:tick, window.delta_time)
|
||||
|
||||
control_editor
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ class IMICFPS
|
||||
button "New Map", width: 0.64
|
||||
end
|
||||
|
||||
label "Edit Map", width: 1.0, text_align: :center, text_size: 50
|
||||
banner "Edit Map", width: 1.0, text_align: :center, text_size: 50
|
||||
flow(width: 1.0, height: 1.0) do
|
||||
@maps.each do |map|
|
||||
button map.metadata.name do
|
||||
|
||||
@@ -25,30 +25,30 @@ class IMICFPS
|
||||
image "#{GAME_ROOT_PATH}/static/logo.png", width: 64
|
||||
|
||||
stack do
|
||||
label "[Clan TAG] Username", text_size: 36
|
||||
label "\"Title Badge Thingy\""
|
||||
tagline "[Clan TAG] Username", text_size: 36
|
||||
tagline "\"Title Badge Thingy\""
|
||||
end
|
||||
end
|
||||
|
||||
flow(margin_top: 4) do
|
||||
flow(margin_top: 4, width: 1.0) do
|
||||
stack do
|
||||
label "Kiil/Death Ratio"
|
||||
label "Kills"
|
||||
label "Deaths"
|
||||
label "Assists"
|
||||
label "Buildings Destroyed"
|
||||
label "Vehicles Destroyed"
|
||||
label "Repair Points"
|
||||
tagline "Kiil/Death Ratio"
|
||||
tagline "Kills"
|
||||
tagline "Deaths"
|
||||
tagline "Assists"
|
||||
tagline "Buildings Destroyed"
|
||||
tagline "Vehicles Destroyed"
|
||||
tagline "Repair Points"
|
||||
end
|
||||
|
||||
stack margin_left: 16 do
|
||||
label "0.75"
|
||||
label "21"
|
||||
label "28"
|
||||
label "14"
|
||||
label "111"
|
||||
label "41"
|
||||
label "4,451"
|
||||
tagline "0.75"
|
||||
tagline "21"
|
||||
tagline "28"
|
||||
tagline "14"
|
||||
tagline "111"
|
||||
tagline "41"
|
||||
tagline "4,451"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -55,29 +55,29 @@ class IMICFPS
|
||||
background i.even? ? 0x55000000 : 0x55ff5500
|
||||
|
||||
flow width: 0.1 do
|
||||
label game[:game_type], text_size: text_size, text_wrap: :none, font: i.zero? ? BOLD_SANS_FONT : SANS_FONT
|
||||
tagline game[:game_type], text_size: text_size, text_wrap: :none, font: i.zero? ? BOLD_SANS_FONT : SANS_FONT
|
||||
end
|
||||
flow width: 0.3 do
|
||||
label game[:host], text_size: text_size, text_wrap: :none, font: i.zero? ? BOLD_SANS_FONT : SANS_FONT
|
||||
tagline game[:host], text_size: text_size, text_wrap: :none, font: i.zero? ? BOLD_SANS_FONT : SANS_FONT
|
||||
end
|
||||
flow width: 0.3 do
|
||||
label game[:map], text_size: text_size, text_wrap: :none, font: i.zero? ? BOLD_SANS_FONT : SANS_FONT
|
||||
tagline game[:map], text_size: text_size, text_wrap: :none, font: i.zero? ? BOLD_SANS_FONT : SANS_FONT
|
||||
end
|
||||
flow width: 0.1 do
|
||||
label game[:players], text_size: text_size, text_wrap: :none, font: i.zero? ? BOLD_SANS_FONT : SANS_FONT
|
||||
tagline game[:players], text_size: text_size, text_wrap: :none, font: i.zero? ? BOLD_SANS_FONT : SANS_FONT
|
||||
end
|
||||
flow width: 0.1 do
|
||||
label game[:ping], text_size: text_size, text_wrap: :none, font: i.zero? ? BOLD_SANS_FONT : SANS_FONT
|
||||
tagline game[:ping], text_size: text_size, text_wrap: :none, font: i.zero? ? BOLD_SANS_FONT : SANS_FONT
|
||||
end
|
||||
flow width: 0.1 do
|
||||
label game[:source], text_size: text_size, text_wrap: :none, font: i.zero? ? BOLD_SANS_FONT : SANS_FONT
|
||||
tagline game[:source], text_size: text_size, text_wrap: :none, font: i.zero? ? BOLD_SANS_FONT : SANS_FONT
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
flow width: 1.0, height: 0.25 do
|
||||
label "Name"
|
||||
tagline "Name"
|
||||
name = edit_line "", margin_right: 20
|
||||
button "Join", width: 0.25 do
|
||||
pp name.value
|
||||
|
||||
@@ -93,16 +93,16 @@ class IMICFPS
|
||||
end
|
||||
|
||||
def page_display
|
||||
label "Display", text_size: 50
|
||||
banner "Display", text_size: 50
|
||||
|
||||
stack(width: 1.0, height: 128) do
|
||||
flow(width: 1.0) do
|
||||
label "Width", width: 96
|
||||
tagline "Width", width: 96
|
||||
edit_line window.width.to_s, fill: true
|
||||
end
|
||||
|
||||
flow(width: 1.0) do
|
||||
label "Height", width: 96
|
||||
tagline "Height", width: 96
|
||||
edit_line window.height.to_s, fill: true
|
||||
end
|
||||
end
|
||||
@@ -111,36 +111,36 @@ class IMICFPS
|
||||
|
||||
stack(width: 1.0, height: 128, margin_top: 20) do
|
||||
flow(width: 1.0, fill: true) do
|
||||
label "Gamma Correction", width: 256
|
||||
tagline "Gamma Correction", width: 256
|
||||
@display_gamma_correction = slider range: 0.0..1.0, value: 0.5, fill: true
|
||||
@display_gamma_correction.subscribe(:changed) do |_sender, value|
|
||||
@display_gamma_correction_label.value = value.round(1).to_s
|
||||
end
|
||||
@display_gamma_correction_label = label "0.0"
|
||||
@display_gamma_correction_label = tagline "0.0"
|
||||
end
|
||||
|
||||
flow(width: 1.0, fill: true) do
|
||||
label "Brightness", width: 256
|
||||
tagline "Brightness", width: 256
|
||||
@display_brightness = slider range: 0.0..1.0, value: 0.5, fill: true
|
||||
@display_brightness.subscribe(:changed) do |_sender, value|
|
||||
@display_brightness_label.value = value.round(1).to_s
|
||||
end
|
||||
@display_brightness_label = label "0.0"
|
||||
@display_brightness_label = tagline "0.0"
|
||||
end
|
||||
|
||||
flow(width: 1.0, fill: true) do
|
||||
label "Contrast", width: 256
|
||||
tagline "Contrast", width: 256
|
||||
@display_contrast = slider range: 0.0..1.0, value: 0.5, fill: true
|
||||
@display_contrast.subscribe(:changed) do |_sender, value|
|
||||
@display_contrast_label.value = value.round(1).to_s
|
||||
end
|
||||
@display_contrast_label = label "0.0"
|
||||
@display_contrast_label = tagline "0.0"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def page_audio
|
||||
label "Audio", text_size: 50
|
||||
tagline "Audio", text_size: 50
|
||||
volumes = %i[master sound_effects music dialogue]
|
||||
|
||||
stack(width: 1.0, height: 48 * volumes.count) do
|
||||
@@ -148,7 +148,7 @@ class IMICFPS
|
||||
config_value = window.config.get(:options, :audio, :"volume_#{volume}")
|
||||
|
||||
flow(width: 1.0, fill: true, margin_bottom: 10) do
|
||||
label volume.to_s.split("_").map(&:capitalize).join(" "), width: 172
|
||||
tagline volume.to_s.split("_").map(&:capitalize).join(" "), width: 172
|
||||
|
||||
instance_variable_set(:"@volume_#{volume}", slider(range: 0.0..1.0, value: config_value, fill: true))
|
||||
instance_variable_get(:"@volume_#{volume}").subscribe(:changed) do |_sender, value|
|
||||
@@ -156,18 +156,18 @@ class IMICFPS
|
||||
window.config[:options, :audio, :"volume_#{volume}"] = value
|
||||
end
|
||||
|
||||
instance_variable_set(:"@volume_#{volume}_label", label(format("%03.2f%%", config_value * 100.0), width: 96, text_align: :right))
|
||||
instance_variable_set(:"@volume_#{volume}_label", tagline(format("%03.2f%%", config_value * 100.0), width: 96, text_align: :right))
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def page_controls
|
||||
label "Controls", text_size: 50
|
||||
tagline "Controls", text_size: 50
|
||||
|
||||
InputMapper.keymap.each do |key, values|
|
||||
flow(width: 1.0, height: 64) do
|
||||
label key.to_s, width: 0.5, max_width: 312
|
||||
tagline key.to_s, width: 0.5, max_width: 312
|
||||
|
||||
[values].flatten.each do |value|
|
||||
unless (name = Gosu.button_name(value))
|
||||
@@ -182,21 +182,21 @@ class IMICFPS
|
||||
end
|
||||
|
||||
def page_graphics
|
||||
label "Graphics", text_size: 50
|
||||
tagline "Graphics", text_size: 50
|
||||
|
||||
check_box "V-Sync (Not Disableable, Yet.)", checked: true, enabled: false, width: 1.0
|
||||
|
||||
flow(width: 1.0, height: 64) do
|
||||
label "Field of View", width: 128
|
||||
tagline "Field of View", width: 128
|
||||
@fov = slider range: 70.0..110.0, fill: true
|
||||
@fov.subscribe(:changed) do |_sender, value|
|
||||
@fov_label.value = value.round.to_s
|
||||
end
|
||||
@fov_label = label "90.0"
|
||||
@fov_label = tagline "90.0"
|
||||
end
|
||||
|
||||
flow(width: 1.0, height: 64) do
|
||||
label "Detail", width: 128
|
||||
tagline "Detail", width: 128
|
||||
list_box items: %i[high medium low], fill: true
|
||||
end
|
||||
|
||||
@@ -207,31 +207,31 @@ class IMICFPS
|
||||
|
||||
stack(width: 1.0, height: 64 * 7) do
|
||||
flow(width: 1.0, height: 64) do
|
||||
label "Geometry Detail", width: 312
|
||||
tagline "Geometry Detail", width: 312
|
||||
list_box items: %i[high medium low], fill: true
|
||||
end
|
||||
flow(width: 1.0, height: 64) do
|
||||
label "Shadow Detail", width: 312
|
||||
tagline "Shadow Detail", width: 312
|
||||
list_box items: %i[high medium low off], fill: true
|
||||
end
|
||||
flow(width: 1.0, height: 64) do
|
||||
label "Texture Detail", width: 312
|
||||
tagline "Texture Detail", width: 312
|
||||
list_box items: %i[high medium low], fill: true
|
||||
end
|
||||
flow(width: 1.0, height: 64) do
|
||||
label "Particle Detail", width: 312
|
||||
tagline "Particle Detail", width: 312
|
||||
list_box items: %i[high medium low off], fill: true
|
||||
end
|
||||
flow(width: 1.0, height: 64) do
|
||||
label "Surface Effect Detail", width: 312
|
||||
tagline "Surface Effect Detail", width: 312
|
||||
list_box items: %i[high medium low], fill: true
|
||||
end
|
||||
flow(width: 1.0, height: 64) do
|
||||
label "Lighting Mode", width: 312
|
||||
tagline "Lighting Mode", width: 312
|
||||
list_box items: %i[per_pixel per_vertex], fill: true
|
||||
end
|
||||
flow(width: 1.0, height: 64) do
|
||||
label "Texture Filtering", width: 312
|
||||
tagline "Texture Filtering", width: 312
|
||||
list_box items: [:none], fill: true
|
||||
end
|
||||
end
|
||||
@@ -244,10 +244,10 @@ class IMICFPS
|
||||
end
|
||||
|
||||
def page_multiplayer
|
||||
label "Multiplayer", text_size: 50
|
||||
tagline "Multiplayer", text_size: 50
|
||||
|
||||
flow(width: 1.0, height: 64) do
|
||||
label "Player Name", width: 172
|
||||
tagline "Player Name", width: 172
|
||||
edit_line "player-#{SecureRandom.hex(2)}", fill: true
|
||||
end
|
||||
|
||||
|
||||
@@ -37,8 +37,6 @@ class IMICFPS
|
||||
end
|
||||
|
||||
push_state(CyberarmEngine::IntroState, forward: Boot)
|
||||
|
||||
@delta_time = Gosu.milliseconds
|
||||
end
|
||||
|
||||
def input_hijack=(hijacker)
|
||||
@@ -75,8 +73,6 @@ class IMICFPS
|
||||
@console.update if @show_console
|
||||
@overlay.update
|
||||
SoundManager.update
|
||||
|
||||
@delta_time = Gosu.milliseconds
|
||||
end
|
||||
|
||||
def close
|
||||
|
||||
Reference in New Issue
Block a user