-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCHANGELOG-PREV.txt
1813 lines (1677 loc) · 99.2 KB
/
CHANGELOG-PREV.txt
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
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
* 3.24
** [Pro] [Bugfix] Triangles can now render a partial area of a render target again.
Bug was introduced in 3.22.
** [Pro] [iOS] Deployment target SDK for dev builds dropped to 11.0 to match production
A larger number of iOS devices are supported with this change.
** [Pro] [Bugfix] Portrait orientation is respected even when hd=false.
** [Itch.io] Embedded web builds on Itch.io no longer have a weird margin at the top of the game.
Itch.io's embed logic for web builds looks to have changed,
=./.dragonruby/stubs/html5/dragonruby-html5-loader.js= no longer sets the canvas size to 100%
of the width and height of the container. This seems to have resolved the issue with how Itch
does its iFrame-based presentation.
** [Support] Added more options and documentation to =metadata/cvars.txt=.
** [Support] Fixed memory leaks in dragonruby-httpd.
** [Support] Remote hotload added to all platforms and works on the Steam Deck.
*** Creating a build with remote hotloading enabled.
1. Run =./dragonruby-publish --package-with-remote-hotload=.
2. Start dragonruby in dev mode, binaries under the =./builds= directory will look
for your dev instance on startup. Machines running the hotload
enabled binary need to be on the same network as your dev machine.
3. Code updates will be reflected within the running binaries.
Note: For iOS run the following from the DragonRuby Console:
~wizards.ios.start env: :hotload~
*** Steps to hotload to the Steam Deck:
Demo video here: https://youtu.be/id5RcgynKwc
**** Easy Setup
1. Restart the Steam Deck in Desktop Mode.
2. Copy your game binary onto an SD card and open up the game on your Steam Deck.
**** Advanced Setup (if you want to update your game without needing an SD Card)
1. Restart the Steam Deck in Desktop Mode.
2. Open up Konsole and set an admin password via ~passwd~.
3. Disable readonly mode: ~sudo steamos-readonly disable~.
4. Update pacman ~sudo pacman-key --populate archlinux~.
5. Update sshd_config =sudo vim /etc/ssh/sshd_config= and
uncomment the ~PubkeyAuthentication yes~ line.
6. Enable ssh: ~sudo systemctl enable sshd~.
7. Start ssh: ~sudo systemctl start sshd~.
8. With the steps above you can use ~scp~ to copy the game over
from your dev machine without needing an SD Card:
~scp -R ./builds/SOURCE.bin deck@IP_ADDRESS:/home/deck/Downloads~
Note: Steps 2 through 7 need only be done once.
Note: ~scp~ comes pre-installed on Mac and Linux. You can
download the tool for Windows from https://winscp.net/eng/index.php
* 3.23
** [Pro] [VR] Headset and controller orientation added.
A normalized vector with ~x,y,z~ is returned for all orientations.
- ~args.inputs.controller_one.left_hand.orientation.(x|y|z)
- ~args.inputs.controller_one.right_hand.orientation.(x|y|z)
- ~args.inputs.headset.orientation.(x|y|z)
** [Pro] Texture atlases explicitly search for a single directory to avoid long startup times.
The default directory that will be searched is =sprites=. You can override the default
directory by specifying ~sprites_directory=DIRECTORY~ in =game_metadata.txt=.
** [Support] Line and border rendering is 140%+ faster for ~Hash~ and ~Class~ based representations.
** =cvars.txt= added with HTTP logging disabled.
=./mygame/metadata/cvars.txt= has been added to the zip file with the following contents:
#+begin_src cvars
log.filter_subsystems=HTTPServer
#+end_src
** [Support] ~Numeric#vector~ has been deprecated.
Use ~Numeric.to_vector~ which returns a ~Hash~ containing ~x~ and ~y~ instead of ~Array/Tuple~.
** [Bugfix] ~args.inputs.shift_(left|right)~ report the correct value in web builds.
* 3.22
** [Pro] [Support] Triangles support texture atlases.
** [Bugfix] ~args.inputs.mouse.relative_(x|y)~ report correct values (regression when HD support was added).
** [Bugfix] Console menu buttons are positioned correctly in both portrait and landscape mode.
** [Samples] Sample app showing scene management added.
Location: =./samples/02_input_basics/07_managing_scenes/=
* 3.21
** [Pro] [Support] Added portrait mode.
In =metadata/game_metadata.txt= you can specify ~orientation=portrait~ to build a game that has
a logical canvas of 720x1280 (as opposed to ~landscape~ 1280x720).
** [Pro] [iOS] ~$wizards.ios.start~ creates the correct metadata file for portrait mode games.
** [Pro] [Support] All Screen renders/scales correctly even if the window is smaller than 720p.
** [Pro] [Support] ~args.layout.rect~ expanded to support Portrait mode (and simplified).
** [Pro] [Support] Render targets render fonts in High DPI if ~highdpi=true~.
** [Support] Added a more descriptive error message to ~dragonruby-publish~ if files needed to publish
are missing.
** [Samples] Added sample app demonstrating ~args.layout.(rect|rect_group|point)~ for ~orientation=portrait~.
Location: =./samples/07_advanced_rendering_hd/04_layouts_and_portrait_mode=
** [Samples] Ray Casting sample app added.
A big thank you to =Brenner Little@discord= for granting permission to include this as a sample app.
Location: =./samples/99_genre_3d/04_ray_caster=
** [OSS] The following PRs have been merged in from https://github.com/DragonRuby/dragonruby-game-toolkit-contrib.
- Add documentation section about accessing files #133
* 3.20
** [Pro] [Support] ~highdpi=true|false~ can be specified in =./metadata/game_metadata.txt=.
** [Pro] [Bugfix] Texture atlases respect sprite properties ~tile_(x|y|w|h)~ and ~source_(x|y|w|h)~.
** [Pro] [Bugfix] Texture atlases retrieval respects non-standard game directory.
If your startup time for your game is still long, DM us on our Discord Server so we can troubleshoot.
** [Pro] [Samples] Added sample app that shows how to use ~args.grid.allscreen_*~ properties.
Located at =./samples/07_advanced_rendering_hd/03_allscreen_properties=.
** [Support] Api usage for mouse grab is ~$gtk.set_mouse_grab(0|1|2)~, NOT ~$gtk.set_mouse_grab(true|false)~.
- 0: disables mouse grab.
- 1: enables mouse grab with cursor visible.
- 2: enables mouse grab with cursor invisible.
SDL Hints have been added to help mouse stay within the bounds of the window (MacOS may still be flakey with window boundaries though).
** [Bugfix] game_metadata.txt configuration retrieval increased to 1024 lines.
** [Support] Added ~args.events.resize_occurred~ which will return ~true~ if the game window has been resized.
** [Support] ~scale_quality=0|1|2~ can be specified in =./metadata/game_metadata.txt=. This property can be set at all license tiers.
- 0: nearest neighbor
- 1: linear
- 2: anti-aliasing
* 3.19
** [Pro] Updates to DragonRuby Game Toolkit Pro.
The following updates have been made to the Pro license.
*** [Support] HD rendering capabilities added.
HD rendering capabilities have been added for the Pro version of DragonRuby Game Toolkit.
Detailed documentation can be found inside of =./metadata/game_metadata.txt= and in the sample apps.
Check out the following YouTube Video for a demo of All Screen Mode: [[https://youtu.be/Rnc6z84zaa4]]
Check out the following YouTube Video for a demo of Texture Atlases: [[https://youtu.be/gH0XiafWQ_c]]
Clepto Frog and The Little Probe both have HD Configurations that can be enabled. Be sure to play
around with them.
**** Rending support for 720p to 5K.
A sample app that shows HD Rendering can be found at =./samples/07_advanced_rendering_hd/01_hd_labels=
To enable HD Mode set ~hd=true~ inside of =./metadata/game_metadata.txt=. Your game will
be scaled to best fit the screen size that it's being run on (labels inside of render targets
are also rendered at native scale).
**** Texture Atlases.
A sample app that shows how texture atlases work can be found at =./samples/07_advanced_rendering_hd/02_texture_atlases=
With HD mode enabled. DragonRuby will automatically use HD sprites given the following
naming convention (assume we are using a sprite called =player.png=):
| Name | Resolution | File Naming Convention (enum) |
|-------+------------+-------------------------------|
| 720p | 1280x720 | =player.png= |
| HD+ | 1600x900 | =player@125.png= |
| 1080p | 1920x1080 | =player@125.png= |
| 1440p | 2560x1440 | =player@200.png= |
| 1800p | 3200x1800 | =player@250.png= |
| 4k | 3200x2160 | =player@300.png= |
| 5k | 6400x2880 | =player@400.png= |
The current file naming convention DR is trying to use can be accessed
via ~args.grid.render_scale_enum~ (be sure to take a look at the sample app).
**** All Screen Mode.
To enable All Screen Mode set ~allscreen=true~ inside of =./metadata/game_metadata.txt=. All
Screen Mode removes letter boxing around your game allowing you to render outside of the
1280x720 logical area (unsafe screen area).
You can also set ~allscreen_max_scale=RENDER_SCALE_ENUM~ which controls how your games scales
past 720p (giving you more or less unsafe screen area).
The following properties on ~args.grid~ can assist in rendering off-screen:
- ~allscreen_left~
- ~allscreen_right~
- ~allscreen_width~
- ~allscreen_height~
- ~allscreen_width~
- ~allscreen_height~
- ~allscreen_offset_x~
- ~allscreen_offset_y~
- ~render_width~
- ~render_height~
NOTE: All ~allscreen~ values above are given in the logical 1280x720 scale (you will still continue
to render your game assuming 1280x720).
*** [Pro] [Support] [VR] Simulator, Device Tracking, Z-Depth Buffering
Some much needed apis have been added to DragonRuby Game Toolkit VR.
**** Z-Depth Buffering
Sprites are automatically sorted based off of their ~z~ property (you no
longer have to manually sort primitives within your game). If you see visual
tearing, it means that two primitives are competing for the same Z depth
and one has to be moved forward or back.
Note: Z-depth buffering assumes that your primitives are not transparent. If
you are using transparent sprites, you must sort by Z values for cascading
transparencies to render _mostly_ correctly. This is a fundamental limitation
of OpenGL. You can read more about this limitation at [[https://www.sjbaker.org/steve/omniv/alpha_sorting.html]].
**** Headset and controller tracking added.
The following device locations are now available.
- ~args.inputs.headset.position.(x|y|z)~
- ~args.inputs.controller_one.left_hand.position.(x|y|z)~
- ~args.inputs.controller_one.right_hand.position.(x|y|z)~
Things to note about the values above:
- All location values are floating point numbers representing the relative distance from the
Boundary's Origin.
- The floating point values represent the number of meters away from that origin position.
- 96 pixels maps to 1 meter in VR.
- DR's VR world is 1280x1280x1280 (try the VR Skybox sample app to see what that scale looks like).
**** VR Simulator
You can see how your game looks like in VR using ~./dragonruby-vrsim~ (start up that process as opposed
to ~./dragonruby~).
Controls:
- You can use a USB controller to simulate the buttons on the Oculus Quest controllers.
- Pressing =ctrl+m= will capture mouse and keyboard input. Use =WASD/arrow= keys to move
around the VR environment. Mouse to look around. and =I= and =K= to fly up and down in the
VR environment.
- Press =ctrl+g= to exit mouse capture.
Note: There's still a bit of work that needs to be done with the simulator. Hope you find what's
currently there useful.
*** [Support] [iOS] Remote hotloading on iOS devices logs to ~spam~ category instead of ~debug~.
** [Pro] [Indie] [Standard] Updates to all license tiers.
The following updates are available at all licensing tiers.
*** [Support] Added ~$gtk.set_mouse_grab(true/false)~.
*** [Support] Added ~$gtk.list_files(dir)~, ~$gtk.stat_file(path)~, and ~$gtk.delete_file(path)~.
You can view documentation for file apis:
- Under =./docs/docs.txt
- At [[http://docs.dragonruby.org]] (latest version).
- Or at [[http://localhost:9001]] while your game is running.
*** [Support] ~log_(spam|debug|info|warn|error|unfiltered)~ functions added to ~Object~.
The logging apis that were only available via ~$gtk~ are now accessible at the top level.
*** [Support] Performance enhancements to ~GTK::Geometry::intersect_rect?(rect_1, rect_2, tolerance)~
The ~intersect_rect?~ api has been re-implemented in C which significantly increases performance.
*** [Support] Added ~GTK::Geometry::find_intersect_rect(rect, rects, tolerance)~
A helper method called ~find_intersect_rect~ has been added.
If you find yourself doing:
#+begin_src ruby
collision = args.state.enemies.find { |e| e.intersect_rect? args.state.player }
#+end_src
You can instead do the following for a significant performance boost:
#+begin_src ruby
collision = args.geometry.find_intersect_rect(args.state.enemies, args.state.player)
#+end_src
*** [Samples] Added sample app that shows how to wrap long lines of text.
Location =./samples/01_rendering_basics/01_labels_text_wrapping=.
*** [Samples] Screen shake sample app added.
Location =./samples/07_advanced_rendering/07_shake_camera=.
*** [Samples] Physics sample app added that shows interactions between a bouncing ball and arbitrary lines.
Located at =./samples/04_physics_and_collisions/11_bouncing_ball_with_gravity=.
*** [Samples] Button sample app added that shows how to create a button and wire up click behavior.
Located at =./samples/05_mouse/05_clicking_buttons=.
*** [Samples] File api sample app has been added that shows how to use all the available file apis.
Located at =./samples/06_save_load/00_reading_writing_files=.
*** [Bugfix] ~args.audio~ no longer crashes when a hash key is reused.
*** [OSS] The following PRs have been merged in from https://github.com/DragonRuby/dragonruby-game-toolkit-contrib.
- Add scaling to Tweetcart scene! #131
- Use begin blocks to improve console eval #125
- Improve responsivity of Control hotkeys (e.g. Ctrl-g, Ctrl-u, Ctrl-d) #126
- Add default value to Tweetcart no_clear! #132
- Bump regex from 1.4.2 to 1.5.5 in /samples/13_rust_extensions/02_intermediate/regex-capi #121
* 3.18
** [Pro] [Bugfix] [iOS] iOS packaging wizard removes =.DS_Store= metadata from codesigned binaries.
** [Bugfix] ~args.inputs.controller_(three|four)~'s ~truthy_keys~ are now cleared at the end of ~tick~.
** [Bugfix] =dragonruby-publish= supports the packaging of larger audio files.
** [Bugfix] =http://localhost:9001/changelog= no longer throws an exception.
** [Bugfix] [OSS] ~Numeric#clamp_wrap~ now includes the minimum value.
Thanks to Hiro_r_b@discord for the PR.
** [Bugfix] [OSS] ~Tweetcart#no_clear!~ respects the ~render_target_name~ parameter that is passed to it.
Thanks to Hiro_r_b@discord for the PR.
** [Samples] Path finding sample apps have been updated to user ~Hash~ based primitives.
Location of Path finding samples: =./samples/13_path_finding_algorithms=
** [OSS] ~args.gtk.(save|load)_state~ has been open sourced.
** [OSS] The Console now uses a scoped class called ~ConsoleEvaluator~.
- The global variables ~$gtk~, ~$args~, $wizards~ etc are still available,
but now you can type ~gtk.reset~ instead of ~$gtk.reset~.
- Console accepts ~search "search term"~ which will search the documentation and return topics that match.
** [OSS] Small styling changes have been made to the Console.
** [Support] Added documentation for ~args.gtk.(mouse|keyboard)_focus~.
** [Support] Added documentation for ~args.gtk.platform?~.
** [Support] Added ~repl_silent~ which suppresses showing the Console (usable in =app/repl.rb=)
The following when added to =app/repl.rb= will bring up the Console after execution:
#+begin_src ruby
repl do
args.state.player.x = 100
args.state.player.y = 200
puts "Player location is #{args.state.player.x}", #{args.state.player.y}"
end
#+end_src
Using ~repl_silent~ will NOT bring up the Console:
#+begin_src ruby
repl_silent do
args.state.player.x = 100
args.state.player.y = 200
puts "Player location is #{args.state.player.x}", #{args.state.player.y}"
end
#+end_src
* 3.17
** [Bugfix] VSync was set to false as the default. This has been reenabled.
* 3.16
** [Pro] [iOS] ~tick~ given a higher thread priority.
** [Pro] [iOS] background music session category set to Ambient.
This will keep music volume playing from another app from being lowered.
** [Pro] [Indie] Added ~gtk.get_pixels file_name~ which will return a pixel buffer.
You can store ~gtk.get_pixels~ into a variable and use it to get the color
of a sprite at a specific pixel location (eg collision map).
** [Pro] [Indie] Added sample app that shows how to load a ~pixel_array~ from a png.
Sample app is located at =./samples/07_advanced_rendering/06_pixel_arrays_from_file=.
** [Bugfix] Html builds now persists files across sessions.
** [Support] Touch apis are now available in Standard Edition and work in web builds.
** [Support] DawnBringer color palette added to Tweetcart.
** [Support] Added ~args.inputs.controller_(three|four)~.
** [Support] Added ~gtk.open_game_dir~ which will open the sandbox location for your game.
** [Support] DragonRuby Dev Server (http://localhost:9001) now contains a link to source code backups.
** [Support] Game runs at a faster fps when it doesn't have focus.
You can configure the framerate via ~renderer.background_sleep~ cvar.
** [Support] ~./dragonruby-publish~ now sets the ~--userversion~ flag on Butler.
** [Support] Added ~gtk.reset_next_tick~ which will invoke ~gtk.reset~ before the next tick is invoked.
This will keep you from having exceptions caused by invoking ~gtk.reset~ part way through your ~tick~ method.
** [OSS] ~gtk.(save_state|load_state)~ open sourced.
** [OSS] DragonRuby Console now persists local variables (thanks mooff@discord for the contribution).
** [OSS] PR that cleans up ~./dragon/api.rb~ has been merged in (thanks kfischer_okarin@discord for the contribution).
* 3.15
** [Support] [Important] Server Side Request Forgery vulnerability patch for DragonRuby Game Toolkit Web Console (http://localhost:9001)
All http endpoints that submit data to DragonRuby now only accept ~Content-Type~ with the *exact value* of ~application/json~.
This change patches a SSRF vulnerability that would allow a malicious website to process request against
~http://localhost:9001/dragon/eval/~ and execute arbitrary code on your machine.
Thanks to sophira@discord for finding a specific edge case where the Content-Type could include both ~multipart/form-data~ and ~application/json~.
Source code for the Web Console is available at [[https://github.com/DragonRuby/dragonruby-game-toolkit-contrib/blob/master/dragon/api.rb]]
* 3.14
** [Support] Performance improvements to ~Array#map_with_index~.
** [Support] Performance improvements to ~Array#map~.
** [Bugfix] ~Matrix::normalize~ when given a vector that contains all zeros, returns a vector containing all zeros instead of ~nil~.
** [Bugfix] ~Geometry::line_intersect~ correctly handles vertical lines.
** [Bugfix] ~Geometry::ray_test~ reports ~:left~, ~:right~, ~:on~ correctly for lines of negative slope.
** [Samples] See the following sample app for usage of ~Geometry::(line_intersect|ray_test)~
Location: =./samples/99_genre_platformer/the_little_probe=
** [Samples] New sample app added showing how to create a boss battle.
Location: =./samples/99_genre_boss_battle/boss_battle_game_jam=
* 3.13
** [Bugfix] [VR] Cube World sample app includes ~MatrixFunctions~ and no longer throws an exception.
** [Bugfix] ~Array#reject~ properly handles invocation when a block isn't provided.
** [Bugfix] ~Matrix.(normalize|normalize!) computes unit vector correctly.
* 3.12
** [Support] Improved performance for processing many to many collisions.
Sample app has also been updated: =/samples/09_performance/09_collision_limits_many_to_many/=
** [Support] 5% to 15% performance improvement on non-static output rendering.
** [Support] ~Array#(map|reject)~ performance improved ~25%.
** [Bugfix] ~Array#sample~ no longer leaves out the last element from selection.
** [Bugfix] ~$gtk.(save|load)_state~ correctly persists value types with the same value.
* 3.11
** [Bugfix] Fixed regression in C rendering pipeline that caused a degradation in hash rendering performance.
** [Bugfix] ~Hash.(merge|merge!) respects block that is passed into it. Regression was introduced in 2.14.
** [Support] Matrix math apis moved to ~Matrix~ class/module.
Instead of ~vec3(1, 1, 1)~, you will need to do ~Matrix.vec3(1, 1, 1)~.
Optionally you can mixin the ~MatrixFunctions~ module into your class to remove the ~Matrix~
prefix requirement.
VR and Advanced Rendering sample apps have been updated to reflect this change.
Option 1:
#+begin_src ruby
def tick args
puts Matrix.vec4(1, 1, 1, 1)
end
#+end_src
Option 2:
#+begin_src ruby
include MatrixFunctions
def tick args
puts vec4(1, 1, 1, 1)
end
#+end_src
* 3.10
** [Pro] [VR] Cubeworld sample app added =./samples/14_vr/08_cubeworld_vr=
** [Pro] [VR] Gimbal Lock sample app added =./samples/14_vr/05_gimbal_lock=
** [Pro] [VR] Let There Be Light sample app entity count increased given C based rendering pipeline.
** [Pro] [VR] Space Invaders Z Rendering reworked to spread out enemies.
** [Standard] Small performance improvements to ~args.geometry.find_collisions~.
** [Standard] ~mul~ performs component-wise multiplication on ~vec~ and ~float~.
** [Standard] ~add~ performs component-wise addition on ~float~.
* 3.9
** [Pro] [VR] Rendering pipeline handles the enumeration of ~args.outputs~ in C.
** [Pro] [VR] Triangle support added.
** [Pro] [VR] [Bugfix] Fixed exception related to rendering lines when a width/height isn't provided.
** [Indie] [Samples] Sample apps added to show matrix apis in conjunction with triangles.
Three sample apps have been added to demonstrate these capabilities:
- 2D matrix transforms: =./samples/07_advanced_rendering/15_matrix_and_triangles_2d=
- 3D matrix transforms: =./samples/07_advanced_rendering/15_matrix_and_triangles_3d=
- 3D matrix transforms advanced: (with mouse look): =./samples/07_advanced_rendering/15_matrix_cubeworld=
** [Standard] [Support] Hash-based sprite rendering is a tiny bit faster.
** [Standard] The following matrix math apis have been added to ~Object~ (accessible from anywhere):
The intent of these matrix functions is to mirror GLSL matrix apis.
- ~vec(2|3|4)~: Creates a ~vec~ with the given dimension. Represented as a ~Hash~
with the ~primitive_marker~ set to ~:vec2~, ~:vec3~, or ~vec4~.
- ~mat(2|3|4)~: Creates a ~mat~ with the given dimension. Represented as a ~Hash~ of ~Hash~es
with the ~primitive_marker~ set to ~:mat2~, ~:mat3~, ~:mat4~ at the top level,
and ~:vec(2|3|4)~ for each vector component.
- ~add~: Adds matrices given to the function (returns ~nil~ if a matrix multiplication isn't valid).
- ~mul~: Multiplies matrices given to the function. Returns ~nil~ if the matrices are incompatible.
- ~dot~: Performs a scalar dot product for matrices given a list of matrices. Returns ~nil~ if the matrices are incompatible.
- ~cross~: Performs a cross product for matrices given a list of matrices. Returns ~nil~ if the matrices are incompatible.
- ~normalize~: Normalizes a vector. Returns the new normalized vector as a new ~Hash~.
- ~normalize!~: Normalizes a vector. Mutates the vector passed in.
- ~distance~: Returns the distance between to vectors. Returns ~nil~ if the vectors are incompatible.
- ~Hash#+~: Delegates to ~add~ for matrix multiplication. Returns ~nil~ if the matrices are
incompatible or if ~primitive_marker~ isn't set on the ~Hash~.
- ~Hash#*~: Delegates to ~mul~ for matrix multiplication. Returns ~nil~ if the matrices are
incompatible or if ~primitive_marker~ isn't set on the ~Hash~.
** [Standard] Added ~Numeric#from_(bottom|left)~ which will take into consideration the origin of ~args.grid~.
** [Standard] Added ~Keyboard#(left|right|up|down)_arrow~ which excludes WASD keys.
** [Standard] Log statements added when a controller is connected.
** [OSS] Synced changes to =api.rb= from open source repo.
* 3.8
** [Pro] [iOS] Fixed issue related to app tombstoning and the simulation loop attempting to catch up when brought back to the foreground.
** [Pro] [iOS] iOS wizard reports CLI errors from ~sh~ commands.
** [Pro] [Android] Better organization of =./.dragonruby/stubs/android/= template files.
** [Support] 3Dconnexion SpaceNavigator device ignored as a controller.
** [OSS] [Support] PR merged: ~Enumerable#sum~ .
** [OSS] [Support] PR merged: Bug fix in reporting test failures accurately .
** [OSS] [Support] PR merged: ~Tweetcart::scene!~ now accepts ~w~ and ~h~ as optional parameters.
** [OSS] [Support] PR merged: ~Tweetcart::tc~ alias to ~$args.state.tick_count~.
** [Support] Performance improvements to rendering.
1. You should see a 10% to 30% overall increase in rendering performance across all primitives.
2. You should see a 50% to 200% increase in rendering ~sprites~ represented as ~Hash~.
3. Game Toolkit's render loop no longer defines/calls ~GTK::Runtime#primitives(pass)~. The rendering pipeline
handles the enumeration of ~args.outputs~ in C.
You can define ~GTK::Runtime#primitives(pass)~ if you want to
override this core rendering behavior. A sample app has been added to demonstrate this:
=./samples/07_advanced_rendering/15_override_core_rendering=
It is STRONGLY recommended that you do NOT override core rendering
behavior unless you know what you're doing.
** [Bugfix] ~Hash#(left|right|top|bottom)~ reports the correct value if any one of those properties is assigned a value.
* 3.7
** [Pro] [Android] Added support for Google Play App Bundles.
** [Pro] [Android] SDK compilation target updated to API 30.
** [Support] ~args.outputs.sprites~ will render the ~:pixel~ render target if ~path~ is not provided.
Example:
#+begin_src ruby
def tick args
# renders a sprite
args.outputs.sprites << { x: 0, y: 0, w: 100, h: 100, path: "sprites/square/blue.png" }
# renders a checker-box
args.outputs.sprites << { x: 100, y: 100, w: 100, h: 100, path: "sprites/square/does-not-exist.png" }
# renders a white square
args.outputs.sprites << { x: 200, y: 200, w: 100, h: 100 }
# equivalent to
args.outputs.sprites << { x: 200, y: 200, w: 100, h: 100, path: :pixel }
# renders a green square
args.outputs.sprites << { x: 300, y: 200, w: 100, h: 100, r: 0, g: 255, b: 0 }
# renders a green square
args.outputs.sprites << { x: 300, y: 200, w: 100, h: 100, r: 0, g: 255, b: 0, path: :pixel }
end
#+end_src
** [Bugfix] Added missing assets for triangle sample app.
* 3.6
** [Pro]
The following updates are available Pro license holders.
*** [VR] VR capabilities are now incorporated into the Pro DragonRuby License and no longer requires a separate download.
*** [VR] [Bugfix] ~args.controller_one.left_analog_y_perc~ reports the correct direction.
*** [iOS] iOS icons assets updated to pass latest submission requirements.
*** [iOS] [Bugfix] iOS production distribution now reports the correct value for ~$gtk.production~.
*** [Android] Android ~minSdkTarget~ lowered to version 23 from 26 to increase support more Android devices.
*** [VR] [Samples] Citadel sample app added that shows how to render 3d columns composed of rotated sprites.
Location: =./samples/14_vr/citadels=
*** [Bugfix] ~./dragonruby-publish~ no longer fails to publish to Itch (iOS and Android bundles are ignored).
** [Indie]
The following updates are available to Pro and Indie license holders.
*** [Support] [C Extensions] C extensions can now directly access the underlying runtime and extend it.
Example:
#+begin_src c
DRB_FFI_EXPORT
void drb_register_c_extensions_with_api(mrb_state *state, struct drb_api_t *api) {
drb_api = api;
struct RClass *FFI = drb_api->mrb_module_get(state, "FFI");
struct RClass *module = drb_api->mrb_define_module_under(state, FFI, "CExt");
struct RClass *base = state->object_class;
struct RClass *Adder = drb_api->mrb_define_class_under(state, module, "Adder", base);
drb_api->mrb_define_method(state, Adder, "add_all", add_all, MRB_ARGS_REQ(1));
}
#+end_src
*** [Support] ~args.outputs.solids~ and ~args.outputs.sprites~ can now render triangles.
Example:
#+begin_src ruby
def tick args
args.outputs.solids << {
x: 640 - 64, y: 400,
x2: 640, y2: 400 + 100,
x3: 640 + 64, y3: 400
}
args.outputs.sprites << {
x: 640 - 64, y: 400,
x2: 640, y2: 400 + 100,
x3: 640 + 64, y3: 400
path: 'dragonruby.png',
source_x: 0, source_y: 0,
source_x2: 128, source_y2: 100,
source_x3: 128, source_y3: 0
}
end
#+end_src
*** [Samples] Added sample app that shows how to hand craft a Ruby object in C.
Location: =./samples/12_c_extensions/04_handcrafted_extension=
*** [Samples] Added sample app that shows how to render triangles.
Location: =./samples/07_advanced_rendering/13_triangles=
*** [Samples] Added sample app that shows how to render a polygon using triangles.
Location: =./samples/07_advanced_rendering/14_triangles_trapezoid=
** [Standard]
The following updates are available to all license holders.
*** [Support] Emscripten (HTML builds) upgraded to 3.1.3.
*** [Support] libSDL upgraded to 2.0.20 (rendering performance increases anywhere from 5% to 20%).
*** [Support] ~attr_sprite~ incorporates properties needed to render a triangle for api compatibility.
*** [Support] Added ~args.geometry.find_collisions rects~ to do fast many-to-many collision checks.
A ~Hash~ is returned where the key is the reference to each rect that has a collision.
*** [Support] Added ~args.controller_(one|two).connected~ which returns ~true~ if a controller is present.
*** [Samples] Added many to many collisions sample app.
Location: =./samples/09_performance/09_collision_limits_many_to_many=
*** [Samples] Added cool platforming sample app.
Location: =./samples/99_genre_platformer/shadows=
*** [Bugfix] ~Numeric#frame_index~ now respects ~tick_count_override~ if the parameter is provided.
*** [Bugfix] ~Float#(sin|cos|sin_d|cos_d|sin_r|cos_r) added.
*** [Bugfix] DragonRuby gracefully loads even if one of your ruby files has a syntax error.
*** [Bugfix] ~args.audio~ properties correctly convert ~Integer~ values supplied to it.
*** [Legal] =eula.txt= added. Warning, it contains legal speak.
* 3.5
** [Support] stb_vobis upgraded to 1.22.
** [Bugfix] Ogg Vorbis deterioration issue fixed for x86 MacOS.
* 3.4
** [Pro] [Support] Added ~args.inputs.finger_(left|right)~.
** [Support] Added ~Numeric#(sin|cos)_d~ (an alias to ~Numeric#(sin|cos)~). The Numeric is assumed to be in degrees.
** [Support] Added ~Numeric#(sin|cos)_r~. The ~Numeric~ is assumed to be in radians.
** [Support] [Tweetcart] Added ~cos~ (assumes degrees), ~cos_d~, ~cos_r~ (for radians), ~sin~ (assumes degrees), ~sin_d~ ~sin_r~ (for radians) to Tweetcart's top level api.
** [Support] [Tweetcart] Added ~no_clear!(render_target_name)~ to Tweetcart's top level api which invokes ~args.outputs[render_target_name].clear_before_render = false~.
** [Support] Added documentation for render order, starting a new project, ~gtk.calcspritebox~.
** [Support] Added ~putz~ which is an alias to ~puts~ so it's less annoying to search and remove random ~puts~ statements you've sprinkled in your code.
** [Support] [Pro] [iOS] Better comments related to ~devcert~ ~prodcert~ specification in ~ios_metadata.txt~.
** [Samples] Added sample app that shows how to do dynamic lighting using ~blendmode_enum~ and ~render_targets~.
Location of sample app is =./samples/07_advanced_rendering/12_lighting=
* 3.3
** [Bugfix] ~fn.pretty_(print|format)~ correctly prints ~Arrays~ nested within a ~Hash~.
** [Support] Added docs for ~args.easing.ease~.
** [Pro] [Bugfix] iOS hotloading no longer continuously polls for a remote server if one isn't present on startup.
** [Pro] [Bugfix] iOS production builds correctly sign binaries.
** [Pro] [Support] Icons for iPad Pro 12.9 added.
** [Pro] [Support] Log output redirects to iOS Device's internal console.
** [Samples] Added sample app that simulates falling sand.
Location of sample app is =./samples/99_genre_simulation/sand_simulation=.
* 3.2
** [Bugfix] ~args.gtk.write_file~ now writes to the game directory in dev mode.
** [Support] Added ~args.gtk.set_cursor path, dx, dy~ which can be used to set the in game cursor to a sprite.
** [Support] In-game http server is now available in Pro, Indie, AND Standard tiers.
Take a look at the samples apps under =./samples/11_http=
** [OSS] DragonRuby's dev server api has been open sourced.
All source code that has been open sourced is available locally under =./docs/docs.txt=.
You can also access documentation at [http://localhost:9001] while your game is running.
** [Support] Added ~.mp3~ support to ~args.gtk.audio~.
Audio api sample is located at =/samples/07_advanced_audio/01_audio_mixer/=.
* 3.1
** [Bugfix] Fixed ~gtk.http_post_body~ fixed for MacOS Monterey (and any other OS's that are using more current versions of libcurl).
** [Bugfix] Fixed ~FrozenStringException~ when invoking ~puts nil~.
* 3.0
** [Summary]
*** Major Release
This is the RTM (release to market) version of DragonRuby Game Toolkit 3.0.
*** Oculus Quest/VR Support added to Pro License
You can watch the demo video at: [[DragonRuby VR][https://www.youtube.com/watch?v=I_s_kyOUgzM&ab_channel=RyanC.Gordon]]
DragonRuby Game Toolkit Pro license holders now have access to DragonRuby Game Toolkit - VR. Go to http://dragonruby.org to
download. The price of the Pro license has been increased to $128 per year. Anyone who currently has a Pro subscription will be
grand-fathered in with their current subscription price and will *NOT* see a price increase *EVER*.
*** Indie Subscription Tier
With the addition of VR capabilities to the Pro tier. A new Indie tier has been
created (which is cheaper than a Pro license). Here is the breakdown of
features between each Tier:
| Standard | Indie | Pro + VR |
|--------------------+-----------------------+-------------------------------------------|
| OSX | OSX | OSX |
| Windows | Windows | Windows |
| Linux | Linux | Linux |
| Raspberry Pi | Raspberry Pi | Raspberry Pi |
| Web Assembly | Web Assembly | Web Assembly |
| Web-based REPL | Web-based REPL | Web-based REPL |
| Itch.io Automation | Itch.io Automation | Itch.io Automation |
| - | C Extensions | C Extensions |
| - | Sound Synthesis | Sound Synthesis |
| - | In-game Web Server | In-game Web server |
| - | Byte-code Compilation | Byte-code Compilation |
| - | - | iOS |
| - | - | Android |
| - | - | Oculus Quest / VR Capabilities |
| - | - | MP4 Replay Export |
| - | - | Coming Soon: Triangle Primitive Rendering |
| - | - | Coming Soon: HD Mode |
| - | - | Coming Soon: All Screen Mode |
| - | - | Coming Soon: Portrait Orientation |
*** Sample Apps
Quite a few sample apps have been added which cover Mario style
platforming, Oculus Quest VR samples, 3D math concepts, advanced logging concepts, and
rendering labels inside of ~render_targets~.
** [MAJOR] This is a major release of DragonRuby Game Toolkit
This is a major release of DragonRuby Game Toolkit. It supports Ruby 3.0 language features
and contains apis that are anywhere from 30% to 200% faster.
Even though there are breaking changes, the exceptions that may occur
should be fairly straightforward to fix. If you need help, come to the DragonRuby
Discord Server: http://discord.dragonruby.org and we'll help you upgrade.
** [Samples]
*** New 3D sample app has been added that shows how to perform ~Matrix~ transforms.
Location: =./samples/99_genre_3d/03_yaw_pitch_roll=.
*** New Performance based sample app has been added that shows how to use ~Struct~.
Location: =./samples/09_performance/01_sprites_as_struct=.
*** New ~render_target~ sample app has been added that shows how to rotate a label using a ~render_target~.
Location: =./samples/07_advanced_rendering/00_rotating_label=
*** New Topdown RPG sample app has been added that replicates the casino room in Legend of Zelda.
Location: =./samples/99_genre_rpg_topdown/topdown_casino=
*** New Platforming sample app has been added that breaks down jumping mechanics like in Super Mario Bros.
Location: =./samples/99_genre_mario/01_jumping=
*** New Platforming sample app has been added that breaks down collision mechanics like in Super Mario Bros.
Location: =./samples/99_genre_mario/01_jumping_and_collisions=
*** New Advanced Debugging sample app has been added that shows off DR's new logging capabilities.
Location: =./samples/10_advanced_debugging/00_logging/app/main.rb=
** [Support]
*** [Pro] Embedded http server now supports IPv6.
*** [Pro] Ruby array C Extension generation.
*** [Performance] ~Hash~ value assignment is 16x faster. Rendering using ~Hashes~ is 10x faster.
This deficiency exists in mRuby and has been optimized in DragonRuby.
Because of this change, the following code is 16x faster:
#+begin_src ruby
some_hash = {}
some_hash[:a] ||= :some_value
#+end_src
In the event of a missing key, the execution speed is also 16x faster:
#+begin_src ruby
some_hash = { a: 10 }
some_hash[:b] # nil, 16x faster
some_hash[:a] # no speed change/already fast
#+end_src
*** Labels can support larger font sizes.
*** Structs can be used with ~args.outputs~.
*** ~gtk.benchmark~ is a bit more accurate.
*** Added ~gtk.docs_benchmark~.
*** Moved =./exceptions= and =./console_history.txt= under =./logs=.
*** Rendering performance improved for ~OpenEntity~.
*** New logging apis have been added.
*** Added ~args.gtk.version_indie?~ for the new Indie tier.
** [Bugfix]
*** Labels no longer shift vertically when the screen is resized.
*** ~args.inputs.mouse.wheel~ reports the correct direction on non Mac machines.
*** ~dragonruby-httpd~ works with Chrome.
*** Crashes related to unsupported Korean keyboard events on MacOS have been resolved. Thank you podo@discord for troubleshooting.
*** Fixed malformed http content for ~args.gtk.http_post_body~.
*** Crashes related to headless unit tests have been fixed.
** [MAJOR]
*** [SAFE] Ruby 3.0 language features are now available. The new syntax should be compatible with Ruby 2.0.
*** [SAFE] Except to see anywhere from 20% to 200% boost in performance overall.
*** [SAFE] [DIVERGENT] DragonRuby's Runtime returns a ~Float~ for integer division (retaining mRuby 2.x behavior).
In mRuby 3.0, ~1/2~ would return ~0 (Int)~. In the DragonRuby Runtime, ~1/2~ returns ~0.5 (Float)~. Use ~Numeric#idiv~ for
integer division.
*** [SAFE] [DIVERGENT] DragonRuby's Runtime retained ~rand~ generation algorithms from mRuby 2.0.
Incorporating 3.0's RNG algorithm would have resulted in unnecessary breaking changes that would have invalidated replays
of existing games.
*** [SAFE] [DIVERGENT] ~Hash~ in most cases will not discriminate between ~Float~ and ~Int~ keys (where the number after the decimal point is ~0~).
This was existing mRuby 2.0 behavior and was retained within this major release to avoid unnecessary breaking changes related to key lookup.
*** [BREAKING] Mutation of a ~frozen~ instance with ~include~ or ~extend~ throws an exception (in mRuby 2.0 this behavior did not occur).
Helpful error messages have been added where this type of mutation is most likely to happen.
*** [BREAKING] Arithmetic and comparison operations no longer attempt to coerce/infer types.
You will receive exceptions because of this. General troubleshooting tips for these exceptions:
1. Carefully read the ~backtrace~ for ~Exceptions~ that are thrown (come to our Discord if you need help).
2. Make sure all references to ~args.state~ have been initialized to a default value.
3. Audit ~Int/Float~ operations to make sure they are operating on variables
that have been initialized with a default value.
4. Audit ~String~ operations to make sure they are operating on variables
that have been initialized with a default value.
5. Audit ~Enumerable~ operations to make sure they are operating on variables
that have been initialized to a default value.
Special thanks to erquint@discord, leviondiscord@discord, and danhealy@discord for continuing to raise
debugging concerns with respect to arithmetic/implicit coercion.
*** [BREAKING] DragonRuby's "Level 1" Runtime has been updated to mRuby 3.0.
This is a major release of DragonRuby Game Toolkit. The breaking changes should be minimal, but unfortunately do exist.
Please report issues in our Discord and we will get them resolved right away: http://discord.dragonruby.org (mention @amirrajan).
A special thank you to podo@discord, hiro_r_b@discord, kfischer_okarin@discord, and leviondiscord@discord for troubleshooting.
A full explanation of DragonRuby's Multilevel Runtime Architecture can be found here: http://docs.dragonruby.org/#----what-is-dragonruby-
Please read through it so you have a better understanding of how DragonRuby is different than other Ruby runtimes.
It's VERY IMPORTANT to educate yourself on these differentiators. Especially if you find yourself being asked:
#+begin_quote
Why are you using Ruby to build games? Ruby is slow.
#+end_quote
*** [SOFT BREAK] In a small subset of situations (such as with frozen objects), ~Hash~ keys *will* differentiate between ~Float~ and ~Int~ keys.
This is new behavior in mRuby 3.0, so be cognizant of this subtlety if you receive an exception.
The following works in mRuby 2.0:
#+begin_src ruby
def tick args
sample_hash = { 3.0 => "float value resolved", 4 => "int value resolved" }
puts sample_hash[3.0] # float value resolved
puts sample_hash[3] # float value resolved
puts sample_hash[4.0] # int value resolved
puts sample_hash[4] # int value resolved
end
#+end_src
But in some instances, it may not work in 3.0:
#+begin_src ruby
def tick args
sample_hash = { 3.0 => "float value resolved", 4 => "int value resolved" }
puts sample_hash[3.0] # float value resolved
puts sample_hash[3] # might return nil
puts sample_hash[4.0] # might return nil
puts sample_hash[4] # int value resolved
end
#+end_src
If you know ahead of time if your keys are ~Int~s. Be sure to invoke ~.to_i~ on any keys that may have been
converted into a ~Float~ (especially when deserializing data from disk).
** [Pro] [Bugfix]
*** [Pro] Fixed Android bundling targeting Dalvik.
*** [Pro] iOS Wizard failed to stage correctly on a brand new project. This has been resolved.
*** [Pro] Auto discovering iOS development/distribution certificates was problematic and must now be explicitly defined.
=mygame/metadata/ios_metadata.txt= now requires the ~devcert~ and ~prodcert~ config values. Here is an example template:
#+begin_src txt
# ios_metadata.txt is used by the Pro version of DragonRuby Game Toolkit to create iOS apps.
# Information about the Pro version can be found at: http://dragonruby.org/toolkit/game#purchase
# teamname needs to be set to your assigned team id which can be found at https://developer.apple.com/account/#/membership/L7H57V9CRD
teamid=
# appid needs to be set to your application identifier which can be found at https://developer.apple.com/account/resources/identifiers/list
appid=
# appname is the name you want to show up underneath the app icon on the device
appname=
# devcert is the certificate to use for development/deploying to your local device
devcert=
# prodcert is the certificate to use for distribution to the app store
prodcert=
#+end_src
* 2.26
** [Pro] [Bugfix] [Android] Fixed crashes related to setting the package name with a non =org.*= prefix.
** [Bugfix] ~GTK::Runtime#serialize_state~ no longer persists data related to failed method invocations ~:__trash_count__~.
** [Bugfix] [Support] Exception is now thrown if a default value cannot be inferred for an entity's property.
** [Bugfix] Starting value for seeding ~GTK::Entity#entity_id~ is reset when ~GTK::Runtime#reset~ is invoked.
An empty ~OpenEntity~ will not be silently created (better stacktrace/explanation is provided instead).
** [Support] Framerate drops will no longer present an "Important Notification Occurred" status (it wasn't very useful).
** [Support] Added small delay in processing Console input if ~args.inputs.keyboard.key_down.enter~ is true.
This will keep the console from being dismissed because of ~$gtk.reset~ being pre-populated when an exception occurs.
** [API] Pre-defined ~:pixel~ render target now available.
Before ~(boot|tick)~ are invoked, a white solid with a size of 1280x1280
is added as a render target. You can use this predefined render target to
create solids and get ~args.outputs.sprites~ related capabilities.
Example:
This is an example showing how to render a red box using ~args.outputs.solids~:
#+begin_src ruby
def tick args
args.outputs.solids << {
x: 0, y: 0,
w: 64, h: 64,
r: 100, g: 0, b: 0
}
end
#+end_src
This will render the same red box, but leverages ~args.outputs.sprites~:
#+begin_src ruby
def tick args
args.outputs.sprites << {
x: 0, y: 0,
w: 64, h: 64,
r: 100, g: 0, b: 0
path: :pixel,
angle: 0
}
end
#+end_src
** [API] Initial exploratory cut of a =Tweetcart= API has been created.
The source code is available in the Contrib repo and also available locally under the =./docs/= directory.
Example:
The following code renders 10 ~Solids~ of various colors:
#+begin_src ruby
wht = [255] * 3
red = [255, 0, 0]
blu = [0, 130, 255]
purp = [150, 80, 255]
TICK {
bg! 0
slds << [0, 0, 3, 3, 0, 255, 0, 255]
sld! 10, 10
sld! 20, 20, 3, 2
sld! 30, 30, 2, 2, red
sld! 35, 35, blu
slds! 40, 40
slds! [50, 50],
[60, 60, purp],
[70, 70, 10, 10, wht],
[80, 80, 4, 4, 255, 0, 255]
}
#+end_src
** [Samples] Added TeenyTiny MiniGameJam sample app: =/Users/amiralirajan/projects/dragonruby/samples/99_genre_teenytiny/=.
** [OSS] ~GTK::Recording~ and ~GTK::Replay~ have been open sourced.
** [OSS] OSS Contrib synced:
#+begin_src sh
commit aa8d3ac4bdccf522b8082a7fa7d595be2bd54b7d (origin/master, origin/HEAD)
Author: Bartosz Podrygajlo <bartosz.podrygajlo@gmail.com>
Date: Wed Aug 4 11:19:06 2021 +0200
Samples: Use to_radians for deg-to-rad conversion
Replace the local implementation with the build-in Numeric.to_radians
commit 26f20690be4da8f5091c720b1a25e32742c8c5fa
Author: Pedro Brighenti <pedro.brighenti@gmail.com>
Date: Sun Aug 22 16:09:47 2021 +0100
Fixed typo in 02_input_basics/02_mouse
commit dae203d736b9d6db00c10a75208f44a3a937442f
Author: leviongit <levi.duncan.self@gmail.com>
Date: Wed Aug 25 20:28:03 2021 +0200
fix: console raising error at autocomplete request
#+end_src
* 2.25
** [Support] [Pro] For Android releases, ~packageid~ can be specified in =./mygame/game_metadata.txt=.
To verify the package name is correct for your Android build, you can use the following command:
#+begin_src sh
aapt dump badging PATH_TO_APK | grep package:\ name
#+end_src
** [API] Added ~Outputs#clear_before_render~ which tells render targets to clear what's currently there.
** [Samples] Demonstration of ~clear_before_render~ is shown in =./samples/07_advanced_rendering/11_render_target_noclear/app/main.rb=
Pressing the spacebar will clear the render target by setting ~clear_before_render~ equal to true.
** [Samples] Fixed tunneling issue in =./samples/04_physics_and_collisions/06_box_collision_3/app/main.rb=
Thanks to @magiondiscord@discord for finding the edgecase (no pun intended).
** [C Extensions] [Pro] Binding generation now type checks and throws an exception in the event of a mismatch.
An additional flag can be passed when generating bindings ~--no-typecheck~. For full documentation
see: =./samples/12_c_extensions/README.md =
* 2.24
** [Bugfix] Labels within render targets scale correctly when windows are resized.
** [Bugfix] [Pro] Better error handling in the iOS wizard if app metadata fails to retrieve.
** [API] Added ~Numeric.mid? n1, n2~ which is similar to ~Numeric.between?~ except the numbers supplied to ~mid~ do not have to be in strictly increasing order.
** [OSS] Contributions from [[http://github.com/dragonruby/dragonruby-game-toolkit-contrib]] have been synchronized.
* 2.23
** [Bugfix] ~Hash#include?~ had invalid logic which has now been removed and should operate to core spec.
** [Bugfix] ~Hash#anchor_rect~ respects the anchor parameter passed to it as opposed to anchoring to 0.5, 0.5 only.
** [Bugfix] ~args.gtk.reset~ now clears ~args.audio~.
** [Bugfix] ~Numeric#(+|-|/|*) returns ~self~ instead of ~nil~ if arithmetic operation is performed against it.
** [Bugfix] ~Numeric#(+|-|/|*) can now be used with ~Array#inject~.
NOTE: A special thank you to leviondiscord@discord for persistence in talking about this issue and
taking the time to try to understand nil punning and the underlying reasoning for the original behavior (which proved
to be a unnecessarily inconsistency in the case of arithmetic).
** [Bugfix] ~args.layout.debug_primitives~ are now cached. The grid overlay will render more quickly.
** [Bugfix] Inner exceptions from ~GTK::Geometry~ class methods are now retained and reported within the error message.
** [Bugfix] ~args.grid~ responds to ~x~, ~y~ which allows it to be used with geometric functions.
You can use ~args.grid~ or continue to use ~args.grid.rect~.
** [Bugfix] Font glyph cache is invalided if the Window size changes.
** [API] ~args.audio~ now supports the ability to seek the audio to a specific location.
Set ~args.audio[:some_audio][:playtime]~ to seconds (float) representing the point in time you
want the audio to seek to.
Take a look at the audio_mixer sample app for full api usage.
** [Samples] Audio Mixer sample app got a solid facelift. =./samples/07_advanced_audio/01_audio_mixer/app/main.rb=
** [Samples] Performance based sample apps are better labeled and contain documentation/fixes for new override methods.
** [Support] The sprites under ~mygame/sprites/(square|circle|isometric|hexagon)~ have been redone (a lot nicer looking).
** [Support] ~args.outputs.lines~ can now accept rectangular primitives ~(x|y|w|h)~.
If the primitive does not respond to ~(x2|y2)~, then ~(w|h)~ will be used to derive ~(x2|y2)~. This
change makes the definition of horizontal and vertical lines more intuitive.
Instead of defining a horizontal line like this:
#+begin_src ruby
args.outputs.lines << { x: 0, y: 360, x2: 1280, y2: 360 }
args.outputs.lines << { x: 640, y: 0, x2: 640, y2: 720 }
#+end_src
You can instead do this:
#+begin_src ruby
args.outputs.lines << { x: 0, y: 360, w: 1280 }
args.outputs.lines << { x: 640, y: 0, h: 720 }
#+end_src
** [Support] Console font decreased slightly to give more real estate.
** [Support] Console will apply color/formatting to comment blocks (making code blocks easier to read).
** [Support] Slight performance improvements to ~OpenEntity~.
** [Support] ~Hash#method_missing~ expanded to allow access to methods that collide with core apis.
The ~Hash#method_missing~ capability allows you to access ~some_hash[:some_key]~, by using ~some_hash.some_key~ instead.
For keys that conflict with core ~Hash~ api's, you can now suffix the method with an ~underscore~. Example: You
can access ~some_hash[:length]~ using ~some_hash.length_~.
Using the ~dot~ operator over ~Hash#[]~ isn't required, but it is encouraged (sample apps will opt to use the ~dot~
operator for accessing keys in a ~Hash~, using the ~underscore~ suffix as needed).
** [Deprecation] [Soft] ~Hash#(solid|sprite|label|line|border)~ methods log a deprecation warning and suggest new methods usage.
*** New methods
NOTE: Given how long these methods have been around, it's unlikely they will be removed for *very* long time.
Here are the new method options:
- ~Hash#(solid!|to_solid)~
- ~Hash#(sprite!|to_sprite)~
- ~Hash#(label!|to_label)~
- ~Hash#(line!|to_line)~
- ~Hash#(border!|to_border)~
*** Sample Usage
These new methods accept a ~Hash~ as an additional parameter that will perform a ~Hash#merge!~
with the object it's called on. They also better communicate that these primitive
methods cause side effects. The existing methods did not communicate this which is why they are
being deprecated.
This is how ~Hash#border~ is currently being used:
#+begin_src ruby
def tick args
color = { r: 255, g: 0, b: 0 }
cell = {
x: 0,
y: 0,
w: 100,
h: 100
}
args.outputs.primitives << cell.merge!(color).border
end
#+end_src
You'll want to use ~Hash#border!~ instead:
#+begin_src ruby
def tick args
color = { r: 255, g: 0, b: 0 }
cell = {
x: 0,
y: 0,
w: 100,
h: 100
}
args.outputs.primitives << cell.border!(color)
# args.outputs.primitives << cell.merge(color).border! # this is also valid
end
#+end_src
Use ~Hash#to_border~ if you *don't* want to mutate the original ~Hash~:
#+begin_src ruby
def tick args
color = { r: 255, g: 0, b: 0 }
cell = {
x: 0,
y: 0,
w: 100,
h: 100
}
args.outputs.primitives << {
x: 0,
y: 0,
w: 100,
h: 100
}.to_border(color)
end
#+end_src
* 2.22
** [Pro] [iOS] [Bugfix] Added missing icon files for ios and missing ios_metadata.txt template file.
** [API] ~GTK::Runtime#http_post_body url:string, body:string, headers:array[string]~
~args.gtk.http_post_body~ can be used to post raw data (with the responsibility of encoding left to the dev).
Example:
#+begin_src ruby
def tick args
if args.inputs.keyboard.key_down.enter
json = "{ \"userId\": \"1000\", \"name\": \"Artorias of the Abyss\" }"
args.gtk.http_post_body "http://tempuri.com/updated-profile",
json,
["Content-Type: application/json"
"Content-Length: #{json.length}"]
end
end
#+end_src
** [Support] ~GTK::Runtime#notify_extended!~ now accepts ~overwrite~ as an option.
Example:
#+begin_src ruby
def tick args
if args.inputs.keyboard.key_down.enter
args.gtk.notify_extended! message: "message to show", # message to show
durations: 300, # how many ticks to show the message
env: :prod, # by default, notifications only happened in :dev
overwrite: true # if this value is true, the notification will
# shown even if another one is currently in progress
end
end
#+end_src
** [Support] Better method missing exception formatting if the object's inspect is very long.
* 2.21
** [Samples] Added farming simulator starting point: =./samples/99_genre_crafting/farming_game_starting_point/=
** [Pro] [iOS] Updated iOS Wizard to consult metadata/ios_metadata.txt for iOS Specific configurations.
** [Support] Added a more streamlined means to get autocomplete suggestions: http://localhost:9001/dragon/autocomplete/
** [Support] DragonRuby Console prints backtrace for exceptions if helpful information is contained in it.