forked from rubygame/rubygame
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathNEWS
666 lines (428 loc) · 20.3 KB
/
NEWS
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
= NEWS
== Rubygame 2.6.4
Release focus: Bug fix.
=== Fixes
- Fixed: Rubygame's "require_path" setting in the gem spec was
interfering with ruby-opengl (and potentially others). [#43]
If you have problems loading ruby-opengl when Rubygame 2.6.* is
installed via RubyGems, you should uninstall all versions of the
Rubygame gem, then reinstall version 2.6.4 (or later).
== Rubygame 2.6.3
Release focus: Bug fixes.
=== Fixes
- Fixed: MouseMoved events always reported that all buttons were
being pressed, even when they were not. [#38]
- Fixed: MousePressed and MouseReleased events would raise an error
for mouse buttons larger than 5. [#40]
- Fixed: KeyPressed and KeyReleased events always reported that all
modifier keys were being pressed, even when they were not. [#41]
- Fixed: Rubygame would generate spurious WindowUnminimized,
InputFocusGained, and MouseFocusGained events (or the opposite)
whenever any one of those events actually occurred.
- Fixed: Surface#convert would raise NameError if no Screen was open,
due to a typo. [#42]
=== Other Changes
- Rubygame will now skip auto-initialization if the RUBYGAME_NOINIT
environment variable (`ENV["RUBYGAME_NOINIT"]`) is set to "1",
"true", or "yes" (case insensitive). You must set the environment
variable *before* doing `require "rubygame"`. This is intended
for special cases where auto-initialization is not wanted.
== Rubygame 2.6.2
Release focus: Bug fixes.
=== Fixes
- Fixed: Rubygame::Screen.set_mode and Rubygame::Screen.instance were
accidently lost during the FFI port. (Note: those methods are
deprecated, but kept for backwards compatibility. New code should
use Rubygame::Screen.new or Rubygame::Screen.open instead.)
== Rubygame 2.6.1
Release focus: Bug fixes.
=== Fixes
- Fixed: Rubygame::Mixer.open_audio was using a different default
audio format than it did in 2.5.3, which caused an error on Mac.
(Note: The Rubygame::Mixer.open_audio is deprecated, but kept for
backwards compatibility. Use Rubygame.open_audio instead.)
- Fixed: Rubygame no longer tries to load audio features if SDL_mixer
is not available. Trying to load them would cause an error, and
didn't match the old behavior.
== Rubygame 2.6.0
Release focus: Ported to FFI.
=== FFI
Rubygame is now pure Ruby, with no compiled C code. Instead, it uses
Ruby-FFI (or compatible FFI implementations) to directly access SDL
and related libraries. That means:
- It is much easier to install. You can install it directly from
RubyGems (`gem install rubygame`) on any operating system, and you
don't need a C compiler or SDL headers.
- It is now possible to use Rubygame on JRuby, and possibly on
Rubinius.
- Rubygame will be slightly slower than before. But, the hard work is
still being done by SDL, so the speed decrease is only minor. The
increased portability and ease of future development greatly
outweighs the small speed loss.
Despite the major architectural change, Rubygame 2.6 API is meant to
be backwards compatible with Rubygame 2.5 and earlier. If you find an
API incompatibility, you should report it as a bug.
However, there are a few minor incompatibilities that are already known,
and most likely cannot or will not be fixed:
- Surface#flip now needs SDL_gfx to run. Before, it needed only plain
SDL, but the code for it was too slow when reimplemented in Ruby.
- Rubygame::VERSIONS[:sdl_gfx] now reports [0,0,0] when SDL_gfx is
available, instead of its real version number. SDL_gfx does not
currently provide any way to detect its version number at run time.
(VERSIONS still reports nil when SDL_gfx is not available, the same
as in 2.5 and earlier.)
=== Fixes
- Fixed: Surface#set_at() now correctly sets the pixel's opacity for
Surfaces with an alpha channel. If no opacity is given for the new
color (i.e. only RGB), the pixel will be fully opaque.
- Note: Due to a long-standing bug, Surface.new cannot create a
Surface with an alpha channel. Use Surface#to_display_alpha to
create an alpha-channeled copy of the Surface, or load an image
file that has an alpha channel already.
- Fixed: Music.load now automatically opens audio if needed. MP3s (and
perhaps other file types) would fail to load in some circumstances
if audio was not open.
=== Other Changes
- Rubygame now automatically initializes itself when loaded and cleans
itself up at exit. So, you no longer need to call Rubygame.init or
Rubygame.quit in your code (but it won't hurt if you do).
- Added: New sample application, a basic image viewer.
See samples/image_viewer.rb.
- Added: Documentation listing every keyboard symbol used by Rubygame.
See doc/keyboard_symbols.rdoc.
- Added: Guide to setting custom load parts for SDL libraries.
See doc/custom_sdl_load_paths.rdoc.
- Surface#alpha= is now a true alias for Surface#set_alpha. It was a
separate method before. It can still be used in the same way as
before.
- Surface#colorkey= is now a true alias for Surface#set_colorkey. It
was a separate method before. It can still be used in the same way
as before.
== Rubygame 2.5.3
Release focus: Bug fixes.
=== Fixes
- Updated gemspec to list (install-time) dependency on Rake. [#24]
- Fixed: MouseMoved and JoyBallMoved were wrongly using unsigned ints
for relative x and y positions. [#26]
- Fixed: Clock#framerate returned Infinity under some conditions.
- Fixed: Panda demo used the wrong order of steps for redrawing sprites.
== Rubygame 2.5.2
Release focus: Bug fixes.
=== Fixes
- Fixed: HasEventHandler#handle (and other methods) dealt with
NoMethodError exceptions in a stupid way.
== Rubygame 2.5.1
Release focus: Bug fixes.
=== Fixes
- Fixed: Clock.delay would delay forever if the delay time and
granularity were very small.
- Fixed: Clock.delay would always be "nice" to other Ruby threads
during the final part of the delay, even if nice = false.
== Rubygame 2.5.0
Release focus: Clock improvements.
=== Features
- New and improved algorithm for calculating framerate.
- Better Clock compatibility with multithreaded applications:
- Clock.delay and Clock.wait now accept a new argument: +nice+.
If nice is +true+, these methods try to allow other ruby threads
to run during the delay. The default behavior is to block other
threads, as previous versions of Rubygame do.
- Added: Clock @nice.
This instance variable controls the +nice+ value used while
delaying in #tick (if framerate limiting is active).
- Better control over the balance between CPU usage and accuracy
when using Clock's framerate limiting:
- Added: Clock @granularity.
This instance variable controls the granularity value used while
delaying in #tick (if framerate limiting is active). Smaller
values lower CPU usage, but framerate limiting will be less
accurate if the granularity is lower than the system's actual
clock granularity. Use Clock#calibrate to find the best value for
the current system.
- Added: Clock#calibrate.
Call this after you create a Clock instance calibrate the Clock's
granularity to match the system's actual clock granularity. This
reduces wasteful CPU usage when using framerate limiting.
- New ClockTicked event for use with EventHandlers:
- Added: ClockTicked event class.
If you call Clock#enable_tick_events, Clock#tick will return an
instance of ClockTicked instead of the raw delay time in milliseconds.
- Added: TickTrigger event trigger class.
Matches ClockTicked events.
- HasEventHandler#make_magic_hooks accepts the symbol :tick to create a
TickTrigger.
- Added: Clock#frametime.
Returns the actual milliseconds per frame recorded by the Clock.
- New in-depth Clock tutorial, "Managing Framerate".
See doc/managing_framerate.rdoc[link:files/doc/managing_framerate_rdoc.html].
An accompanying code example has also been added, samples/framerate.rb.
- A few Screen additions:
- Added: Screen.get_resolution. Returns the user's desktop resolution.
Due to a limitation of SDL, this can ONLY be used when the Rubygame
window is closed (i.e. before you have called Screen.new, or after
you have called Screen.close).
- Added: Screen.close. Closes the Rubygame window, if it's open.
- Added: Screen.open?. True if the Rubygame window is open.
- Added: Screen.open (alias of Screen.new).
- Added: HasEventHandler#make_magic_hooks_for.
It's like make_magic_hooks, but the hook's owner will be the
specified object, instead of the object with the handler.
=== Other Stuff
- Various Clock fixes and improvements:
- Clock#tick when called for the first time, no longer considers the
creation time of the Clock instance to be "the previous tick",
when checking how much time has passed.
- Clock#tick won't do any extra delay if the frame has already taken
longer than the target.
- Clock.delay and Clock.wait handle negative numbers more gracefully.
Instead of hanging for a long time, they act as if the values were 0.
- Deprecation: Screen.set_mode and Screen.instance (both aliases of
Screen.new) are deprecated and will be removed in Rubygame 3.0.
Use Screen.new or Screen.open instead.
- Deprecation: Ftor is deprecated and will be removed in Rubygame 3.0.
A mostly-compatible vector class will be provided at or before that time.
- Deprecation: MediaBag is deprecated and will be removed in Rubygame 3.0.
Use the NamedResource functionality of Music, Sound, and Surface instead.
== Rubygame 2.4.1
Release focus: Bug fixes; Ruby 1.9 compatibility.
=== Fixes
- Fixed: Module scope problems with EventHandler and triggers.
They were trying to find the Events module, which only worked if
you had done 'include Rubygame' somewhere.
- Fixed: Compiler warning in unmake_symbol().
=== Other Stuff
- Rubygame is compatible with Ruby 1.9.
- Build system is compatible with Ruby 1.9.
- Minor cleanup to build system internals.
== Rubygame 2.4.0
Release focus: Events.
=== Features
- New Events module, with a suite of new and revised event classes.
The new classes offer full functionality as the older classes.
- Use Rubygame::EventQueue#enable_new_style_events to enable the new
event classes. This will become the default in Rubygame 3.0.
- Uses symbols instead of integer constants for keyboard keys and
mouse buttons (e.g. :a, :space, :mouse_left, :mouse_right).
- Better unicode / international keyboard text input support.
(See Rubygame::Events::KeyPressed#string)
- More natural and memorable class naming scheme.
- New hook-based event handling system.
(NOTE: Requires use of the new event classes.)
- Rubygame::EventHandler class.
EventHandler holds many EventHook instances. It handles each event
by passing it to matching hooks.
- Rubygame::EventHandler::HasEventHandler mixin module.
Include this in your custom classes to add easy event handling
and event hook creation abilities.
- Rubygame::EventHook class.
- Rubygame::EventActions module.
Has several pre-made event action classes to use with EventHook.
- Rubygame::EventTriggers module.
Has several pre-made event trigger classes to use with EventHook.
- Added Rubygame.enable_key_repeat and Rubygame.disable_key_repeat.
Thanks to atiaxi for this new feature!
=== Fixes
- Fixed: EventQueue#peek_each didn't yield any events.
- Fixed: Segfault in extract_rgba_u8_as_u8() on x86_64 systems.
Thanks to ElCuGo for this fix!
- Fixed: Several "cast from pointer" warnings on x86_64 systems.
- Fixed: Build system didn't correctly compile with debug symbols
when using "debug" option.
- Fixed: Surface#get_at didn't work correctly for 8-bit Surfaces.
- Fixed: Ftor.new_from_to would always complain about "wrong number
of arguments". Thanks to atiaxi for this fix!
=== Other Stuff
- The panda demo (samples/demo_rubygame.rb) has been renovated to
demonstrate how to use the new features, and to be a better example.
- Old event classes are deprecated and will be removed in 3.0.
- ActiveEvent (use Events::InputFocusGained,
Events::InputFocusLost,
Events::MouseFocusGained,
Events::MouseFocusLost,
Events::WindowMinimized, and
Events::WindowUnminimized)
- ExposeEvent (use Events::WindowExposed)
- JoyAxisEvent (use Events::JoystickAxisMoved)
- JoyBallEvent (use Events::JoystickBallMoved)
- JoyDownEvent (use Events::JoystickButtonPressed)
- JoyHatEvent (use Events::JoystickHatMoved)
- JoyUpEvent (use Events::JoystickButtonReleased)
- KeyDownEvent (use Events::KeyPressed)
- KeyUpEvent (use Events::KeyReleased)
- MouseDownEvent (use Events::MousePressed)
- MouseMotionEvent (use Events::MouseMoved)
- MouseUpEvent (use Events::MouseReleased)
- QuitEvent (use Events::QuitRequested)
- ResizeEvent (use Events::WindowResized)
== Rubygame 2.3.0
Release focus: Media resources.
=== Features
- Add: Rubygame::NamedResource mixin module
- Provides per-class resource repository and on-demand auto-loading
behavior.
- Add: Rubygame::Music class.
- Intended as a full replacement for Rubygame::Mixer::Music.
- Includes NamedResources mixin.
- NOTE: Requires SDL_mixer support.
- Add: Rubygame::Sound class.
- Intended as a full replacement for Rubygame::Mixer::Sample.
- Includes NamedResources mixin.
- NOTE: Requires SDL_mixer support.
- Update: Rubygame::Surface class.
- Includes NamedResources mixin.
- Add: Surface.load_from_string (NOTE: Requires SDL_image support.)
=== Fixes
- ColorBase had been accidently placed in the top level namespace in
Rubygame 2.2.0. It is now correctly placed in the Rubygame::Color
module.
=== Other Stuff
- Deprecation (will be removed in Rubygame 3.0):
- Rubygame::Mixer module and methods are deprecated.
- Rubygame::Mixer::Music class is deprecated.
Use Rubygame::Music class instead.
- Rubygame::Mixer::Sample class is deprecated.
Use Rubygame::Sound class instead.
- Rubygame::Surface.load_image is deprecated.
Use Rubygame::Surface.load instead.
- NOTE: Run ruby with -w flag or set $_v = true to enable run-time
deprecation warnings.
== Rubygame 2.2.0
Release focus: Colors.
=== Features
- Add: Rubygame::Color module
- ColorRGB, ColorHSV, and ColorHSL classes.
- X11 and CSS palettes of pre-defined colors.
- Surface methods can accept ColorRGB etc. for colors.
- Automatic lookup of color names when a string or symbol
is passed for a color to Surface methods.
- Add: Surface#set_at().
- Add: Screen#icon=().
=== Bug Fixes
- Fix: Surface#draw_arc was incorrectly documented as Surface#draw_pie
=== Improvements
- Rect#collide_rect? is now faster.
- Sprites::Group#collide_group can take a block; arguments are deprecated.
=== Other Stuff
- Build system correctly recompiles if source has changed.
- Build system option syntax has changed. See the README: Advanced Install.
- Build system will correctly exit with an error status if it can't compile;
fixes Rubygems trying to install even when compile failed.
=== Acknowledgements
- Michael Swiger (mokkan) for Screen#icon=.
- ippa for optimizing Rect#collide_rect?.
== Rubygame 2.1.0
=== Features
- Add: Mixer::Music module.
- Add: Mixer.driver_name method.
- Add: Depth sorting for sprites.
- Add: Sprite#undraw.
- Add: TTF#size_utf8 and TTF#size_unicode.
- Add: Rubygame.key_name.
=== Bug Fixes
- Fix: Bug with dirty rectangles in UpdateGroup.
- Fix: Incorrect docs for joy-hat direction value.
- Fix: Segfaults when Joysticks are garbage-collected after Rubygame has quit.
- Fix: Segfaults when using Surface#convert, #to_display, or #to_display_alpha
when no video mode has been set.
- Fix: Surface#get_at returning [0,0,0,0] when it shouldn't.
- Fix: Sprites::Group#collide_group behaving incorrectly (again).
- Fix: Build system doesn't correctly handle quoted spaces in --cflags/--lflags.
(NOTE: Use CFLAGS/LDFLAGS environment variables now, instead.)
=== Known Issues
- Build system won't detect changed source files and recompile as necessary;
you must "rake clobber build" after a change.
=== Other Stuff
- Added argument checks to several Rect methods.
- Surfaces can be created with no Screen mode set.
- Mixer.open_audio has default values.
- TTF style getting/setting refactored under the hood.
- Added demo_music.rb and a sample song.ogg to try out music.
=== Acknowledgements
- Johan Berntsson for adding Mixer::Music.
- Daniel Neis Araujo for adding Sprite#undraw.
- Roger Ostrander (denor) for and bug fixes and adding Rubygame.key_name.
- Bjorn De Meyer (beoran) for numerous patches and improvements.
== Rubygame 2.0.1
=== Bug Fixes
- Fix: Segfaults in several C methods when passed an unexpected argument type.
- Fix: Segfaults in Screen#update and Screen#update_rects when the Rect(s)
extended out of the Screen bounds.
- Fix: Ftor#magnitude= behaving incorrectly.
- Fix: Rect#clip! behaving incorrectly.
- Fix: Sprites::Group#collide_group behaving incorrectly.
- Fix: Surface#savebmp wanting too many arguments.
=== Other Stuff
- Argument handling for C methods is now more robust under the hood.
- C methods which expect Array arguments will now also work with objects
that can be converted to an Array (with #to_ary), such as Ftor.
== Rubygame 2.0.0:
*NOTICE*: version 2.0.0 is not totally backward-compatible with 1.1.0.
You may have to update existing applications to the new syntax.
(Hence the major version number going up.)
=== API Changes
==== Basic audio playback with SDL_mixer
- Add: Rubygame::Mixer module (basic SDL_mixer audio playback).
- Add: Rubygame::Mixer::Sample class (load audio samples).
==== Event management system revamped
- Add: Rubygame.fetch_sdl_events()
- Add: Rubygame::EventQueue class.
- Add: Rubygame::MailQueue mixin.
- Retire: Rubygame::Queue class.
==== Surface swallows Draw, Transform, and Image methods
- Updated: Rubygame::Surface class
- Add: Surface.load_image() (migrated from Image).
- Add: ##savebmp (migrated from Image).
- Add: ##draw_* (migrated from Draw).
- Add: ##rotozoom, ##zoom (migrated from Transform).
- Add: ##zoom_to method.
- Retire: Draw module (methods merged into Surface).
- Retire: Transform module (methods merged into Surface).
- Retire: Image module (methods merged into Surface).
==== Clock class improved
- Updated: Rubygame::Clock class
- Clock is now directly under Rubygame (not Rubygame::Time).
- Clock.new() takes no arguments, but yields self if a block is given.
- framerate limiting with ##tick is now much more accurate.
- Add: Clock.runtime(), Clock.wait(), Clock.delay() (migrated from Time)
- Rename: ##fps to ##framerate.
- Rename: ##desired_fps to ##target_framerate.
- Rename: ##desired_mspf to ##target_frametime.
- Rename: ##time to ##lifetime.
- Retire: Time module (methods merged into Clock).
==== Experimental classes/modules
- Add: Rubygame::MediaBag class.
- Add: Rubygame::Ftor class.
- Add: Rubygame::Hotspot mixin.
- Change: Rubygame::SFont class must be explicitly imported
(require 'rubygame/sfont').
==== New system for version and capability detection
- Rubygame::VERSIONS: a hash table with the version numbers of rubygame,
SDL, and any SDL_* libraries that were compiled in.
- Methods which are not supported will no be defined in the namespace;
formerly, they would be defined but nonfunctional (issued a warning and
returned nil).
==== Miscellaneous other changes and additions
- Add: Rubygame.quit (cleanly exit SDL; resets resolution after fullscreen).
- Updated: Rubygame::Surface class
- Argument list for Surface.new() has changed.
- Add: ##clip and ##clip=.
- Add: ##convert, ##to_display, and ##to_display_alpha.
- Updated: Rubygame::Screen class
- Rename: Screen.set_mode() to Screen.new().
- Add: Screen.set_mode() and Screen.instance() (aliases for Screen.new()).
- Add: ##title, ##title= (replaces ##caption and ##set_caption)
- Updated: Rubygame::TTF class
- Add: ##render_utf8 and ##render_unicode methods.
- Add: ##size_text method.
=== Bug Fixes
- Fix several erroneous Rect methods.
- Fix "bignum out of range of unsigned long (RangeError)" when using
Rubygame::FULLSCREEN.
=== Other Stuff
- New build/install system with Rake.
- Split the monolithic rubygame extension into modules:
rubygame_core:: main SDL interface.
rubygame_gfx:: SDL_gfx interface.
rubygame_image:: SDL_image interface.
rubygame_mixer:: SDL_mixer interface.
rubygame_ttf:: SDL_ttf interface.