rgame 0.4.0-x86_64-linux-gnu
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/CHANGELOG.md +251 -0
- data/LICENSE +26 -0
- data/README.md +325 -0
- data/docs/api/README.md +224 -0
- data/docs/api/app.md +249 -0
- data/docs/api/assets.md +463 -0
- data/docs/api/audio.md +249 -0
- data/docs/api/cli.md +259 -0
- data/docs/api/components.md +1112 -0
- data/docs/api/drawing.md +398 -0
- data/docs/api/examples.md +263 -0
- data/docs/api/game.md +219 -0
- data/docs/api/images.md +118 -0
- data/docs/api/input.md +476 -0
- data/docs/api/internals.md +289 -0
- data/docs/api/localization.md +285 -0
- data/docs/api/scene_graph.md +539 -0
- data/docs/api/signals.md +147 -0
- data/docs/api/systems.md +231 -0
- data/docs/api/text.md +133 -0
- data/docs/api/tile_maps.md +237 -0
- data/docs/api/toolbox.md +493 -0
- data/docs/api/ui.md +927 -0
- data/docs/api/values.md +316 -0
- data/examples/assets/README.md +322 -0
- data/examples/assets/blip.ogg +0 -0
- data/examples/assets/glyphs.json +5 -0
- data/examples/assets/glyphs.png +0 -0
- data/examples/assets/hero.json +12 -0
- data/examples/assets/hero.png +0 -0
- data/examples/assets/icons.json +13 -0
- data/examples/assets/icons.png +0 -0
- data/examples/assets/music.ogg +0 -0
- data/examples/assets/skills.json +10 -0
- data/examples/assets/skills.png +0 -0
- data/examples/assets/tileset.png +0 -0
- data/examples/assets/tileset.tsx +65 -0
- data/examples/assets/town.tmx +26 -0
- data/examples/assets/ui.json +11 -0
- data/examples/assets/ui.png +0 -0
- data/examples/collision/locales/en.yml +8 -0
- data/examples/collision/main.rb +316 -0
- data/examples/collision_tiles/locales/en.yml +9 -0
- data/examples/collision_tiles/main.rb +274 -0
- data/examples/fullscreen/locales/en.yml +10 -0
- data/examples/fullscreen/main.rb +216 -0
- data/examples/game_menu/locales/en.yml +8 -0
- data/examples/game_menu/main.rb +170 -0
- data/examples/input_glyphs/locales/en.yml +14 -0
- data/examples/input_glyphs/main.rb +213 -0
- data/examples/jump_topdown/locales/en.yml +9 -0
- data/examples/jump_topdown/main.rb +178 -0
- data/examples/localization/locales/de.yml +12 -0
- data/examples/localization/locales/en.yml +13 -0
- data/examples/localization/main.rb +158 -0
- data/examples/menu_navigation/locales/en.yml +23 -0
- data/examples/menu_navigation/main.rb +365 -0
- data/examples/music/locales/en.yml +7 -0
- data/examples/music/main.rb +134 -0
- data/examples/pathfinding/locales/en.yml +17 -0
- data/examples/pathfinding/main.rb +298 -0
- data/examples/pooling/locales/en.yml +7 -0
- data/examples/pooling/main.rb +259 -0
- data/examples/quick_wheel/locales/en.yml +16 -0
- data/examples/quick_wheel/main.rb +184 -0
- data/examples/radial_menu/locales/en.yml +16 -0
- data/examples/radial_menu/main.rb +184 -0
- data/examples/save_load/locales/en.yml +11 -0
- data/examples/save_load/main.rb +207 -0
- data/examples/save_load_ids/locales/en.yml +11 -0
- data/examples/save_load_ids/main.rb +322 -0
- data/examples/scroll_map/locales/en.yml +4 -0
- data/examples/scroll_map/main.rb +140 -0
- data/examples/signals/locales/en.yml +6 -0
- data/examples/signals/main.rb +278 -0
- data/examples/skill_bar/locales/en.yml +14 -0
- data/examples/skill_bar/main.rb +159 -0
- data/examples/sound/locales/en.yml +6 -0
- data/examples/sound/main.rb +122 -0
- data/examples/split_screen/locales/en.yml +9 -0
- data/examples/split_screen/main.rb +304 -0
- data/examples/sprite/locales/en.yml +8 -0
- data/examples/sprite/main.rb +180 -0
- data/examples/timer/locales/en.yml +12 -0
- data/examples/timer/main.rb +273 -0
- data/examples/velocity/locales/en.yml +6 -0
- data/examples/velocity/main.rb +196 -0
- data/examples/walk/locales/en.yml +4 -0
- data/examples/walk/main.rb +99 -0
- data/exe/rgame +9 -0
- data/lib/rgame/boot.rb +3 -0
- data/lib/rgame/cli/new_project.rb +139 -0
- data/lib/rgame/cli/templates/Gemfile.tt +23 -0
- data/lib/rgame/cli/templates/README.md.tt +93 -0
- data/lib/rgame/cli/templates/Rakefile.tt +9 -0
- data/lib/rgame/cli/templates/assets/locales/en.yml.tt +10 -0
- data/lib/rgame/cli/templates/game.rb.tt +23 -0
- data/lib/rgame/cli/templates/gitignore.tt +12 -0
- data/lib/rgame/cli/templates/main.rb.tt +11 -0
- data/lib/rgame/cli/templates/nodes/root.rb.tt +24 -0
- data/lib/rgame/cli/templates/rspec.tt +2 -0
- data/lib/rgame/cli/templates/rubocop.yml.tt +75 -0
- data/lib/rgame/cli/templates/ruby-version.tt +1 -0
- data/lib/rgame/cli/templates/spec/locales_spec.rb.tt +18 -0
- data/lib/rgame/cli/templates/spec/nodes/root_spec.rb.tt +18 -0
- data/lib/rgame/cli/templates/spec/spec_helper.rb.tt +37 -0
- data/lib/rgame/cli.rb +66 -0
- data/lib/rgame/core/app.rb +46 -0
- data/lib/rgame/core/asset_manager.rb +206 -0
- data/lib/rgame/core/audio.rb +145 -0
- data/lib/rgame/core/font.rb +46 -0
- data/lib/rgame/core/gamepad.rb +55 -0
- data/lib/rgame/core/image.rb +55 -0
- data/lib/rgame/core/input.rb +71 -0
- data/lib/rgame/core/locale.rb +22 -0
- data/lib/rgame/core/nine_slice.rb +142 -0
- data/lib/rgame/core/recording.rb +54 -0
- data/lib/rgame/core/renderer.rb +354 -0
- data/lib/rgame/core/sprite_sheet.rb +105 -0
- data/lib/rgame/core/tile_map_renderer.rb +172 -0
- data/lib/rgame/core/ui_atlas.rb +101 -0
- data/lib/rgame/core/virtual_gamepad.rb +26 -0
- data/lib/rgame/core.rb +18 -0
- data/lib/rgame/core_ext.so +0 -0
- data/lib/rgame/engine/actor_blockers.rb +131 -0
- data/lib/rgame/engine/animation_set.rb +50 -0
- data/lib/rgame/engine/animator.rb +44 -0
- data/lib/rgame/engine/audio_bus.rb +24 -0
- data/lib/rgame/engine/audio_director.rb +59 -0
- data/lib/rgame/engine/bounds_blockers.rb +74 -0
- data/lib/rgame/engine/camera.rb +78 -0
- data/lib/rgame/engine/circle_collider.rb +34 -0
- data/lib/rgame/engine/collision_box.rb +59 -0
- data/lib/rgame/engine/collision_system.rb +132 -0
- data/lib/rgame/engine/component.rb +64 -0
- data/lib/rgame/engine/components/action_trigger.rb +40 -0
- data/lib/rgame/engine/components/animated_sprite.rb +71 -0
- data/lib/rgame/engine/components/box_collider.rb +99 -0
- data/lib/rgame/engine/components/camera_follow.rb +45 -0
- data/lib/rgame/engine/components/character_body.rb +50 -0
- data/lib/rgame/engine/components/circle_collider.rb +80 -0
- data/lib/rgame/engine/components/collision_world.rb +231 -0
- data/lib/rgame/engine/components/despawn_offscreen.rb +42 -0
- data/lib/rgame/engine/components/feet_collider.rb +61 -0
- data/lib/rgame/engine/components/hop.rb +76 -0
- data/lib/rgame/engine/components/identity.rb +73 -0
- data/lib/rgame/engine/components/mover.rb +285 -0
- data/lib/rgame/engine/components/navigator.rb +145 -0
- data/lib/rgame/engine/components/path_follow.rb +176 -0
- data/lib/rgame/engine/components/player_controller.rb +27 -0
- data/lib/rgame/engine/components/pool.rb +53 -0
- data/lib/rgame/engine/components/screen_wrap.rb +49 -0
- data/lib/rgame/engine/components/sprite.rb +47 -0
- data/lib/rgame/engine/components/targeting.rb +52 -0
- data/lib/rgame/engine/components/thrust_controller.rb +65 -0
- data/lib/rgame/engine/components/tile_world.rb +109 -0
- data/lib/rgame/engine/components/timer.rb +75 -0
- data/lib/rgame/engine/components/velocity.rb +43 -0
- data/lib/rgame/engine/components/wander_controller.rb +64 -0
- data/lib/rgame/engine/components/world.rb +133 -0
- data/lib/rgame/engine/contact_set.rb +74 -0
- data/lib/rgame/engine/culling.rb +45 -0
- data/lib/rgame/engine/debug_overlay.rb +111 -0
- data/lib/rgame/engine/i18n/plural.rb +45 -0
- data/lib/rgame/engine/i18n/plural_rules.rb +82 -0
- data/lib/rgame/engine/i18n/template.rb +59 -0
- data/lib/rgame/engine/i18n.rb +322 -0
- data/lib/rgame/engine/input/action_mapper.rb +100 -0
- data/lib/rgame/engine/input/actions.rb +92 -0
- data/lib/rgame/engine/input/input_map.rb +196 -0
- data/lib/rgame/engine/layout.rb +82 -0
- data/lib/rgame/engine/nav_grid.rb +87 -0
- data/lib/rgame/engine/node2d.rb +555 -0
- data/lib/rgame/engine/path.rb +76 -0
- data/lib/rgame/engine/player.rb +69 -0
- data/lib/rgame/engine/player_layer.rb +70 -0
- data/lib/rgame/engine/players.rb +205 -0
- data/lib/rgame/engine/pool.rb +51 -0
- data/lib/rgame/engine/presentation.rb +171 -0
- data/lib/rgame/engine/scene/scene_stack.rb +87 -0
- data/lib/rgame/engine/sealed_privates.rb +54 -0
- data/lib/rgame/engine/signal.rb +75 -0
- data/lib/rgame/engine/spatial_hash.rb +116 -0
- data/lib/rgame/engine/text.rb +194 -0
- data/lib/rgame/engine/tile_blockers.rb +63 -0
- data/lib/rgame/engine/tile_map.rb +147 -0
- data/lib/rgame/engine/tile_map_layer.rb +82 -0
- data/lib/rgame/engine/tileset.rb +99 -0
- data/lib/rgame/engine/timer.rb +51 -0
- data/lib/rgame/engine/ui/button.rb +248 -0
- data/lib/rgame/engine/ui/column.rb +20 -0
- data/lib/rgame/engine/ui/icon_button.rb +93 -0
- data/lib/rgame/engine/ui/menu.rb +290 -0
- data/lib/rgame/engine/ui/navigation.rb +57 -0
- data/lib/rgame/engine/ui/nine_slice_style.rb +50 -0
- data/lib/rgame/engine/ui/option_button.rb +163 -0
- data/lib/rgame/engine/ui/panel_button.rb +32 -0
- data/lib/rgame/engine/ui/panel_menu.rb +36 -0
- data/lib/rgame/engine/ui/pointing.rb +146 -0
- data/lib/rgame/engine/ui/radial_menu.rb +85 -0
- data/lib/rgame/engine/ui/ring.rb +55 -0
- data/lib/rgame/engine/ui/row.rb +21 -0
- data/lib/rgame/engine/ui/shape_style.rb +102 -0
- data/lib/rgame/engine/ui/stack.rb +58 -0
- data/lib/rgame/engine/ui/stepping.rb +93 -0
- data/lib/rgame/engine/ui/text_button.rb +59 -0
- data/lib/rgame/engine/view.rb +76 -0
- data/lib/rgame/engine/viewports.rb +171 -0
- data/lib/rgame/engine/world_view.rb +71 -0
- data/lib/rgame/engine.rb +86 -0
- data/lib/rgame/fonts/LiberationSans-Regular.ttf +0 -0
- data/lib/rgame/fonts/OFL.txt +102 -0
- data/lib/rgame/game.rb +271 -0
- data/lib/rgame/rubocop/cop/game/draw_in_local_space.rb +103 -0
- data/lib/rgame/rubocop/cop/game/hot_path.rb +36 -0
- data/lib/rgame/rubocop/cop/game/layer_boundary.rb +43 -0
- data/lib/rgame/rubocop/cop/game/no_core_in_engine_layer.rb +100 -0
- data/lib/rgame/rubocop/cop/game/no_engine_in_core_layer.rb +84 -0
- data/lib/rgame/rubocop/cop/game/no_interpolation_in_hot_path.rb +50 -0
- data/lib/rgame/rubocop/cop/game/no_literal_text.rb +41 -0
- data/lib/rgame/rubocop/cop/game/no_needless_allocation.rb +112 -0
- data/lib/rgame/rubocop/default.yml +39 -0
- data/lib/rgame/rubocop/plugin.rb +45 -0
- data/lib/rgame/rubocop.rb +11 -0
- data/lib/rgame/util/color.rb +23 -0
- data/lib/rgame/util/controls.rb +169 -0
- data/lib/rgame/util/route_search.rb +27 -0
- data/lib/rgame/util/save_file.rb +107 -0
- data/lib/rgame/util/solid_grid.rb +37 -0
- data/lib/rgame/util/tensor.rb +3 -0
- data/lib/rgame/util/tile_sweep.rb +36 -0
- data/lib/rgame/util/z.rb +123 -0
- data/lib/rgame/util.rb +10 -0
- data/lib/rgame/util_ext.so +0 -0
- data/lib/rgame/version.rb +12 -0
- data/lib/rgame.rb +5 -0
- data/licenses/SDL2/LICENSE.txt +18 -0
- metadata +309 -0
data/lib/rgame/util/z.rb
ADDED
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module RGame
|
|
4
|
+
module Util
|
|
5
|
+
# The vocabulary of draw order: which band a thing is drawn in, and how the
|
|
6
|
+
# single number the renderer sorts on is built out of one.
|
|
7
|
+
#
|
|
8
|
+
# RGame::Util::Z::BANDS # => [:world, :hud, :overlay, :debug]
|
|
9
|
+
# RGame::Util::Z.base(:hud, 3) # the fourth slot handed out in the HUD band
|
|
10
|
+
#
|
|
11
|
+
# These are values — plain Symbols and Integers with no window, GPU or OS
|
|
12
|
+
# handle behind them — so they live here rather than in Core, and both sides
|
|
13
|
+
# of the line may name them. `RGame::Engine` decides which band a node is
|
|
14
|
+
# in; `RGame::Core::Renderer` turns that into a z. Neither could reach the
|
|
15
|
+
# other's spelling of it, and the vocabulary is exactly what they have to
|
|
16
|
+
# agree on. Same reasoning as RGame::Util::Controls.
|
|
17
|
+
#
|
|
18
|
+
# ## Draw order is tree order, not a number a caller picks
|
|
19
|
+
#
|
|
20
|
+
# A frame's order is decided in three steps, coarsest first:
|
|
21
|
+
#
|
|
22
|
+
# 1. **The band.** Structural and inherited: everything in `:world` is under
|
|
23
|
+
# everything in `:hud`, whatever either drew. Bands are 2**40 apart, so
|
|
24
|
+
# no arithmetic below can carry one into the next.
|
|
25
|
+
# 2. **The slot.** The scene graph is walked depth-first with siblings in
|
|
26
|
+
# `z` order, and each node takes the next slot in its band as it is
|
|
27
|
+
# reached. Because the walk descends fully before moving on, a node's
|
|
28
|
+
# subtree occupies one contiguous run of slots — which is what makes a
|
|
29
|
+
# subtree atomic, and what stops some of a node's children landing in
|
|
30
|
+
# front of a sibling the node itself is behind.
|
|
31
|
+
# 3. **The offset.** `Z_MIN..Z_MAX` inside the node's own slot, and the only
|
|
32
|
+
# part a `z:` argument on a drawing call touches. It orders a node's
|
|
33
|
+
# components against each other and its own draw calls against each
|
|
34
|
+
# other, and it cannot reach the next node, let alone the next band.
|
|
35
|
+
#
|
|
36
|
+
# So a node's `z` is **only ever compared to its siblings'**. Its magnitude
|
|
37
|
+
# means nothing: `z: 1` and `z: 1_000_000` behave identically if they are
|
|
38
|
+
# the only two children, and negatives are ordinary.
|
|
39
|
+
#
|
|
40
|
+
# ## The arithmetic is exact
|
|
41
|
+
#
|
|
42
|
+
# Every value here is an integer below 2**42, and the `double` the draw
|
|
43
|
+
# queue sorts on is exact below 2**53. Two different slots can therefore
|
|
44
|
+
# never compare equal by rounding — which would show up as two sprites
|
|
45
|
+
# swapping places between frames, and would be very hard to see as a
|
|
46
|
+
# precision problem.
|
|
47
|
+
module Z
|
|
48
|
+
SLOT = 1024
|
|
49
|
+
HALF = SLOT / 2
|
|
50
|
+
|
|
51
|
+
Z_MIN = -HALF
|
|
52
|
+
Z_MAX = HALF - 1
|
|
53
|
+
|
|
54
|
+
STRIDE = 1 << 40
|
|
55
|
+
SLOTS_PER_BAND = STRIDE / SLOT
|
|
56
|
+
|
|
57
|
+
BANDS = %i[world hud overlay debug].freeze
|
|
58
|
+
DEFAULT = :world
|
|
59
|
+
|
|
60
|
+
INDICES = BANDS.each_with_index.to_h.freeze
|
|
61
|
+
|
|
62
|
+
def self.band?(band) = INDICES.key?(band)
|
|
63
|
+
|
|
64
|
+
# Raises unless `band` names one. Called where a band is *set* rather than
|
|
65
|
+
# where it is used, so a typo surfaces at assignment with the list in the
|
|
66
|
+
# message instead of as a KeyError from inside a draw.
|
|
67
|
+
#
|
|
68
|
+
# @api private
|
|
69
|
+
def self.band!(band)
|
|
70
|
+
return band if band?(band)
|
|
71
|
+
|
|
72
|
+
raise ArgumentError, "unknown z band #{band.inspect}; expected one of #{BANDS.inspect}"
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
# Which band this is, 0-based and back to front. This is what a renderer's
|
|
76
|
+
# slot counters are keyed on, so it is also where a bad band is caught.
|
|
77
|
+
def self.index(band)
|
|
78
|
+
INDICES[band] || band!(band)
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
# The z base of the `slot_index`-th slot in the band with that index.
|
|
82
|
+
# Offsets are measured from the middle of the slot, so Z_MIN..Z_MAX is
|
|
83
|
+
# symmetric — a node can draw behind its own sprite as easily as in front.
|
|
84
|
+
#
|
|
85
|
+
# Takes the band's *index* rather than its name because a renderer already
|
|
86
|
+
# has the index in hand (it counts slots per index), and looking the same
|
|
87
|
+
# Symbol up twice per node per frame is work with nothing to show for it.
|
|
88
|
+
#
|
|
89
|
+
# @api private
|
|
90
|
+
# hot-path
|
|
91
|
+
def self.slot_base(band_index, slot_index)
|
|
92
|
+
if slot_index >= SLOTS_PER_BAND
|
|
93
|
+
raise RangeError,
|
|
94
|
+
"z band #{BANDS[band_index].inspect} is full at " \
|
|
95
|
+
"#{SLOTS_PER_BAND} slots per frame"
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
(band_index * STRIDE) + (slot_index * SLOT) + HALF
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# The same thing by name, for a caller that has one rather than an index.
|
|
102
|
+
def self.base(band, slot_index) = slot_base(index(band), slot_index)
|
|
103
|
+
|
|
104
|
+
# Checks a `z:` argument and returns it. Drawing methods run this instead
|
|
105
|
+
# of trusting the caller, because the whole guarantee — that a node cannot
|
|
106
|
+
# draw outside its band — rests on the offset staying inside one slot.
|
|
107
|
+
# A stale global z (the bands used to be Integers a caller passed) lands
|
|
108
|
+
# here and says so rather than sorting somewhere surprising.
|
|
109
|
+
# hot-path
|
|
110
|
+
def self.offset(z)
|
|
111
|
+
raise TypeError, "no implicit conversion of #{z.class} into Float" unless z.is_a?(Numeric)
|
|
112
|
+
|
|
113
|
+
unless z.between?(Z_MIN, Z_MAX)
|
|
114
|
+
raise ArgumentError,
|
|
115
|
+
"z: #{z} is outside a node's slot (#{Z_MIN}..#{Z_MAX}); a `z:` orders one " \
|
|
116
|
+
'node\'s own drawing, and the band comes from the tree'
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
z
|
|
120
|
+
end
|
|
121
|
+
end
|
|
122
|
+
end
|
|
123
|
+
end
|
data/lib/rgame/util.rb
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require_relative 'util/color'
|
|
4
|
+
require_relative 'util/controls'
|
|
5
|
+
require_relative 'util/route_search'
|
|
6
|
+
require_relative 'util/save_file'
|
|
7
|
+
require_relative 'util/solid_grid'
|
|
8
|
+
require_relative 'util/tensor'
|
|
9
|
+
require_relative 'util/tile_sweep'
|
|
10
|
+
require_relative 'util/z'
|
|
Binary file
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# The gem's version, and deliberately nothing else.
|
|
4
|
+
#
|
|
5
|
+
# rgame.gemspec loads this file directly to fill in `spec.version`, which
|
|
6
|
+
# happens before either extension is compiled — so this file must never require
|
|
7
|
+
# anything that reaches for `rgame/util_ext` or `rgame/core_ext`. Reopening the
|
|
8
|
+
# module here is enough; the extensions define `RGame` too, and doing so twice
|
|
9
|
+
# is harmless.
|
|
10
|
+
module RGame
|
|
11
|
+
VERSION = '0.4.0'
|
|
12
|
+
end
|
data/lib/rgame.rb
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
|
2
|
+
|
|
3
|
+
This software is provided 'as-is', without any express or implied
|
|
4
|
+
warranty. In no event will the authors be held liable for any damages
|
|
5
|
+
arising from the use of this software.
|
|
6
|
+
|
|
7
|
+
Permission is granted to anyone to use this software for any purpose,
|
|
8
|
+
including commercial applications, and to alter it and redistribute it
|
|
9
|
+
freely, subject to the following restrictions:
|
|
10
|
+
|
|
11
|
+
1. The origin of this software must not be misrepresented; you must not
|
|
12
|
+
claim that you wrote the original software. If you use this software
|
|
13
|
+
in a product, an acknowledgment in the product documentation would be
|
|
14
|
+
appreciated but is not required.
|
|
15
|
+
2. Altered source versions must be plainly marked as such, and must not be
|
|
16
|
+
misrepresented as being the original software.
|
|
17
|
+
3. This notice may not be removed or altered from any source distribution.
|
|
18
|
+
|
metadata
ADDED
|
@@ -0,0 +1,309 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: rgame
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.4.0
|
|
5
|
+
platform: x86_64-linux-gnu
|
|
6
|
+
authors:
|
|
7
|
+
- Paul Süßenbach
|
|
8
|
+
bindir: exe
|
|
9
|
+
cert_chain: []
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
11
|
+
dependencies:
|
|
12
|
+
- !ruby/object:Gem::Dependency
|
|
13
|
+
name: rexml
|
|
14
|
+
requirement: !ruby/object:Gem::Requirement
|
|
15
|
+
requirements:
|
|
16
|
+
- - "~>"
|
|
17
|
+
- !ruby/object:Gem::Version
|
|
18
|
+
version: '3.4'
|
|
19
|
+
type: :runtime
|
|
20
|
+
prerelease: false
|
|
21
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
22
|
+
requirements:
|
|
23
|
+
- - "~>"
|
|
24
|
+
- !ruby/object:Gem::Version
|
|
25
|
+
version: '3.4'
|
|
26
|
+
description: |
|
|
27
|
+
RGame is a small 2D game engine for Ruby, written in Ruby and C. It's build
|
|
28
|
+
on top of SDL2, OpenGL and miniaudio. It's built with testability and
|
|
29
|
+
performance in mind, and aims to be an engine where you can write your whole
|
|
30
|
+
game code in Ruby, test it as usual with RSpec (or Minitest, or another test
|
|
31
|
+
framework) and still have acceptable performance.
|
|
32
|
+
|
|
33
|
+
While still a work in progress, RGame aims to be more than a SDL/OpenGL
|
|
34
|
+
binding - it ships with high level features like a scene graph, sprites,
|
|
35
|
+
collision systems, debugging tools and an UI toolkit.
|
|
36
|
+
email:
|
|
37
|
+
- 2452696+psuessenb@users.noreply.github.com
|
|
38
|
+
executables:
|
|
39
|
+
- rgame
|
|
40
|
+
extensions: []
|
|
41
|
+
extra_rdoc_files: []
|
|
42
|
+
files:
|
|
43
|
+
- CHANGELOG.md
|
|
44
|
+
- LICENSE
|
|
45
|
+
- README.md
|
|
46
|
+
- docs/api/README.md
|
|
47
|
+
- docs/api/app.md
|
|
48
|
+
- docs/api/assets.md
|
|
49
|
+
- docs/api/audio.md
|
|
50
|
+
- docs/api/cli.md
|
|
51
|
+
- docs/api/components.md
|
|
52
|
+
- docs/api/drawing.md
|
|
53
|
+
- docs/api/examples.md
|
|
54
|
+
- docs/api/game.md
|
|
55
|
+
- docs/api/images.md
|
|
56
|
+
- docs/api/input.md
|
|
57
|
+
- docs/api/internals.md
|
|
58
|
+
- docs/api/localization.md
|
|
59
|
+
- docs/api/scene_graph.md
|
|
60
|
+
- docs/api/signals.md
|
|
61
|
+
- docs/api/systems.md
|
|
62
|
+
- docs/api/text.md
|
|
63
|
+
- docs/api/tile_maps.md
|
|
64
|
+
- docs/api/toolbox.md
|
|
65
|
+
- docs/api/ui.md
|
|
66
|
+
- docs/api/values.md
|
|
67
|
+
- examples/assets/README.md
|
|
68
|
+
- examples/assets/blip.ogg
|
|
69
|
+
- examples/assets/glyphs.json
|
|
70
|
+
- examples/assets/glyphs.png
|
|
71
|
+
- examples/assets/hero.json
|
|
72
|
+
- examples/assets/hero.png
|
|
73
|
+
- examples/assets/icons.json
|
|
74
|
+
- examples/assets/icons.png
|
|
75
|
+
- examples/assets/music.ogg
|
|
76
|
+
- examples/assets/skills.json
|
|
77
|
+
- examples/assets/skills.png
|
|
78
|
+
- examples/assets/tileset.png
|
|
79
|
+
- examples/assets/tileset.tsx
|
|
80
|
+
- examples/assets/town.tmx
|
|
81
|
+
- examples/assets/ui.json
|
|
82
|
+
- examples/assets/ui.png
|
|
83
|
+
- examples/collision/locales/en.yml
|
|
84
|
+
- examples/collision/main.rb
|
|
85
|
+
- examples/collision_tiles/locales/en.yml
|
|
86
|
+
- examples/collision_tiles/main.rb
|
|
87
|
+
- examples/fullscreen/locales/en.yml
|
|
88
|
+
- examples/fullscreen/main.rb
|
|
89
|
+
- examples/game_menu/locales/en.yml
|
|
90
|
+
- examples/game_menu/main.rb
|
|
91
|
+
- examples/input_glyphs/locales/en.yml
|
|
92
|
+
- examples/input_glyphs/main.rb
|
|
93
|
+
- examples/jump_topdown/locales/en.yml
|
|
94
|
+
- examples/jump_topdown/main.rb
|
|
95
|
+
- examples/localization/locales/de.yml
|
|
96
|
+
- examples/localization/locales/en.yml
|
|
97
|
+
- examples/localization/main.rb
|
|
98
|
+
- examples/menu_navigation/locales/en.yml
|
|
99
|
+
- examples/menu_navigation/main.rb
|
|
100
|
+
- examples/music/locales/en.yml
|
|
101
|
+
- examples/music/main.rb
|
|
102
|
+
- examples/pathfinding/locales/en.yml
|
|
103
|
+
- examples/pathfinding/main.rb
|
|
104
|
+
- examples/pooling/locales/en.yml
|
|
105
|
+
- examples/pooling/main.rb
|
|
106
|
+
- examples/quick_wheel/locales/en.yml
|
|
107
|
+
- examples/quick_wheel/main.rb
|
|
108
|
+
- examples/radial_menu/locales/en.yml
|
|
109
|
+
- examples/radial_menu/main.rb
|
|
110
|
+
- examples/save_load/locales/en.yml
|
|
111
|
+
- examples/save_load/main.rb
|
|
112
|
+
- examples/save_load_ids/locales/en.yml
|
|
113
|
+
- examples/save_load_ids/main.rb
|
|
114
|
+
- examples/scroll_map/locales/en.yml
|
|
115
|
+
- examples/scroll_map/main.rb
|
|
116
|
+
- examples/signals/locales/en.yml
|
|
117
|
+
- examples/signals/main.rb
|
|
118
|
+
- examples/skill_bar/locales/en.yml
|
|
119
|
+
- examples/skill_bar/main.rb
|
|
120
|
+
- examples/sound/locales/en.yml
|
|
121
|
+
- examples/sound/main.rb
|
|
122
|
+
- examples/split_screen/locales/en.yml
|
|
123
|
+
- examples/split_screen/main.rb
|
|
124
|
+
- examples/sprite/locales/en.yml
|
|
125
|
+
- examples/sprite/main.rb
|
|
126
|
+
- examples/timer/locales/en.yml
|
|
127
|
+
- examples/timer/main.rb
|
|
128
|
+
- examples/velocity/locales/en.yml
|
|
129
|
+
- examples/velocity/main.rb
|
|
130
|
+
- examples/walk/locales/en.yml
|
|
131
|
+
- examples/walk/main.rb
|
|
132
|
+
- exe/rgame
|
|
133
|
+
- lib/rgame.rb
|
|
134
|
+
- lib/rgame/boot.rb
|
|
135
|
+
- lib/rgame/cli.rb
|
|
136
|
+
- lib/rgame/cli/new_project.rb
|
|
137
|
+
- lib/rgame/cli/templates/Gemfile.tt
|
|
138
|
+
- lib/rgame/cli/templates/README.md.tt
|
|
139
|
+
- lib/rgame/cli/templates/Rakefile.tt
|
|
140
|
+
- lib/rgame/cli/templates/assets/locales/en.yml.tt
|
|
141
|
+
- lib/rgame/cli/templates/game.rb.tt
|
|
142
|
+
- lib/rgame/cli/templates/gitignore.tt
|
|
143
|
+
- lib/rgame/cli/templates/main.rb.tt
|
|
144
|
+
- lib/rgame/cli/templates/nodes/root.rb.tt
|
|
145
|
+
- lib/rgame/cli/templates/rspec.tt
|
|
146
|
+
- lib/rgame/cli/templates/rubocop.yml.tt
|
|
147
|
+
- lib/rgame/cli/templates/ruby-version.tt
|
|
148
|
+
- lib/rgame/cli/templates/spec/locales_spec.rb.tt
|
|
149
|
+
- lib/rgame/cli/templates/spec/nodes/root_spec.rb.tt
|
|
150
|
+
- lib/rgame/cli/templates/spec/spec_helper.rb.tt
|
|
151
|
+
- lib/rgame/core.rb
|
|
152
|
+
- lib/rgame/core/app.rb
|
|
153
|
+
- lib/rgame/core/asset_manager.rb
|
|
154
|
+
- lib/rgame/core/audio.rb
|
|
155
|
+
- lib/rgame/core/font.rb
|
|
156
|
+
- lib/rgame/core/gamepad.rb
|
|
157
|
+
- lib/rgame/core/image.rb
|
|
158
|
+
- lib/rgame/core/input.rb
|
|
159
|
+
- lib/rgame/core/locale.rb
|
|
160
|
+
- lib/rgame/core/nine_slice.rb
|
|
161
|
+
- lib/rgame/core/recording.rb
|
|
162
|
+
- lib/rgame/core/renderer.rb
|
|
163
|
+
- lib/rgame/core/sprite_sheet.rb
|
|
164
|
+
- lib/rgame/core/tile_map_renderer.rb
|
|
165
|
+
- lib/rgame/core/ui_atlas.rb
|
|
166
|
+
- lib/rgame/core/virtual_gamepad.rb
|
|
167
|
+
- lib/rgame/core_ext.so
|
|
168
|
+
- lib/rgame/engine.rb
|
|
169
|
+
- lib/rgame/engine/actor_blockers.rb
|
|
170
|
+
- lib/rgame/engine/animation_set.rb
|
|
171
|
+
- lib/rgame/engine/animator.rb
|
|
172
|
+
- lib/rgame/engine/audio_bus.rb
|
|
173
|
+
- lib/rgame/engine/audio_director.rb
|
|
174
|
+
- lib/rgame/engine/bounds_blockers.rb
|
|
175
|
+
- lib/rgame/engine/camera.rb
|
|
176
|
+
- lib/rgame/engine/circle_collider.rb
|
|
177
|
+
- lib/rgame/engine/collision_box.rb
|
|
178
|
+
- lib/rgame/engine/collision_system.rb
|
|
179
|
+
- lib/rgame/engine/component.rb
|
|
180
|
+
- lib/rgame/engine/components/action_trigger.rb
|
|
181
|
+
- lib/rgame/engine/components/animated_sprite.rb
|
|
182
|
+
- lib/rgame/engine/components/box_collider.rb
|
|
183
|
+
- lib/rgame/engine/components/camera_follow.rb
|
|
184
|
+
- lib/rgame/engine/components/character_body.rb
|
|
185
|
+
- lib/rgame/engine/components/circle_collider.rb
|
|
186
|
+
- lib/rgame/engine/components/collision_world.rb
|
|
187
|
+
- lib/rgame/engine/components/despawn_offscreen.rb
|
|
188
|
+
- lib/rgame/engine/components/feet_collider.rb
|
|
189
|
+
- lib/rgame/engine/components/hop.rb
|
|
190
|
+
- lib/rgame/engine/components/identity.rb
|
|
191
|
+
- lib/rgame/engine/components/mover.rb
|
|
192
|
+
- lib/rgame/engine/components/navigator.rb
|
|
193
|
+
- lib/rgame/engine/components/path_follow.rb
|
|
194
|
+
- lib/rgame/engine/components/player_controller.rb
|
|
195
|
+
- lib/rgame/engine/components/pool.rb
|
|
196
|
+
- lib/rgame/engine/components/screen_wrap.rb
|
|
197
|
+
- lib/rgame/engine/components/sprite.rb
|
|
198
|
+
- lib/rgame/engine/components/targeting.rb
|
|
199
|
+
- lib/rgame/engine/components/thrust_controller.rb
|
|
200
|
+
- lib/rgame/engine/components/tile_world.rb
|
|
201
|
+
- lib/rgame/engine/components/timer.rb
|
|
202
|
+
- lib/rgame/engine/components/velocity.rb
|
|
203
|
+
- lib/rgame/engine/components/wander_controller.rb
|
|
204
|
+
- lib/rgame/engine/components/world.rb
|
|
205
|
+
- lib/rgame/engine/contact_set.rb
|
|
206
|
+
- lib/rgame/engine/culling.rb
|
|
207
|
+
- lib/rgame/engine/debug_overlay.rb
|
|
208
|
+
- lib/rgame/engine/i18n.rb
|
|
209
|
+
- lib/rgame/engine/i18n/plural.rb
|
|
210
|
+
- lib/rgame/engine/i18n/plural_rules.rb
|
|
211
|
+
- lib/rgame/engine/i18n/template.rb
|
|
212
|
+
- lib/rgame/engine/input/action_mapper.rb
|
|
213
|
+
- lib/rgame/engine/input/actions.rb
|
|
214
|
+
- lib/rgame/engine/input/input_map.rb
|
|
215
|
+
- lib/rgame/engine/layout.rb
|
|
216
|
+
- lib/rgame/engine/nav_grid.rb
|
|
217
|
+
- lib/rgame/engine/node2d.rb
|
|
218
|
+
- lib/rgame/engine/path.rb
|
|
219
|
+
- lib/rgame/engine/player.rb
|
|
220
|
+
- lib/rgame/engine/player_layer.rb
|
|
221
|
+
- lib/rgame/engine/players.rb
|
|
222
|
+
- lib/rgame/engine/pool.rb
|
|
223
|
+
- lib/rgame/engine/presentation.rb
|
|
224
|
+
- lib/rgame/engine/scene/scene_stack.rb
|
|
225
|
+
- lib/rgame/engine/sealed_privates.rb
|
|
226
|
+
- lib/rgame/engine/signal.rb
|
|
227
|
+
- lib/rgame/engine/spatial_hash.rb
|
|
228
|
+
- lib/rgame/engine/text.rb
|
|
229
|
+
- lib/rgame/engine/tile_blockers.rb
|
|
230
|
+
- lib/rgame/engine/tile_map.rb
|
|
231
|
+
- lib/rgame/engine/tile_map_layer.rb
|
|
232
|
+
- lib/rgame/engine/tileset.rb
|
|
233
|
+
- lib/rgame/engine/timer.rb
|
|
234
|
+
- lib/rgame/engine/ui/button.rb
|
|
235
|
+
- lib/rgame/engine/ui/column.rb
|
|
236
|
+
- lib/rgame/engine/ui/icon_button.rb
|
|
237
|
+
- lib/rgame/engine/ui/menu.rb
|
|
238
|
+
- lib/rgame/engine/ui/navigation.rb
|
|
239
|
+
- lib/rgame/engine/ui/nine_slice_style.rb
|
|
240
|
+
- lib/rgame/engine/ui/option_button.rb
|
|
241
|
+
- lib/rgame/engine/ui/panel_button.rb
|
|
242
|
+
- lib/rgame/engine/ui/panel_menu.rb
|
|
243
|
+
- lib/rgame/engine/ui/pointing.rb
|
|
244
|
+
- lib/rgame/engine/ui/radial_menu.rb
|
|
245
|
+
- lib/rgame/engine/ui/ring.rb
|
|
246
|
+
- lib/rgame/engine/ui/row.rb
|
|
247
|
+
- lib/rgame/engine/ui/shape_style.rb
|
|
248
|
+
- lib/rgame/engine/ui/stack.rb
|
|
249
|
+
- lib/rgame/engine/ui/stepping.rb
|
|
250
|
+
- lib/rgame/engine/ui/text_button.rb
|
|
251
|
+
- lib/rgame/engine/view.rb
|
|
252
|
+
- lib/rgame/engine/viewports.rb
|
|
253
|
+
- lib/rgame/engine/world_view.rb
|
|
254
|
+
- lib/rgame/fonts/LiberationSans-Regular.ttf
|
|
255
|
+
- lib/rgame/fonts/OFL.txt
|
|
256
|
+
- lib/rgame/game.rb
|
|
257
|
+
- lib/rgame/rubocop.rb
|
|
258
|
+
- lib/rgame/rubocop/cop/game/draw_in_local_space.rb
|
|
259
|
+
- lib/rgame/rubocop/cop/game/hot_path.rb
|
|
260
|
+
- lib/rgame/rubocop/cop/game/layer_boundary.rb
|
|
261
|
+
- lib/rgame/rubocop/cop/game/no_core_in_engine_layer.rb
|
|
262
|
+
- lib/rgame/rubocop/cop/game/no_engine_in_core_layer.rb
|
|
263
|
+
- lib/rgame/rubocop/cop/game/no_interpolation_in_hot_path.rb
|
|
264
|
+
- lib/rgame/rubocop/cop/game/no_literal_text.rb
|
|
265
|
+
- lib/rgame/rubocop/cop/game/no_needless_allocation.rb
|
|
266
|
+
- lib/rgame/rubocop/default.yml
|
|
267
|
+
- lib/rgame/rubocop/plugin.rb
|
|
268
|
+
- lib/rgame/util.rb
|
|
269
|
+
- lib/rgame/util/color.rb
|
|
270
|
+
- lib/rgame/util/controls.rb
|
|
271
|
+
- lib/rgame/util/route_search.rb
|
|
272
|
+
- lib/rgame/util/save_file.rb
|
|
273
|
+
- lib/rgame/util/solid_grid.rb
|
|
274
|
+
- lib/rgame/util/tensor.rb
|
|
275
|
+
- lib/rgame/util/tile_sweep.rb
|
|
276
|
+
- lib/rgame/util/z.rb
|
|
277
|
+
- lib/rgame/util_ext.so
|
|
278
|
+
- lib/rgame/version.rb
|
|
279
|
+
- licenses/SDL2/LICENSE.txt
|
|
280
|
+
homepage: https://github.com/psuessenb/rgame
|
|
281
|
+
licenses:
|
|
282
|
+
- MIT
|
|
283
|
+
metadata:
|
|
284
|
+
source_code_uri: https://github.com/psuessenb/rgame
|
|
285
|
+
bug_tracker_uri: https://github.com/psuessenb/rgame/issues
|
|
286
|
+
documentation_uri: https://github.com/psuessenb/rgame/blob/main/docs/api/README.md
|
|
287
|
+
changelog_uri: https://github.com/psuessenb/rgame/blob/main/CHANGELOG.md
|
|
288
|
+
rubygems_mfa_required: 'true'
|
|
289
|
+
rdoc_options: []
|
|
290
|
+
require_paths:
|
|
291
|
+
- lib
|
|
292
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
293
|
+
requirements:
|
|
294
|
+
- - ">="
|
|
295
|
+
- !ruby/object:Gem::Version
|
|
296
|
+
version: '4.0'
|
|
297
|
+
- - "<"
|
|
298
|
+
- !ruby/object:Gem::Version
|
|
299
|
+
version: 4.1.dev
|
|
300
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
301
|
+
requirements:
|
|
302
|
+
- - ">="
|
|
303
|
+
- !ruby/object:Gem::Version
|
|
304
|
+
version: 3.3.22
|
|
305
|
+
requirements: []
|
|
306
|
+
rubygems_version: 4.0.6
|
|
307
|
+
specification_version: 4
|
|
308
|
+
summary: A 2D game engine in C on SDL2 and OpenGL, exposed to Ruby.
|
|
309
|
+
test_files: []
|