Stub NetworkManager, remove pixel test image, added icon for releasy

This commit is contained in:
2020-05-04 09:59:01 -05:00
parent d524c21332
commit 06fb2c0e43
6 changed files with 36 additions and 5 deletions

View File

@@ -12,7 +12,7 @@ Releasy::Project.new do
verbose
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.
add_package :exe # Windows self-extracting archive.
end

View File

@@ -1,5 +1,8 @@
require "gosu"
require_relative "lib/objects/text"
begin
require_relative "../cyberarm_engine/lib/cyberarm_engine"
rescue LoadError
require "cyberarm_engine"
end
class Window < Gosu::Window
def initialize
@@ -9,8 +12,8 @@ class Window < Gosu::Window
@slope = 250
@color_step = 10
@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)
@singleplayer = Text.new("Singleplayer", color: Gosu::Color.rgb(0,127,127), size: 50, x: 0, y: 150, 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 = CyberarmEngine::Text.new("Singleplayer", color: Gosu::Color.rgb(0,127,127), size: 50, x: 0, y: 150, alignment: :center)
end
def draw

View File

@@ -3,10 +3,12 @@ require "yaml"
require "json"
require "abbrev"
require "time"
require "socket"
require "opengl"
require "glu"
require "nokogiri"
require "async/websocket"
begin
require_relative "../cyberarm_engine/lib/cyberarm_engine"

View File

@@ -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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 162 B

BIN
static/icon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB