mirror of
https://github.com/cyberarm/i-mic-fps.git
synced 2025-12-15 15:42:35 +00:00
Stub NetworkManager, remove pixel test image, added icon for releasy
This commit is contained in:
2
Rakefile
2
Rakefile
@@ -12,7 +12,7 @@ Releasy::Project.new do
|
|||||||
verbose
|
verbose
|
||||||
|
|
||||||
add_build :windows_folder do
|
add_build :windows_folder do
|
||||||
# icon "assets/icon.ico"
|
icon "static/icon.ico"
|
||||||
executable_type :console # Assuming you don't want it to run with a console window.
|
executable_type :console # Assuming you don't want it to run with a console window.
|
||||||
add_package :exe # Windows self-extracting archive.
|
add_package :exe # Windows self-extracting archive.
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
require "gosu"
|
begin
|
||||||
require_relative "lib/objects/text"
|
require_relative "../cyberarm_engine/lib/cyberarm_engine"
|
||||||
|
rescue LoadError
|
||||||
|
require "cyberarm_engine"
|
||||||
|
end
|
||||||
|
|
||||||
class Window < Gosu::Window
|
class Window < Gosu::Window
|
||||||
def initialize
|
def initialize
|
||||||
@@ -9,8 +12,8 @@ class Window < Gosu::Window
|
|||||||
@slope = 250
|
@slope = 250
|
||||||
@color_step = 10
|
@color_step = 10
|
||||||
@base_color = Gosu::Color.rgb(255, 127, 0)
|
@base_color = Gosu::Color.rgb(255, 127, 0)
|
||||||
@title = Text.new("I-MIC FPS", color: Gosu::Color.rgb(255,127,0), size: 100, x: 0, y: 15, alignment: :center)
|
@title = CyberarmEngine::Text.new("I-MIC FPS", color: Gosu::Color.rgb(255,127,0), size: 100, x: 0, y: 15, alignment: :center)
|
||||||
@singleplayer = Text.new("Singleplayer", color: Gosu::Color.rgb(0,127,127), size: 50, x: 0, y: 150, alignment: :center)
|
@singleplayer = CyberarmEngine::Text.new("Singleplayer", color: Gosu::Color.rgb(0,127,127), size: 50, x: 0, y: 150, alignment: :center)
|
||||||
end
|
end
|
||||||
|
|
||||||
def draw
|
def draw
|
||||||
|
|||||||
@@ -3,10 +3,12 @@ require "yaml"
|
|||||||
require "json"
|
require "json"
|
||||||
require "abbrev"
|
require "abbrev"
|
||||||
require "time"
|
require "time"
|
||||||
|
require "socket"
|
||||||
|
|
||||||
require "opengl"
|
require "opengl"
|
||||||
require "glu"
|
require "glu"
|
||||||
require "nokogiri"
|
require "nokogiri"
|
||||||
|
require "async/websocket"
|
||||||
|
|
||||||
begin
|
begin
|
||||||
require_relative "../cyberarm_engine/lib/cyberarm_engine"
|
require_relative "../cyberarm_engine/lib/cyberarm_engine"
|
||||||
|
|||||||
@@ -0,0 +1,26 @@
|
|||||||
|
class IMICFPS
|
||||||
|
class NetworkManager
|
||||||
|
MULTICAST_ADDRESS = "224.0.0.1"
|
||||||
|
MULTICAST_PORT = 30_000
|
||||||
|
|
||||||
|
REMOTE_GAMEHUB = "i-mic.rubyclan.org"
|
||||||
|
REMOTE_GAMEHUB_PORT = 98765
|
||||||
|
|
||||||
|
DEFAULT_SERVER_HOST = "0.0.0.0"
|
||||||
|
DEFAULT_SERVER_PORT = 56789
|
||||||
|
DEFAULT_SERVER_QUERY_PORT = 28900
|
||||||
|
def initialize
|
||||||
|
end
|
||||||
|
|
||||||
|
# https://github.com/jpignata/blog/blob/master/articles/multicast-in-ruby.md
|
||||||
|
def broadcast_lan_lobby
|
||||||
|
socket = UDPSocket.open
|
||||||
|
socket.setsockopt(:IPPROTO_IP, :IP_MULTICAST_TTL, 1)
|
||||||
|
socket.send("IMICFPS_LAN_LOBBY", 0, MULTICAST_ADDRESS, MULTICAST_PORT)
|
||||||
|
socket.close
|
||||||
|
end
|
||||||
|
|
||||||
|
def handle_lan_multicast
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
BIN
pixel_test.png
BIN
pixel_test.png
Binary file not shown.
|
Before Width: | Height: | Size: 162 B |
BIN
static/icon.ico
Normal file
BIN
static/icon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 19 KiB |
Reference in New Issue
Block a user