rubygame 2.5.3 → 2.6.0
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.
- data/CREDITS +6 -4
- data/NEWS +79 -0
- data/README +55 -72
- data/ROADMAP +20 -13
- data/doc/custom_sdl_load_paths.rdoc +79 -0
- data/doc/getting_started.rdoc +65 -36
- data/doc/keyboard_symbols.rdoc +243 -0
- data/doc/macosx_install.rdoc +49 -35
- data/doc/windows_install.rdoc +36 -108
- data/lib/rubygame.rb +62 -24
- data/lib/rubygame/audio.rb +147 -0
- data/lib/rubygame/clock.rb +164 -1
- data/lib/rubygame/color.rb +40 -7
- data/lib/rubygame/color/models/hsl.rb +1 -1
- data/lib/rubygame/color/models/hsv.rb +1 -1
- data/lib/rubygame/color/models/rgb.rb +1 -1
- data/lib/rubygame/color/palettes/css.rb +1 -3
- data/lib/rubygame/color/palettes/x11.rb +1 -2
- data/lib/rubygame/constants.rb +297 -0
- data/lib/rubygame/deprecated_mixer.rb +555 -0
- data/lib/rubygame/event.rb +122 -6
- data/lib/rubygame/event_handler.rb +3 -1
- data/lib/rubygame/event_hook.rb +6 -2
- data/lib/rubygame/event_triggers.rb +1 -1
- data/lib/rubygame/events.rb +416 -1
- data/lib/rubygame/ftor.rb +1 -7
- data/lib/rubygame/gfx.rb +583 -0
- data/lib/rubygame/gl.rb +107 -0
- data/lib/rubygame/image.rb +140 -0
- data/lib/rubygame/joystick.rb +184 -0
- data/lib/rubygame/main.rb +82 -0
- data/lib/rubygame/mediabag.rb +1 -1
- data/lib/rubygame/mixer.rb +30 -0
- data/lib/rubygame/music.rb +493 -0
- data/lib/rubygame/queue.rb +3 -1
- data/lib/rubygame/rect.rb +9 -9
- data/lib/rubygame/screen.rb +357 -0
- data/lib/rubygame/shared.rb +40 -4
- data/lib/rubygame/sound.rb +428 -0
- data/lib/rubygame/surface.rb +626 -0
- data/lib/rubygame/ttf.rb +311 -0
- data/samples/FreeSans.ttf +0 -0
- data/samples/README +6 -5
- data/samples/demo_draw.rb +1 -1
- data/samples/demo_gl.rb +3 -1
- data/samples/demo_gl_tex.rb +4 -2
- data/samples/demo_rubygame.rb +114 -105
- data/samples/demo_sfont.rb +1 -1
- data/samples/demo_ttf.rb +3 -1
- data/samples/demo_utf8.rb +1 -1
- data/samples/image_viewer.rb +118 -0
- data/samples/load_and_blit.rb +1 -1
- data/samples/rubygame.png +0 -0
- metadata +34 -40
- data/Rakefile +0 -537
- data/doc/extended_readme.rdoc +0 -49
- data/ext/body/rubygame_body.so +0 -0
- data/ext/rubygame/rubygame_clock.c +0 -301
- data/ext/rubygame/rubygame_clock.h +0 -32
- data/ext/rubygame/rubygame_event.c +0 -760
- data/ext/rubygame/rubygame_event.h +0 -48
- data/ext/rubygame/rubygame_event2.c +0 -661
- data/ext/rubygame/rubygame_event2.h +0 -29
- data/ext/rubygame/rubygame_gfx.c +0 -942
- data/ext/rubygame/rubygame_gfx.h +0 -101
- data/ext/rubygame/rubygame_gl.c +0 -154
- data/ext/rubygame/rubygame_gl.h +0 -32
- data/ext/rubygame/rubygame_image.c +0 -252
- data/ext/rubygame/rubygame_image.h +0 -41
- data/ext/rubygame/rubygame_joystick.c +0 -336
- data/ext/rubygame/rubygame_joystick.h +0 -41
- data/ext/rubygame/rubygame_main.c +0 -158
- data/ext/rubygame/rubygame_main.h +0 -36
- data/ext/rubygame/rubygame_mixer.c +0 -1024
- data/ext/rubygame/rubygame_mixer.h +0 -36
- data/ext/rubygame/rubygame_music.c +0 -1017
- data/ext/rubygame/rubygame_music.h +0 -29
- data/ext/rubygame/rubygame_screen.c +0 -572
- data/ext/rubygame/rubygame_screen.h +0 -45
- data/ext/rubygame/rubygame_shared.c +0 -269
- data/ext/rubygame/rubygame_shared.h +0 -69
- data/ext/rubygame/rubygame_sound.c +0 -863
- data/ext/rubygame/rubygame_sound.h +0 -29
- data/ext/rubygame/rubygame_surface.c +0 -1153
- data/ext/rubygame/rubygame_surface.h +0 -62
- data/ext/rubygame/rubygame_ttf.c +0 -599
- data/ext/rubygame/rubygame_ttf.h +0 -69
- data/samples/keys.rb +0 -52
data/doc/getting_started.rdoc
CHANGED
@@ -1,47 +1,76 @@
|
|
1
1
|
= Getting Started with Rubygame
|
2
2
|
|
3
|
+
This guide is also available on the Rubygame wiki:
|
4
|
+
|
5
|
+
* http://rubygame.org/wiki/Getting_started
|
6
|
+
|
3
7
|
== About Rubygame
|
4
8
|
|
5
|
-
Rubygame is a
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
9
|
+
Rubygame is a cross-platform game-development library for Ruby,
|
10
|
+
inspired by Pygame. Rubygame strives to empower game developers by
|
11
|
+
providing them with powerful and flexible mid-to-high level tools.
|
12
|
+
Instead of worrying about low-level technical details, you can focus
|
13
|
+
your energy on more interesting things (like making a fun game).
|
14
|
+
|
15
|
+
== Installing Rubygame
|
16
|
+
|
17
|
+
Installation guides for Mac and Windows are available in the 'doc'
|
18
|
+
directory:
|
19
|
+
|
20
|
+
Mac:: {doc/macosx_install.rdoc}[link:doc/macosx_install.rdoc]
|
21
|
+
Windows:: {doc/windows_install.rdoc}[link:doc/windows_install.rdoc]
|
22
|
+
|
23
|
+
You can also find installation instructions for many operating systems
|
24
|
+
online at the Rubygame wiki:
|
25
|
+
|
26
|
+
* http://rubygame.org/wiki/Installation_Instructions
|
27
|
+
|
28
|
+
== Guides and tutorials
|
11
29
|
|
12
|
-
|
30
|
+
The Rubygame wiki has a list of guides and tutorials to help you get
|
31
|
+
started using Rubygame:
|
32
|
+
|
33
|
+
* http://rubygame.org/wiki/Guides_and_tutorials
|
34
|
+
|
35
|
+
== Suggested order of reading
|
13
36
|
|
14
37
|
To get acquainted with Rubygame, we recommend exploring the available classes
|
15
38
|
and modules in this order.
|
16
39
|
|
17
40
|
First, take a look at the most fundamental classes:
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
41
|
+
|
42
|
+
Rubygame::Surface:: An image canvas that you can load from an image
|
43
|
+
file, draw shapes on and "blit" (copy) to other
|
44
|
+
Surfaces (or the Screen).
|
45
|
+
Rubygame::Screen:: A special Surface that is displayed to the user.
|
46
|
+
Everything drawn on the Screen appears in the
|
47
|
+
application window on the user's desktop.
|
48
|
+
Rubygame::Rect:: A rectangular area, used for choosing what parts
|
49
|
+
of a Surface to copy from or to, among other uses.
|
50
|
+
|
51
|
+
As a next step, read about the EventQueue, EventHandler, and the user
|
52
|
+
input event classes. These allow you to handle keyboard, mouse, and
|
53
|
+
joystick input from the user, among other things. By creating your own
|
54
|
+
event classes, these systems can also be used to represent things
|
55
|
+
occuring within your game, such as the player losing a life or the
|
56
|
+
level being completed.
|
57
|
+
|
58
|
+
Rubygame::EventQueue:: A special Array that caches events to be
|
59
|
+
handled later.
|
60
|
+
Rubygame::EventHandler:: A flexible hook-based system for performing
|
61
|
+
actions when certain types of events occur.
|
62
|
+
Rubygame::Events:: A module containing all the built-in event
|
63
|
+
classes in Rubygame.
|
64
|
+
|
65
|
+
Finally, you may be interested in these features:
|
66
|
+
|
67
|
+
Rubygame::Sprites:: A simple and flexible game object framework.
|
68
|
+
Rubygame::Sound:: Play sound effects to make your game more lively.
|
69
|
+
Rubygame::Music:: Play music to enhance your game's mood.
|
70
|
+
Rubygame::Clock:: Monitor and control framerate to lower CPU use.
|
71
|
+
Rubygame::TTF:: Render text with TrueType fonts.
|
72
|
+
Rubygame::SFont:: Render text with bitmap-based fonts.
|
73
|
+
Rubygame::GL:: Enable OpenGL 2D & 3D graphics.
|
74
|
+
|
75
|
+
There are several sample applications in the 'samples' directory
|
47
76
|
packaged with Rubygame which can also help you get started.
|
@@ -0,0 +1,243 @@
|
|
1
|
+
This is a list of every possible key that a keyboard event can have in
|
2
|
+
Rubygame. You can view this list in a nicer form at
|
3
|
+
http://rubygame.org/wiki/Keyboard_Symbols .
|
4
|
+
|
5
|
+
The names on the left represent constants in the Rubygame module, e.g.
|
6
|
+
Rubygame::K_BACKSPACE. These were used in the legacy (before Rubygame
|
7
|
+
2.4) event classes: Rubygame::KeyDownEvent and Rubygame::KeyUpEvent.
|
8
|
+
|
9
|
+
The legacy event classes are deprecated and will be removed in
|
10
|
+
Rubygame 3.0, so you should not use them.
|
11
|
+
|
12
|
+
The symbols on the right are used in the new event classes:
|
13
|
+
Rubygame::Events::KeyPressed and Rubygame::Events::KeyReleased.
|
14
|
+
|
15
|
+
K_BACKSPACE :backspace
|
16
|
+
K_TAB :tab
|
17
|
+
K_CLEAR :clear
|
18
|
+
K_RETURN :return
|
19
|
+
K_PAUSE :pause
|
20
|
+
K_ESCAPE :escape
|
21
|
+
K_SPACE :space
|
22
|
+
K_EXCLAIM :exclamation_mark
|
23
|
+
K_QUOTEDBL :double_quote
|
24
|
+
K_HASH :hash
|
25
|
+
K_DOLLAR :dollar
|
26
|
+
K_AMPERSAND :ampersand
|
27
|
+
K_QUOTE :quote
|
28
|
+
K_LEFTPAREN :left_parenthesis
|
29
|
+
K_RIGHTPAREN :right_parenthesis
|
30
|
+
K_ASTERISK :asterisk
|
31
|
+
K_PLUS :plus
|
32
|
+
K_COMMA :comma
|
33
|
+
K_MINUS :minus
|
34
|
+
K_PERIOD :period
|
35
|
+
K_SLASH :slash
|
36
|
+
K_0 :number_0
|
37
|
+
K_1 :number_1
|
38
|
+
K_2 :number_2
|
39
|
+
K_3 :number_3
|
40
|
+
K_4 :number_4
|
41
|
+
K_5 :number_5
|
42
|
+
K_6 :number_6
|
43
|
+
K_7 :number_7
|
44
|
+
K_8 :number_8
|
45
|
+
K_9 :number_9
|
46
|
+
K_COLON :":" (will become :colon in Rubygame 3.0)
|
47
|
+
K_SEMICOLON :semicolon
|
48
|
+
K_LESS :less_than
|
49
|
+
K_EQUALS :equals
|
50
|
+
K_GREATER :greater_than
|
51
|
+
K_QUESTION :question_mark
|
52
|
+
K_AT :at
|
53
|
+
K_LEFTBRACKET :left_bracket
|
54
|
+
K_BACKSLASH :backslash
|
55
|
+
K_RIGHTBRACKET :right_bracket
|
56
|
+
K_CARET :caret
|
57
|
+
K_UNDERSCORE :underscore
|
58
|
+
K_BACKQUOTE :backquote
|
59
|
+
K_A :a
|
60
|
+
K_B :b
|
61
|
+
K_C :c
|
62
|
+
K_D :d
|
63
|
+
K_E :e
|
64
|
+
K_F :f
|
65
|
+
K_G :g
|
66
|
+
K_H :h
|
67
|
+
K_I :i
|
68
|
+
K_J :j
|
69
|
+
K_K :k
|
70
|
+
K_L :l
|
71
|
+
K_M :m
|
72
|
+
K_N :n
|
73
|
+
K_O :o
|
74
|
+
K_P :p
|
75
|
+
K_Q :q
|
76
|
+
K_R :r
|
77
|
+
K_S :s
|
78
|
+
K_T :t
|
79
|
+
K_U :u
|
80
|
+
K_V :v
|
81
|
+
K_W :w
|
82
|
+
K_X :x
|
83
|
+
K_Y :y
|
84
|
+
K_Z :z
|
85
|
+
K_DELETE :delete
|
86
|
+
K_WORLD_0 :world_0
|
87
|
+
K_WORLD_1 :world_1
|
88
|
+
K_WORLD_2 :world_2
|
89
|
+
K_WORLD_3 :world_3
|
90
|
+
K_WORLD_4 :world_4
|
91
|
+
K_WORLD_5 :world_5
|
92
|
+
K_WORLD_6 :world_6
|
93
|
+
K_WORLD_7 :world_7
|
94
|
+
K_WORLD_8 :world_8
|
95
|
+
K_WORLD_9 :world_9
|
96
|
+
K_WORLD_10 :world_10
|
97
|
+
K_WORLD_11 :world_11
|
98
|
+
K_WORLD_12 :world_12
|
99
|
+
K_WORLD_13 :world_13
|
100
|
+
K_WORLD_14 :world_14
|
101
|
+
K_WORLD_15 :world_15
|
102
|
+
K_WORLD_16 :world_16
|
103
|
+
K_WORLD_17 :world_17
|
104
|
+
K_WORLD_18 :world_18
|
105
|
+
K_WORLD_19 :world_19
|
106
|
+
K_WORLD_20 :world_20
|
107
|
+
K_WORLD_21 :world_21
|
108
|
+
K_WORLD_22 :world_22
|
109
|
+
K_WORLD_23 :world_23
|
110
|
+
K_WORLD_24 :world_24
|
111
|
+
K_WORLD_25 :world_25
|
112
|
+
K_WORLD_26 :world_26
|
113
|
+
K_WORLD_27 :world_27
|
114
|
+
K_WORLD_28 :world_28
|
115
|
+
K_WORLD_29 :world_29
|
116
|
+
K_WORLD_30 :world_30
|
117
|
+
K_WORLD_31 :world_31
|
118
|
+
K_WORLD_32 :world_32
|
119
|
+
K_WORLD_33 :world_33
|
120
|
+
K_WORLD_34 :world_34
|
121
|
+
K_WORLD_35 :world_35
|
122
|
+
K_WORLD_36 :world_36
|
123
|
+
K_WORLD_37 :world_37
|
124
|
+
K_WORLD_38 :world_38
|
125
|
+
K_WORLD_39 :world_39
|
126
|
+
K_WORLD_40 :world_40
|
127
|
+
K_WORLD_41 :world_41
|
128
|
+
K_WORLD_42 :world_42
|
129
|
+
K_WORLD_43 :world_43
|
130
|
+
K_WORLD_44 :world_44
|
131
|
+
K_WORLD_45 :world_45
|
132
|
+
K_WORLD_46 :world_46
|
133
|
+
K_WORLD_47 :world_47
|
134
|
+
K_WORLD_48 :world_48
|
135
|
+
K_WORLD_49 :world_49
|
136
|
+
K_WORLD_50 :world_50
|
137
|
+
K_WORLD_51 :world_51
|
138
|
+
K_WORLD_52 :world_52
|
139
|
+
K_WORLD_53 :world_53
|
140
|
+
K_WORLD_54 :world_54
|
141
|
+
K_WORLD_55 :world_55
|
142
|
+
K_WORLD_56 :world_56
|
143
|
+
K_WORLD_57 :world_57
|
144
|
+
K_WORLD_58 :world_58
|
145
|
+
K_WORLD_59 :world_59
|
146
|
+
K_WORLD_60 :world_60
|
147
|
+
K_WORLD_61 :world_61
|
148
|
+
K_WORLD_62 :world_62
|
149
|
+
K_WORLD_63 :world_63
|
150
|
+
K_WORLD_64 :world_64
|
151
|
+
K_WORLD_65 :world_65
|
152
|
+
K_WORLD_66 :world_66
|
153
|
+
K_WORLD_67 :world_67
|
154
|
+
K_WORLD_68 :world_68
|
155
|
+
K_WORLD_69 :world_69
|
156
|
+
K_WORLD_70 :world_70
|
157
|
+
K_WORLD_71 :world_71
|
158
|
+
K_WORLD_72 :world_72
|
159
|
+
K_WORLD_73 :world_73
|
160
|
+
K_WORLD_74 :world_74
|
161
|
+
K_WORLD_75 :world_75
|
162
|
+
K_WORLD_76 :world_76
|
163
|
+
K_WORLD_77 :world_77
|
164
|
+
K_WORLD_78 :world_78
|
165
|
+
K_WORLD_79 :world_79
|
166
|
+
K_WORLD_80 :world_80
|
167
|
+
K_WORLD_81 :world_81
|
168
|
+
K_WORLD_82 :world_82
|
169
|
+
K_WORLD_83 :world_83
|
170
|
+
K_WORLD_84 :world_84
|
171
|
+
K_WORLD_85 :world_85
|
172
|
+
K_WORLD_86 :world_86
|
173
|
+
K_WORLD_87 :world_87
|
174
|
+
K_WORLD_88 :world_88
|
175
|
+
K_WORLD_89 :world_89
|
176
|
+
K_WORLD_90 :world_90
|
177
|
+
K_WORLD_91 :world_91
|
178
|
+
K_WORLD_92 :world_92
|
179
|
+
K_WORLD_93 :world_93
|
180
|
+
K_WORLD_94 :world_94
|
181
|
+
K_WORLD_95 :world_95
|
182
|
+
K_KP0 :keypad_0
|
183
|
+
K_KP1 :keypad_1
|
184
|
+
K_KP2 :keypad_2
|
185
|
+
K_KP3 :keypad_3
|
186
|
+
K_KP4 :keypad_4
|
187
|
+
K_KP5 :keypad_5
|
188
|
+
K_KP6 :keypad_6
|
189
|
+
K_KP7 :keypad_7
|
190
|
+
K_KP8 :keypad_8
|
191
|
+
K_KP9 :keypad_9
|
192
|
+
K_KP_PERIOD :keypad_period
|
193
|
+
K_KP_DIVIDE :keypad_divide
|
194
|
+
K_KP_MULTIPLY :keypad_multiply
|
195
|
+
K_KP_MINUS :keypad_minus
|
196
|
+
K_KP_PLUS :keypad_plus
|
197
|
+
K_KP_ENTER :keypad_enter
|
198
|
+
K_KP_EQUALS :keypad_equals
|
199
|
+
K_UP :up
|
200
|
+
K_DOWN :down
|
201
|
+
K_RIGHT :right
|
202
|
+
K_LEFT :left
|
203
|
+
K_INSERT :insert
|
204
|
+
K_HOME :home
|
205
|
+
K_END :end
|
206
|
+
K_PAGEUP :page_up
|
207
|
+
K_PAGEDOWN :page_down
|
208
|
+
K_F1 :f1
|
209
|
+
K_F2 :f2
|
210
|
+
K_F3 :f3
|
211
|
+
K_F4 :f4
|
212
|
+
K_F5 :f5
|
213
|
+
K_F6 :f6
|
214
|
+
K_F7 :f7
|
215
|
+
K_F8 :f8
|
216
|
+
K_F9 :f9
|
217
|
+
K_F10 :f10
|
218
|
+
K_F11 :f11
|
219
|
+
K_F12 :f12
|
220
|
+
K_F13 :f13
|
221
|
+
K_F14 :f14
|
222
|
+
K_F15 :f15
|
223
|
+
K_NUMLOCK :numlock
|
224
|
+
K_CAPSLOCK :caps_lock
|
225
|
+
K_SCROLLOCK :scroll_lock
|
226
|
+
K_RSHIFT :right_shift
|
227
|
+
K_LSHIFT :left_shift
|
228
|
+
K_RCTRL :right_ctrl
|
229
|
+
K_LCTRL :left_ctrl
|
230
|
+
K_RALT :right_alt
|
231
|
+
K_LALT :left_alt
|
232
|
+
K_RMETA :right_meta
|
233
|
+
K_LMETA :left_meta
|
234
|
+
K_LSUPER :left_super
|
235
|
+
K_RSUPER :right_super
|
236
|
+
K_MODE :alt_gr
|
237
|
+
K_HELP :help
|
238
|
+
K_PRINT :print_screen
|
239
|
+
K_SYSREQ :sys_req
|
240
|
+
K_BREAK :break
|
241
|
+
K_MENU :menu
|
242
|
+
K_POWER :power
|
243
|
+
K_EURO :euro
|
data/doc/macosx_install.rdoc
CHANGED
@@ -1,70 +1,84 @@
|
|
1
|
-
|
1
|
+
Note: You can view the latest version of this guide online at the
|
2
|
+
Rubygame wiki: http://rubygame.org/wiki/Mac_Installation_Guide
|
2
3
|
|
3
|
-
|
4
|
+
== Installing Xcode
|
4
5
|
|
5
|
-
|
6
|
+
Rubygame does not need to be compiled anymore (since version 2.6),
|
7
|
+
but you will need to install the Xcode development tools in order
|
8
|
+
to install the dependencies with Fink or Darwinports, as well as
|
9
|
+
to compile rsdl.
|
10
|
+
|
11
|
+
You can find Xcode on your Mac OS X installation disc. Or, you can
|
12
|
+
download Xcode online. You must register for a (free) Mac developer
|
13
|
+
account for this.
|
6
14
|
|
7
|
-
|
8
|
-
|
9
|
-
preference.
|
15
|
+
* Mac OS X 10.5 (Leopard) and 10.6 (Snow Leopard):
|
16
|
+
{Xcode 3.1}[https://connect.apple.com/cgi-bin/WebObjects/MemberSite.woa/wa/getSoftware?bundleID=20414]
|
10
17
|
|
11
|
-
|
18
|
+
* Mac OS X 10.3 (Panther) and 10.4 (Tiger):
|
19
|
+
{Xcode 2.5}[http://connect.apple.com/cgi-bin/WebObjects/MemberSite.woa/wa/getSoftware?bundleID=19907]
|
20
|
+
|
21
|
+
== Installing dependencies...
|
12
22
|
|
23
|
+
You have two options for installing the software libraries that
|
24
|
+
Rubygame depends on: Fink or Darwinports. Which option you choose is
|
25
|
+
just a matter of preference.
|
13
26
|
|
14
|
-
|
27
|
+
=== ...with {Fink}[http://www.finkproject.org/]
|
28
|
+
|
29
|
+
1. {Install Fink}[http://www.finkproject.org/download/index.php?phpLang=en]
|
30
|
+
and update to the latest version.
|
15
31
|
2. Open a new terminal (can be found in /Applications/Utilities).
|
16
|
-
3. Install SDL:
|
32
|
+
3. Install SDL:
|
17
33
|
|
18
|
-
|
34
|
+
sudo apt-get install sdl
|
19
35
|
|
20
|
-
4. (Optional, but *highly* recommended:) Install the SDL companion
|
21
|
-
libraries:
|
36
|
+
4. (Optional, but *highly* recommended:) Install the SDL companion
|
37
|
+
libraries:
|
22
38
|
|
23
|
-
|
39
|
+
sudo apt-get install sdl-gfx13 sdl-image sdl-mixer sdl-ttf
|
24
40
|
|
25
|
-
|
41
|
+
Thanks to Matt Crinklaw for these instructions.
|
26
42
|
|
27
|
-
|
28
|
-
|
43
|
+
=== ...with {Darwinports}[http://darwinports.com/]
|
44
|
+
|
45
|
+
1. {Install Darwinports}[http://darwinports.com/download/] (you must
|
46
|
+
register first).
|
29
47
|
2. Open a new terminal (can be found in /Applications/Utilities).
|
30
48
|
3. Install SDL:
|
31
49
|
|
32
|
-
|
50
|
+
sudo port install libsdl
|
33
51
|
|
34
52
|
4. (Optional, but *highly* recommended:) Install the SDL companion
|
35
53
|
libraries:
|
36
54
|
|
37
|
-
|
55
|
+
sudo port install libsdl_gfx libsdl_image libsdl_mixer libsdl_ttf
|
56
|
+
|
57
|
+
Thanks to Raffael Mancini (sepisultrum) for these instructions.
|
38
58
|
|
39
59
|
== Installing rsdl
|
40
60
|
|
41
|
-
In order to use Rubygame applications on Mac OS X, you must use a special wrapper for the
|
61
|
+
In order to use Rubygame applications on Mac OS X, you must use a special wrapper for the Ruby interpreter, called rsdl.
|
42
62
|
|
43
|
-
1. {
|
63
|
+
1. {Get rsdl}[http://github.com/knu/rsdl].
|
44
64
|
2. From within the rsdl directory:
|
45
65
|
|
46
|
-
|
47
|
-
|
48
|
-
|
66
|
+
ruby ./configure.rb
|
67
|
+
make
|
68
|
+
sudo cp rsdl /usr/local/bin/
|
49
69
|
|
50
70
|
== Installing Rubygame
|
51
|
-
1. {Download and unpack Rubygame}[http://rubyforge.org/frs/?group_id=5089].
|
52
|
-
2. From within the rubygame directory:
|
53
71
|
|
54
|
-
|
72
|
+
The simplest way to install Rubygame is: <code>gem install rubygame</code>
|
55
73
|
|
56
|
-
|
57
|
-
|
74
|
+
Or you can {download the source
|
75
|
+
from Github}[http://github.com/jacius/rubygame/] and follow the installation instructions in README.
|
58
76
|
|
59
77
|
== Running an application
|
60
78
|
|
61
79
|
If all went well, you can now run Rubygame applications like so:
|
62
|
-
<code>rsdl a_rubygame_app.rb</code>
|
63
80
|
|
64
|
-
|
65
|
-
and we'll try to help! Be sure to include plenty of details and paste any error
|
66
|
-
messages that occur (plus a good bit of the text right before the error
|
67
|
-
messages).
|
81
|
+
rsdl a_rubygame_app.rb
|
68
82
|
|
69
|
-
|
70
|
-
|
83
|
+
If you have any trouble installing Rubygame, please post in the
|
84
|
+
{forums}[http://rubygame.org/forums/].
|