Compare commits
20 commits
Author | SHA1 | Date | |
---|---|---|---|
fc0d35c609 | |||
863e75482b | |||
81c60b7a2a | |||
24d176ec53 | |||
3c1b0999c4 | |||
b7985070ff | |||
de90447904 | |||
3886790925 | |||
24718bc096 | |||
e78f9073e4 | |||
3c70ae51cf | |||
4233a560dd | |||
48686f5bbf | |||
ab4f6cdffd | |||
23b6b88cf0 | |||
33a807e7af | |||
41044f5dfc | |||
f8df79d063 | |||
aee8651566 | |||
2ee9098cae |
1
.dragonruby
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit 57ccb75151e4133e18e64fe42f07e1a4a676026b
|
1
.gitattributes
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
🕹️cube-tube/sprites/menu_l.png filter=lfs diff=lfs merge=lfs -text
|
4
.gitmodules
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
[submodule ".dragonruby"]
|
||||
path = .dragonruby
|
||||
url = ssh://git@forge.death.id.au:2222/death.au/dragonruby-base.git
|
||||
tag = 5.1
|
120
README.md
|
@ -1,108 +1,24 @@
|
|||
# Scale
|
||||
# Cube Tube
|
||||
_Tetrominoes on a Train!_
|
||||

|
||||
|
||||

|
||||
This is my first DragonRuby game project. It's basically a Tetris clone, after following these tutorials:
|
||||
1. Building Tetris - Part 1: https://youtu.be/xZMwRSbC4rY
|
||||
2. Building Tetris - Part 2: https://youtu.be/C3LLzDUDgz4
|
||||
|
||||
**Simple DragonRuby Game Toolkit Game Starter Template**
|
||||
Then making a whole bunch of modifications, including graphics, sounds, music, rotating the whole thing on its side and more.
|
||||
|
||||
Status: usable but not yet stable! This is pre-v1 software.
|
||||
It also made use of the [Scale Framework](https://github.com/DragonRidersUnite/scale), which itself got heavily modified and is mostly unrecognisable now.
|
||||
|
||||
Quickly start a new DragonRuby Game Toolkit game with useful conventions and helpful extensions.
|
||||
## DragonRuby
|
||||
DragonRuby binaries, etc are in a git submodule under the `.dragonruby` folder
|
||||
|
||||
Looking for a simpler version? Check out [the `simple` release](https://github.com/DragonRidersUnite/scale/releases/tag/simple) that's just `app/main.rb` with some constants and helper methods.
|
||||
To update DragonRuby, update the `tag` value in `.gitmodules` then run the following git commands:
|
||||
```
|
||||
git submodule sync
|
||||
git submodule foreach --recursive 'git fetch --tags'
|
||||
git submodule update --init --recursive --remote
|
||||
```
|
||||
(or just dump the files in the .dragonruby folder)
|
||||
|
||||
[Check out the CHANGELOG for the summary of recent changes!](https://github.com/DragonRidersUnite/scale/wiki/CHANGELOG)
|
||||
|
||||
## Bugs / Features
|
||||
|
||||
Last tested against DragonRuby Game Toolkit v4.3.
|
||||
|
||||
- Functional approach to the code, namespaced in modules
|
||||
- Use the DragonRuby GTK methods and data structures you know and love
|
||||
- Driven by `args.state`
|
||||
- Menus and pause screen
|
||||
- Sensible default controls
|
||||
- Defined location for where to put scenes
|
||||
- Settings that persist to disk
|
||||
- Displays framerate in the upper-right hand corner of the game when running in development mode
|
||||
- `#debug?` helper to easily check if the game is running in development mode; useful for custom commands
|
||||
- `#mobile?` to easily check when on mobile and <kbd>M</kbd> to simulate mobile
|
||||
- Reload all sprites in development using the `i` key
|
||||
- Reset the game with `r` key, calls `$gtk.reset`
|
||||
- Put all debug-only code in `#debug_tick`
|
||||
- `#init` method that gets run once on game boot
|
||||
- `#version` to get the version of your game
|
||||
- Constants for various values and enums: `FPS`, `BLEND_*`, `ALIGN_*`
|
||||
- Tests for the methods!
|
||||
- See more in [SCALE_DOCS.md](./SCALE_DOCS.md)
|
||||
|
||||
## Use It
|
||||
|
||||
There are two main ways you can use the Scale template for your games.
|
||||
|
||||
[📺 Video demo showing how to get started](https://www.youtube.com/watch?v=eek3a3aO-zo)
|
||||
|
||||
### Download the Zip
|
||||
|
||||
The fastest way to get started is to download the template zip file and put it into your unzipped DragonRuby Game Toolkit folder.
|
||||
|
||||
1. Download and unzip the DragonRuby Game Toolkit engine zip
|
||||
2. Delete the `mygame` directory
|
||||
3. [Download Scale](https://github.com/DragonRidersUnite/scale/archive/refs/heads/main.zip)
|
||||
4. Unzip the `scale-main.zip`
|
||||
5. Move the `scale-main` folder into the DRGTK folder
|
||||
6. Rename `scale-main` to `mygame`
|
||||
7. Start DragonRuby, and make an awesome game!
|
||||
|
||||
### Use GitHub's Template System
|
||||
|
||||
If you're going to track your game with Git and use GitHub, the baked-in template system will get you going quickly.
|
||||
|
||||
1. View the project on GitHub: https://github.com/DragonRidersUnite/scale
|
||||
2. Click "Use this template"
|
||||
3. Click "Create a new repository"
|
||||
4. Fill out the details and create the repository
|
||||
5. Unzip the DragonRuby Game Toolkit engine zip
|
||||
6. Delete the `mygame` directory
|
||||
7. Clone your new repository into the DRGTK engine folder with the folder name `mygame`, example: `git clone git@github.com:USERNAME/REPO.git mygame`
|
||||
7. Start DragonRuby, and make an awesome game!
|
||||
|
||||
### Updating
|
||||
|
||||
Because Scale is a template with all of its source as part of your game, updating the framework's source code in your game isn't an easy thing to do.
|
||||
|
||||
I generally would say: don't worry about it! Take ownership over the code in your game and change what Scale provides you without concern. When it comes time to start your next game, Scale will be updated and improved.
|
||||
|
||||
But if you do find yourself wanting to keep it updated, [watch the GitHub repo](https://github.com/DragonRidersUnite/scale) for releases. You could pull in just the changes you want. Or you could set an upstream in your repo to the template and merge the changes in.
|
||||
|
||||
## Documentation
|
||||
|
||||
Every game that uses Scale comes with the [SCALE_DOCS.md](./SCALE_DOCS.md) file. Read through that document to find a quickstart guide and information about useful methods.
|
||||
|
||||
## Release Approach & Versioning
|
||||
|
||||
Code on the `main` branch is intended to be stable because Scale is a template. When significant changes have been made, a tag and release are created. This allows progress to be tracked and previous versions to be easily downloaded.
|
||||
|
||||
Scale uses a simplified major.minor versioning scheme. Major version bumps means there are breaking changes to the API (the methods and structure). Minor bumps mean non-breaking additions and fixes.
|
||||
|
||||
## Template License
|
||||
|
||||
The template source code falls under the [Unlicense](https://unlicense.org/), meaning it is dedicated to the public domain and you are free to do with it what you want.
|
||||
|
||||
## Contribute
|
||||
|
||||
Conributions are welcome!
|
||||
|
||||
Open an issue or submit PRs if you notice something isn't working.
|
||||
|
||||
If you find yourself adding the same files, methods, constants, etc. to your DRGTK games, submit a PR to add it to Scale.
|
||||
|
||||
---
|
||||
|
||||
[Clear out what's above in this README out and add your own details for making your game!]
|
||||
|
||||
## Debug Shortcuts
|
||||
|
||||
- <kbd>0</kbd> — display debug details (ex: framerate)
|
||||
- <kbd>i</kbd> — reload sprites from disk
|
||||
- <kbd>r</kbd> — reset the entire game state
|
||||
- <kbd>m</kbd> — toggle mobile simulation
|
||||
Also, for iOS, make sure to create icons in `marketing-assets/AppIcon.appiconset/` (see the `.gitkeep` file in that folder for more info). The `run` and `package` scripts should copy these to the correct locations in `.dragonruby/dragonruby-ios-simulator.app/Assets.xcassets/AppIcon.appiconset/` and `.dragonruby/dragonruby-ios.app/Assets.xcassets/AppIcon.appiconset` respectively.
|
|
@ -1,18 +0,0 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# class to represent scenes
|
||||
class SceneInstance
|
||||
def initialize(_args, opts = {})
|
||||
@tick_in_background = opts.tick_in_background._? false
|
||||
@reset_on_pop = opts.reset_on_pop._? false
|
||||
end
|
||||
|
||||
attr_reader :tick_in_background
|
||||
attr_accessor :reset_on_pop
|
||||
|
||||
# called every tick of the game loop
|
||||
def tick(args) end
|
||||
|
||||
# custom logic to reset this scene
|
||||
def reset(args) end
|
||||
end
|
BIN
cube-tube.keystore
Normal file
|
@ -208,15 +208,15 @@
|
|||
{
|
||||
"Name" = "8:Microsoft Visual Studio"
|
||||
"ProductName" = "8:Cube Tube"
|
||||
"ProductCode" = "8:{0DF427A0-5821-48F0-9CA5-B34F1123F839}"
|
||||
"PackageCode" = "8:{27B06BB4-4B81-4D50-A8E0-10378563DE9D}"
|
||||
"ProductCode" = "8:{FAD41339-47C6-4BE0-9CE0-901208A5F92D}"
|
||||
"PackageCode" = "8:{485042AA-0822-4605-9240-4B88CAAE3CCE}"
|
||||
"UpgradeCode" = "8:{CD4947B5-EF08-4530-A370-44E0B5F6F762}"
|
||||
"AspNetVersion" = "8:4.0.30319.0"
|
||||
"RestartWWWService" = "11:FALSE"
|
||||
"RemovePreviousVersions" = "11:TRUE"
|
||||
"DetectNewerInstalledVersion" = "11:TRUE"
|
||||
"InstallAllUsers" = "11:FALSE"
|
||||
"ProductVersion" = "8:0.1.1"
|
||||
"ProductVersion" = "8:0.2.0"
|
||||
"Manufacturer" = "8:death.au"
|
||||
"ARPHELPTELEPHONE" = "8:"
|
||||
"ARPHELPLINK" = "8:"
|
||||
|
|
17
marketing-assets/AppIcon.appiconset/.gitkeep
Normal file
|
@ -0,0 +1,17 @@
|
|||
Place iOS App Icon assets here, as listed below:
|
||||
- icon-20pt@2x.png - 40 x 40 px
|
||||
- icon-20pt@3x.png - 60 x 60 px
|
||||
- icon-29pt@2x.png - 58 x 58 px
|
||||
- icon-29pt@3x.png - 87 x 87 px
|
||||
- icon-38pt@2x.png - 76 x 76 px
|
||||
- icon-38pt@3x.png - 114 x 114 px
|
||||
- icon-40pt@2x.png - 80 x 80 px
|
||||
- icon-40pt@3x.png - 120 x 120 px
|
||||
- icon-60pt@2x.png - 120 x 120 px
|
||||
- icon-60pt@3x.png - 180 x 180 px
|
||||
- icon-64pt@2x.png - 128 x 128 px
|
||||
- icon-64pt@3x.png - 192 x 192 px
|
||||
- icon-68pt@2x.png - 136 x 136 px
|
||||
- icon-76pt@2x.png - 152 x 152 px
|
||||
- icon-83.5pt@2x.png - 167 x 167 px
|
||||
- icon-1024pt.png - 1024 x 1024 px
|
BIN
marketing-assets/AppIcon.appiconset/AppIcon1024x1024.png
Normal file
After ![]() (image error) Size: 209 KiB |
BIN
marketing-assets/AppIcon.appiconset/AppIcon20x20@2x.png
Normal file
After ![]() (image error) Size: 1.8 KiB |
BIN
marketing-assets/AppIcon.appiconset/AppIcon20x20@3x.png
Normal file
After ![]() (image error) Size: 3.1 KiB |
BIN
marketing-assets/AppIcon.appiconset/AppIcon29x29@2x.png
Normal file
After ![]() (image error) Size: 2.9 KiB |
BIN
marketing-assets/AppIcon.appiconset/AppIcon29x29@3x.png
Normal file
After ![]() (image error) Size: 5.3 KiB |
BIN
marketing-assets/AppIcon.appiconset/AppIcon38x38@2x.png
Normal file
After ![]() (image error) Size: 4.4 KiB |
BIN
marketing-assets/AppIcon.appiconset/AppIcon38x38@3x.png
Normal file
After ![]() (image error) Size: 8.1 KiB |
BIN
marketing-assets/AppIcon.appiconset/AppIcon40x40@2x.png
Normal file
After ![]() (image error) Size: 4.7 KiB |
BIN
marketing-assets/AppIcon.appiconset/AppIcon40x40@3x.png
Normal file
After ![]() (image error) Size: 8.8 KiB |
BIN
marketing-assets/AppIcon.appiconset/AppIcon60x60@2x.png
Normal file
After ![]() (image error) Size: 8.8 KiB |
BIN
marketing-assets/AppIcon.appiconset/AppIcon60x60@3x.png
Normal file
After ![]() (image error) Size: 17 KiB |
BIN
marketing-assets/AppIcon.appiconset/AppIcon64x64@2x.png
Normal file
After ![]() (image error) Size: 9.8 KiB |
BIN
marketing-assets/AppIcon.appiconset/AppIcon64x64@3x.png
Normal file
After ![]() (image error) Size: 20 KiB |
BIN
marketing-assets/AppIcon.appiconset/AppIcon68x68@2x.png
Normal file
After ![]() (image error) Size: 11 KiB |
BIN
marketing-assets/AppIcon.appiconset/AppIcon76x76@2x.png
Normal file
After ![]() (image error) Size: 13 KiB |
BIN
marketing-assets/AppIcon.appiconset/AppIcon83.5x83.5@2x.png
Normal file
After ![]() (image error) Size: 15 KiB |
119
marketing-assets/AppIcon.appiconset/Contents.json
Normal file
|
@ -0,0 +1,119 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "AppIcon20x20@2x.png",
|
||||
"idiom" : "universal",
|
||||
"platform" : "ios",
|
||||
"scale" : "2x",
|
||||
"size" : "20x20"
|
||||
},
|
||||
{
|
||||
"filename" : "AppIcon20x20@3x.png",
|
||||
"idiom" : "universal",
|
||||
"platform" : "ios",
|
||||
"scale" : "3x",
|
||||
"size" : "20x20"
|
||||
},
|
||||
{
|
||||
"filename" : "AppIcon29x29@2x.png",
|
||||
"idiom" : "universal",
|
||||
"platform" : "ios",
|
||||
"scale" : "2x",
|
||||
"size" : "29x29"
|
||||
},
|
||||
{
|
||||
"filename" : "AppIcon29x29@3x.png",
|
||||
"idiom" : "universal",
|
||||
"platform" : "ios",
|
||||
"scale" : "3x",
|
||||
"size" : "29x29"
|
||||
},
|
||||
{
|
||||
"filename" : "AppIcon38x38@2x.png",
|
||||
"idiom" : "universal",
|
||||
"platform" : "ios",
|
||||
"scale" : "2x",
|
||||
"size" : "38x38"
|
||||
},
|
||||
{
|
||||
"filename" : "AppIcon38x38@3x.png",
|
||||
"idiom" : "universal",
|
||||
"platform" : "ios",
|
||||
"scale" : "3x",
|
||||
"size" : "38x38"
|
||||
},
|
||||
{
|
||||
"filename" : "AppIcon40x40@2x.png",
|
||||
"idiom" : "universal",
|
||||
"platform" : "ios",
|
||||
"scale" : "2x",
|
||||
"size" : "40x40"
|
||||
},
|
||||
{
|
||||
"filename" : "AppIcon40x40@3x.png",
|
||||
"idiom" : "universal",
|
||||
"platform" : "ios",
|
||||
"scale" : "3x",
|
||||
"size" : "40x40"
|
||||
},
|
||||
{
|
||||
"filename" : "AppIcon60x60@2x.png",
|
||||
"idiom" : "universal",
|
||||
"platform" : "ios",
|
||||
"scale" : "2x",
|
||||
"size" : "60x60"
|
||||
},
|
||||
{
|
||||
"filename" : "AppIcon60x60@3x.png",
|
||||
"idiom" : "universal",
|
||||
"platform" : "ios",
|
||||
"scale" : "3x",
|
||||
"size" : "60x60"
|
||||
},
|
||||
{
|
||||
"filename" : "AppIcon64x64@2x.png",
|
||||
"idiom" : "universal",
|
||||
"platform" : "ios",
|
||||
"scale" : "2x",
|
||||
"size" : "64x64"
|
||||
},
|
||||
{
|
||||
"filename" : "AppIcon64x64@3x.png",
|
||||
"idiom" : "universal",
|
||||
"platform" : "ios",
|
||||
"scale" : "3x",
|
||||
"size" : "64x64"
|
||||
},
|
||||
{
|
||||
"filename" : "AppIcon68x68@2x.png",
|
||||
"idiom" : "universal",
|
||||
"platform" : "ios",
|
||||
"scale" : "2x",
|
||||
"size" : "68x68"
|
||||
},
|
||||
{
|
||||
"filename" : "AppIcon76x76@2x.png",
|
||||
"idiom" : "universal",
|
||||
"platform" : "ios",
|
||||
"scale" : "2x",
|
||||
"size" : "76x76"
|
||||
},
|
||||
{
|
||||
"filename" : "AppIcon83.5x83.5@2x.png",
|
||||
"idiom" : "universal",
|
||||
"platform" : "ios",
|
||||
"scale" : "2x",
|
||||
"size" : "83.5x83.5"
|
||||
},
|
||||
{
|
||||
"filename" : "AppIcon1024x1024.png",
|
||||
"idiom" : "universal",
|
||||
"platform" : "ios",
|
||||
"size" : "1024x1024"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
Before ![]() (image error) Size: 68 KiB After ![]() (image error) Size: 68 KiB ![]() ![]() |
Before ![]() (image error) Size: 399 KiB After ![]() (image error) Size: 399 KiB ![]() ![]() |
Before ![]() (image error) Size: 544 KiB After ![]() (image error) Size: 544 KiB ![]() ![]() |
Before ![]() (image error) Size: 86 KiB After ![]() (image error) Size: 86 KiB ![]() ![]() |
Before ![]() (image error) Size: 54 KiB After ![]() (image error) Size: 54 KiB ![]() ![]() |
Before (image error) Size: 499 KiB After (image error) Size: 499 KiB |
Before ![]() (image error) Size: 3.2 KiB After ![]() (image error) Size: 3.2 KiB ![]() ![]() |
13
package
Normal file → Executable file
|
@ -1,8 +1,7 @@
|
|||
#!/bin/sh
|
||||
cd "`dirname "$0"`"
|
||||
|
||||
result=${PWD##*/} # to assign to a variable
|
||||
result=${result:-/} # to correct for the case where PWD=/
|
||||
|
||||
cd ..
|
||||
exec ./dragonruby-publish --only-package ${result}
|
||||
cd "`dirname "$0"`"/.dragonruby
|
||||
cp -R ../marketing-assets/AppIcon.appiconset ./dragonruby-ios.app/Assets.xcassets/
|
||||
cp -R ../marketing-assets/AppIcon.appiconset ./dragonruby-ios-simulator.app/Assets.xcassets/
|
||||
cp -R ../🕹️cube-tube ./cube-tube
|
||||
exec ./dragonruby-publish --only-package cube-tube
|
||||
rmdir -R ./cube-tube
|
63
package.bat
|
@ -1,62 +1 @@
|
|||
@echo off
|
||||
cd /d %~dp0
|
||||
|
||||
for %%I in (.) do set CurrDirName=%%~nxI
|
||||
for /F %%a IN ('powershell -command "$([guid]::NewGuid().ToString().toUpper())"') DO (set newProductCode=%%a)
|
||||
for /F %%a IN ('powershell -command "$([guid]::NewGuid().ToString().toUpper())"') DO (set newPackageCode=%%a)
|
||||
|
||||
@setlocal ENABLEEXTENSIONS
|
||||
|
||||
@set version=0
|
||||
@for /F "tokens=*" %%A in (./metadata/game_metadata.txt) do @call :CheckForVersion "%%A"
|
||||
|
||||
cd ..
|
||||
@echo on
|
||||
dragonruby-publish --only-package %CurrDirName%
|
||||
@echo off
|
||||
cd builds
|
||||
|
||||
if exist ./%CurrDirName%-windows-amd64.exe (
|
||||
if exist ../%CurrDirName%/installer/installer.vdproj (
|
||||
echo "Building windows installer..."
|
||||
for /F "tokens=* USEBACKQ" %%t IN (`findstr /c:"%version%" ..\%CurrDirName%\installer\installer.vdproj`) do (SET OldVersion=%%t)
|
||||
if defined OldVersion (
|
||||
echo "version already the same"
|
||||
) else (
|
||||
echo "need to update version & product/package codes (%version%, %newProductCode%, %newPackageCode%)"
|
||||
powershell -Command "(Get-Content ../%CurrDirName%/installer/installer.vdproj) | Foreach-Object { $_ -replace '""""ProductCode"""" = """"8:\{.*\}""""$', '""""ProductCode"""" = """"8:{%newProductCode%}""""' -replace '""""PackageCode"""" = """"8:\{.*\}""""$', '""""PackageCode"""" = """"8:{%newPackageCode%}""""' -replace '""""ProductVersion"""" = """"8:.+""""$', '""""ProductVersion"""" = """"8:%version%""' } | Out-File -encoding UTF8 ../%CurrDirName%/installer/installer.vdproj"
|
||||
)
|
||||
call "C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\devenv.exe" ..\%CurrDirName%\installer\installer.sln /build Release
|
||||
) else (
|
||||
ECHO "no installer project?"
|
||||
ECHO ../%CurrDirName%/installer/installer.vdproj
|
||||
)
|
||||
) else (
|
||||
ECHO "no exe?"
|
||||
ECHO ./%CurrDirName%-windows-amd64.exe
|
||||
)
|
||||
|
||||
if not exist ./%CurrDirName%.keystore (
|
||||
echo "no keystore, generating keys"
|
||||
keytool -genkey -v -keystore %CurrDirName%.keystore -alias %CurrDirName% -keyalg RSA -keysize 2048 -validity 10000
|
||||
)
|
||||
if exist ./%CurrDirName%-android.apk (
|
||||
echo "Signing apk..."
|
||||
call "C:\Program Files (x86)\Android\android-sdk\build-tools\32.0.0\apksigner.bat" sign -ks %CurrDirName%.keystore %CurrDirName%-android.apk
|
||||
echo "Signing aab..."
|
||||
call jarsigner -verbose -sigalg SHA256withRSA -digestalg SHA-256 -keystore %CurrDirName%.keystore %CurrDirName%-googleplay.aab %CurrDirName%
|
||||
) else (
|
||||
ECHO "no apk?"
|
||||
ECHO ./%CurrDirName%-android.apk
|
||||
)
|
||||
|
||||
ECHO "All done!"
|
||||
explorer.exe %cd%
|
||||
PAUSE
|
||||
@exit /b 0
|
||||
|
||||
:CheckForVersion
|
||||
@set _line=%~1
|
||||
@set _linePrefeix=%_line:~0,8%
|
||||
@if "%_linePrefeix%" equ "version=" (@set version="%_line:~8%")
|
||||
@exit /b 0
|
||||
call publish.bat --only-package
|
72
publish.bat
Normal file
|
@ -0,0 +1,72 @@
|
|||
@echo off
|
||||
chcp 65001 >NUL
|
||||
cd /d %~dp0
|
||||
|
||||
set gamedir=🕹️cube-tube
|
||||
for /F %%a IN ('powershell -command "$([guid]::NewGuid().ToString().toUpper())"') DO (set newProductCode=%%a)
|
||||
for /F %%a IN ('powershell -command "$([guid]::NewGuid().ToString().toUpper())"') DO (set newPackageCode=%%a)
|
||||
|
||||
@setlocal ENABLEEXTENSIONS
|
||||
|
||||
@set version=0
|
||||
@for /F "tokens=*" %%A in (%gamedir%/metadata/game_metadata.txt) do @call :CheckForVersion "%%A"
|
||||
|
||||
cd .dragonruby
|
||||
|
||||
robocopy ../marketing-assets/AppIcon.appiconset ./dragonruby-ios.app/Assets.xcassets/AppIcon.appiconset /e
|
||||
robocopy ../marketing-assets/AppIcon.appiconset ./dragonruby-ios-simulator.app/Assets.xcassets/AppIcon.appiconset /e
|
||||
robocopy ../%gamedir% ./%gameid% /e
|
||||
|
||||
@echo on
|
||||
dragonruby-publish %* %gameid%
|
||||
@echo off
|
||||
rd /s /q %gameid%
|
||||
|
||||
cd builds
|
||||
|
||||
if exist ./%gameid%-windows-amd64.exe (
|
||||
if exist ../../installer/installer.vdproj (
|
||||
echo "Building windows installer..."
|
||||
for /F "tokens=* USEBACKQ" %%t IN (`findstr /c:"%version%" ..\..\installer\installer.vdproj`) do (SET OldVersion=%%t)
|
||||
if defined OldVersion (
|
||||
echo "version already the same"
|
||||
) else (
|
||||
echo "need to update version & product/package codes (%version%, %newProductCode%, %newPackageCode%)"
|
||||
powershell -Command "(Get-Content ../../installer/installer.vdproj) | Foreach-Object { $_ -replace '""""ProductCode"""" = """"8:\{.*\}""""$', '""""ProductCode"""" = """"8:{%newProductCode%}""""' -replace '""""PackageCode"""" = """"8:\{.*\}""""$', '""""PackageCode"""" = """"8:{%newPackageCode%}""""' -replace '""""ProductVersion"""" = """"8:.+""""$', '""""ProductVersion"""" = """"8:%version%""' } | Out-File -encoding UTF8 ../../installer/installer.vdproj"
|
||||
)
|
||||
call "C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\devenv.exe" ..\..\installer\installer.sln /build Release
|
||||
) else (
|
||||
ECHO "no installer project?"
|
||||
ECHO ../../installer/installer.vdproj
|
||||
)
|
||||
) else (
|
||||
ECHO "no exe?"
|
||||
ECHO ./%gameid%-windows-amd64.exe
|
||||
)
|
||||
|
||||
if not exist ../../%gameid%.keystore (
|
||||
echo "no keystore, generating keys"
|
||||
keytool -genkey -v -keystore ../../%gameid%.keystore -alias %gameid% -keyalg RSA -keysize 2048 -validity 10000
|
||||
)
|
||||
if exist ./%gameid%-android.apk (
|
||||
echo "Signing apk..."
|
||||
call "C:\Program Files (x86)\Android\android-sdk\build-tools\32.0.0\apksigner.bat" sign -ks ../../%gameid%.keystore %gameid%-android.apk
|
||||
echo "Signing aab..."
|
||||
call jarsigner -verbose -sigalg SHA256withRSA -digestalg SHA-256 -keystore ../../%gameid%.keystore %gameid%-googleplay.aab %gameid%
|
||||
) else (
|
||||
ECHO "no apk?"
|
||||
ECHO ./%gameid%-android.apk
|
||||
)
|
||||
|
||||
ECHO "All done!"
|
||||
explorer.exe %cd%
|
||||
PAUSE
|
||||
@exit /b 0
|
||||
|
||||
:CheckForVersion
|
||||
@set _line=%~1
|
||||
@set _linePrefeix=%_line:~0,8%
|
||||
@if "%_linePrefeix%" equ "version=" (@set version="%_line:~8%")
|
||||
@set _linePrefeix=%_line:~0,7%
|
||||
@if "%_linePrefeix%" equ "gameid=" (@set gameid="%_line:~7%")
|
||||
@exit /b 0
|
11
run
|
@ -1,8 +1,5 @@
|
|||
#!/bin/sh
|
||||
cd "`dirname "$0"`"
|
||||
|
||||
result=${PWD##*/} # to assign to a variable
|
||||
result=${result:-/} # to correct for the case where PWD=/
|
||||
|
||||
cd ..
|
||||
exec ./dragonruby ${result}
|
||||
cd "`dirname "$0"`"/.dragonruby
|
||||
cp -R ../marketing-assets/AppIcon.appiconset ./dragonruby-ios.app/Assets.xcassets/
|
||||
cp -R ../marketing-assets/AppIcon.appiconset ./dragonruby-ios-simulator.app/Assets.xcassets/
|
||||
exec ./dragonruby ../🕹️cube-tube
|
9
run.bat
|
@ -1,9 +1,8 @@
|
|||
@echo off
|
||||
cd /d %~dp0
|
||||
|
||||
for %%I in (.) do set CurrDirName=%%~nxI
|
||||
|
||||
cd ..
|
||||
cd .dragonruby
|
||||
robocopy ../marketing-assets/AppIcon.appiconset ./dragonruby-ios.app/Assets.xcassets/AppIcon.appiconset /e
|
||||
robocopy ../marketing-assets/AppIcon.appiconset ./dragonruby-ios-simulator.app/Assets.xcassets/AppIcon.appiconset /e
|
||||
@echo on
|
||||
dragonruby %CurrDirName%
|
||||
dragonruby ../🕹️cube-tube
|
||||
EXIT /B
|
10
run_tests
|
@ -1,10 +0,0 @@
|
|||
#!/usr/bin/env sh
|
||||
set -e
|
||||
rm -f test-failures.txt
|
||||
if ! ../dragonruby . --eval app/tests.rb --no-tick --exit-on-fail; then
|
||||
echo "🙀 tests failed!"
|
||||
cat test-failures.txt
|
||||
exit 1
|
||||
else
|
||||
echo "🪩 tests passed!"
|
||||
fi
|
8
🕹️cube-tube.code-workspace
Normal file
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"folders": [
|
||||
{
|
||||
"path": "🕹️cube-tube"
|
||||
}
|
||||
],
|
||||
"settings": {}
|
||||
}
|
|
@ -8,7 +8,10 @@
|
|||
"name": "Run Game",
|
||||
"type": "node-terminal",
|
||||
"request": "launch",
|
||||
"command": "${workspaceRoot}/../dragonruby.exe ${workspaceRoot}",
|
||||
"command": "\"${workspaceRoot}/../.dragonruby/dragonruby\" \"${workspaceRoot}\"",
|
||||
"windows": {
|
||||
"command": "${workspaceRoot}/../.dragonruby/dragonruby.exe ${workspaceRoot}",
|
||||
},
|
||||
}
|
||||
]
|
||||
}
|
108
🕹️cube-tube/README.md
Normal file
|
@ -0,0 +1,108 @@
|
|||
# Scale
|
||||
|
||||

|
||||
|
||||
**Simple DragonRuby Game Toolkit Game Starter Template**
|
||||
|
||||
Status: usable but not yet stable! This is pre-v1 software.
|
||||
|
||||
Quickly start a new DragonRuby Game Toolkit game with useful conventions and helpful extensions.
|
||||
|
||||
Looking for a simpler version? Check out [the `simple` release](https://github.com/DragonRidersUnite/scale/releases/tag/simple) that's just `app/main.rb` with some constants and helper methods.
|
||||
|
||||
[Check out the CHANGELOG for the summary of recent changes!](https://github.com/DragonRidersUnite/scale/wiki/CHANGELOG)
|
||||
|
||||
## Bugs / Features
|
||||
|
||||
Last tested against DragonRuby Game Toolkit v4.3.
|
||||
|
||||
- Functional approach to the code, namespaced in modules
|
||||
- Use the DragonRuby GTK methods and data structures you know and love
|
||||
- Driven by `args.state`
|
||||
- Menus and pause screen
|
||||
- Sensible default controls
|
||||
- Defined location for where to put scenes
|
||||
- Settings that persist to disk
|
||||
- Displays framerate in the upper-right hand corner of the game when running in development mode
|
||||
- `#debug?` helper to easily check if the game is running in development mode; useful for custom commands
|
||||
- `#mobile?` to easily check when on mobile and <kbd>M</kbd> to simulate mobile
|
||||
- Reload all sprites in development using the `i` key
|
||||
- Reset the game with `r` key, calls `$gtk.reset`
|
||||
- Put all debug-only code in `#debug_tick`
|
||||
- `#init` method that gets run once on game boot
|
||||
- `#version` to get the version of your game
|
||||
- Constants for various values and enums: `FPS`, `BLEND_*`, `ALIGN_*`
|
||||
- Tests for the methods!
|
||||
- See more in [SCALE_DOCS.md](./SCALE_DOCS.md)
|
||||
|
||||
## Use It
|
||||
|
||||
There are two main ways you can use the Scale template for your games.
|
||||
|
||||
[📺 Video demo showing how to get started](https://www.youtube.com/watch?v=eek3a3aO-zo)
|
||||
|
||||
### Download the Zip
|
||||
|
||||
The fastest way to get started is to download the template zip file and put it into your unzipped DragonRuby Game Toolkit folder.
|
||||
|
||||
1. Download and unzip the DragonRuby Game Toolkit engine zip
|
||||
2. Delete the `mygame` directory
|
||||
3. [Download Scale](https://github.com/DragonRidersUnite/scale/archive/refs/heads/main.zip)
|
||||
4. Unzip the `scale-main.zip`
|
||||
5. Move the `scale-main` folder into the DRGTK folder
|
||||
6. Rename `scale-main` to `mygame`
|
||||
7. Start DragonRuby, and make an awesome game!
|
||||
|
||||
### Use GitHub's Template System
|
||||
|
||||
If you're going to track your game with Git and use GitHub, the baked-in template system will get you going quickly.
|
||||
|
||||
1. View the project on GitHub: https://github.com/DragonRidersUnite/scale
|
||||
2. Click "Use this template"
|
||||
3. Click "Create a new repository"
|
||||
4. Fill out the details and create the repository
|
||||
5. Unzip the DragonRuby Game Toolkit engine zip
|
||||
6. Delete the `mygame` directory
|
||||
7. Clone your new repository into the DRGTK engine folder with the folder name `mygame`, example: `git clone git@github.com:USERNAME/REPO.git mygame`
|
||||
7. Start DragonRuby, and make an awesome game!
|
||||
|
||||
### Updating
|
||||
|
||||
Because Scale is a template with all of its source as part of your game, updating the framework's source code in your game isn't an easy thing to do.
|
||||
|
||||
I generally would say: don't worry about it! Take ownership over the code in your game and change what Scale provides you without concern. When it comes time to start your next game, Scale will be updated and improved.
|
||||
|
||||
But if you do find yourself wanting to keep it updated, [watch the GitHub repo](https://github.com/DragonRidersUnite/scale) for releases. You could pull in just the changes you want. Or you could set an upstream in your repo to the template and merge the changes in.
|
||||
|
||||
## Documentation
|
||||
|
||||
Every game that uses Scale comes with the [SCALE_DOCS.md](./SCALE_DOCS.md) file. Read through that document to find a quickstart guide and information about useful methods.
|
||||
|
||||
## Release Approach & Versioning
|
||||
|
||||
Code on the `main` branch is intended to be stable because Scale is a template. When significant changes have been made, a tag and release are created. This allows progress to be tracked and previous versions to be easily downloaded.
|
||||
|
||||
Scale uses a simplified major.minor versioning scheme. Major version bumps means there are breaking changes to the API (the methods and structure). Minor bumps mean non-breaking additions and fixes.
|
||||
|
||||
## Template License
|
||||
|
||||
The template source code falls under the [Unlicense](https://unlicense.org/), meaning it is dedicated to the public domain and you are free to do with it what you want.
|
||||
|
||||
## Contribute
|
||||
|
||||
Conributions are welcome!
|
||||
|
||||
Open an issue or submit PRs if you notice something isn't working.
|
||||
|
||||
If you find yourself adding the same files, methods, constants, etc. to your DRGTK games, submit a PR to add it to Scale.
|
||||
|
||||
---
|
||||
|
||||
[Clear out what's above in this README out and add your own details for making your game!]
|
||||
|
||||
## Debug Shortcuts
|
||||
|
||||
- <kbd>0</kbd> — display debug details (ex: framerate)
|
||||
- <kbd>i</kbd> — reload sprites from disk
|
||||
- <kbd>r</kbd> — reset the entire game state
|
||||
- <kbd>m</kbd> — toggle mobile simulation
|
41
🕹️cube-tube/app/classes/scene_instance.rb
Normal file
|
@ -0,0 +1,41 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# class to represent scenes
|
||||
class SceneInstance
|
||||
def initialize(_args, opts = {})
|
||||
@tick_in_background = opts.tick_in_background._? false
|
||||
@reset_on_pop = opts.reset_on_pop._? false
|
||||
end
|
||||
|
||||
attr_reader :tick_in_background
|
||||
attr_accessor :reset_on_pop
|
||||
|
||||
def screenshot(args)
|
||||
screenshot_path = "../marketing-assets/screenshots/#{args.gtk.platform}"
|
||||
now = Time.new
|
||||
now_s = "#{now.year}-#{"#{now.month}".rjust(2, "0")}-#{"#{now.day}".rjust(2, "0")} at #{"#{now.hour}".rjust(2, "0")}.#{"#{now.min}".rjust(2, "0")}.#{"#{now.sec}".rjust(2, "0")}"
|
||||
base_filename = "#{screenshot_path}/Screenshot - #{args.gtk.platform} - #{now_s}"
|
||||
filename = "#{base_filename}.png"
|
||||
count = 0
|
||||
while !args.gtk.stat_file(filename).nil?
|
||||
count += 1;
|
||||
filename = "#{base_filename} (#{count}).png"
|
||||
end
|
||||
|
||||
args.outputs.screenshots << {
|
||||
x: 0, y: 0, w: args.grid.w, h: args.grid.h, # Which portion of the screen should be captured
|
||||
path: filename, # Output path of PNG file (inside game directory)
|
||||
# r: 255, g: 255, b: 255, a: 0 # Optional chroma key
|
||||
}
|
||||
|
||||
args.gtk.notify!("Screenshot taken: '#{filename}'")
|
||||
end
|
||||
|
||||
# called every tick of the game loop
|
||||
def tick(args)
|
||||
screenshot(args) if args.inputs.keyboard.ctrl_p
|
||||
end
|
||||
|
||||
# custom logic to reset this scene
|
||||
def reset(args) end
|
||||
end
|
|
@ -5,7 +5,7 @@ module Input
|
|||
class << self
|
||||
PRIMARY_KEYS = [:j, :z, :space]
|
||||
SECONDARY_KEYS = [:k, :x, :backspace]
|
||||
PAUSE_KEYS = [:escape, :p]
|
||||
PAUSE_KEYS = [:escape]
|
||||
BINDINGS = {
|
||||
primary: {
|
||||
keyboard: %i[j z space],
|
||||
|
@ -16,7 +16,7 @@ module Input
|
|||
controller_one: %i[b]
|
||||
},
|
||||
pause: {
|
||||
keyboard: %i[escape p],
|
||||
keyboard: %i[escape],
|
||||
controller_one: %i[start]
|
||||
},
|
||||
rotate_left: {
|
|
@ -123,8 +123,18 @@ class CubeTubeGame < GameplayScene
|
|||
end
|
||||
@bg_x %= @bg_w if @bg_x >= @bg_w
|
||||
|
||||
dirt = Sprite.for(:dirt)
|
||||
10.times do |i|
|
||||
dirt.render(@args, { x: @bg_x + (i * (dirt.w)), y: 0 - dirt.h + 1 })
|
||||
dirt.render(@args, { x: @bg_x - (i * (dirt.w)), y: 0 - dirt.h + 1 })
|
||||
dirt.render(@args, { x: @bg_x + (i * (dirt.w)), y: @args.grid.h })
|
||||
dirt.render(@args, { x: @bg_x - (i * (dirt.w)), y: @args.grid.h })
|
||||
end
|
||||
|
||||
Sprite.for(:tunnel_loop).render(@args, { x: @bg_x + @bg_w, y: 0, w: @bg_w, h: 720 })
|
||||
Sprite.for(:tunnel_loop).render(@args, { x: @bg_x, y: 0, w: @bg_w, h: 720 })
|
||||
Sprite.for(:tunnel_loop).render(@args, { x: @bg_x - @bg_w, y: 0, w: @bg_w, h: 720 })
|
||||
Sprite.for(:tunnel_loop).render(@args, { x: @bg_x - (@bg_w * 2), y: 0, w: @bg_w, h: 720 })
|
||||
|
||||
# @grid_y = ((1280 - (@grid_h * @blocksize)) / 2) - 21
|
||||
Sprite.for(:train).render(@args, { x: 0, y: @grid_x - 140.75 })
|
|
@ -9,11 +9,13 @@ class Intro < GameplayScene
|
|||
@train_spline = [
|
||||
[1.0, 0.25, 0, 0]
|
||||
]
|
||||
@full_station_w = Sprite.for(:station_loop).w + Sprite.for(:station_end).w
|
||||
@station_start_w = Sprite.for(:station_start).w
|
||||
@full_station_start_w = Sprite.for(:station_start).w + Sprite.for(:tunnel_loop).w
|
||||
@tunnel_w = Sprite.for(:tunnel_loop).w
|
||||
@full_station_start_w = @station_start_w + @tunnel_w
|
||||
@tracks_w = Sprite.for(:tracks).w
|
||||
|
||||
@leave_duration = 600
|
||||
@leave_duration = 500
|
||||
@leave_spline = [
|
||||
[0, 0, 0.5, 1.0]
|
||||
]
|
||||
|
@ -40,7 +42,7 @@ class Intro < GameplayScene
|
|||
@state += 1
|
||||
end
|
||||
when 1
|
||||
@train_pos = 1280 * args.easing.ease_spline(@train_start, now, @train_duration, @train_spline)
|
||||
@train_pos = @train_start_pos * args.easing.ease_spline(@train_start, now, @train_duration, @train_spline)
|
||||
if @train_pos <= 0
|
||||
@state += 1
|
||||
@wait_start = now
|
||||
|
@ -63,9 +65,18 @@ class Intro < GameplayScene
|
|||
end
|
||||
end
|
||||
|
||||
dirt = Sprite.for(:dirt)
|
||||
dx = 0 - @full_station_start_w - @tunnel_w
|
||||
while dx < @full_station_w
|
||||
dirt.render(args, { x: @station_pos + dx, y: 0 - dirt.h + 1 })
|
||||
dirt.render(args, { x: @station_pos + dx, y: args.grid.h })
|
||||
dx += dirt.w
|
||||
end
|
||||
|
||||
Sprite.for(:station_loop).render(args, { x: @station_pos })
|
||||
Sprite.for(:station_start).render(args, { x: @station_pos - @station_start_w })
|
||||
Sprite.for(:tunnel_loop).render(args, { x: @station_pos - @full_station_start_w })
|
||||
Sprite.for(:tunnel_loop).render(args, { x: @station_pos - @full_station_start_w - @tunnel_w })
|
||||
|
||||
Sprite.for(:train).render(args, { y: 39.25, x: @train_pos })
|
||||
Sprite.for(:screen).render(args, { x: @train_pos + 1024, y: 270 })
|
||||
|
@ -98,7 +109,7 @@ class Intro < GameplayScene
|
|||
@train_start = 0
|
||||
@wait_start = 0
|
||||
@leave_start = 0
|
||||
@train_pos = 1280
|
||||
@train_pos = @train_start_pos = 1500
|
||||
@station_pos = 0
|
||||
@screen_on = false
|
||||
end
|
|
@ -36,7 +36,7 @@ class MainMenu < MenuScene
|
|||
next_sec = random(20..50)
|
||||
@next_announcement = args.state.tick_count + (next_sec * 60)
|
||||
sound = :"ambient#{random(1..6)}"
|
||||
puts sound, Sound.for(sound).input
|
||||
# puts sound, Sound.for(sound).input
|
||||
Sound.play(args, sound)
|
||||
end
|
||||
|
|
@ -39,7 +39,9 @@ class MenuScene < SceneInstance
|
|||
text(option[:key])
|
||||
end
|
||||
|
||||
if (args.state.tick_count - @first_render) < 60 * (1.5 + i) * 0.2
|
||||
scramble = (args.state.tick_count - @first_render) < 60 * (1.5 + i) * 0.2
|
||||
|
||||
if scramble
|
||||
if args.state.tick_count % 4 == 0
|
||||
@rand_strings[i] = (0...(rand(text.length >= 3 ? text.length : 3) + 3)).map { ('A'..'Z').to_a[rand(26)] }.join
|
||||
end
|
||||
|
@ -73,7 +75,7 @@ class MenuScene < SceneInstance
|
|||
|
||||
button_border = { w: 340, h: 80, x: l.x - 170, y: l.y - 55 }.merge(WHITE)
|
||||
# (args.outputs.borders << button_border) if mobile?
|
||||
if args.inputs.mouse.up && args.inputs.mouse.inside_rect?(button_border)
|
||||
if args.inputs.mouse.up && args.inputs.mouse.inside_rect?(button_border) && !scramble
|
||||
o = @menu_options.find { |o| o[:key] == l[:key] }
|
||||
Sound.play(args, :menu)
|
||||
o[:on_select].call(args) if o
|
||||
|
@ -88,7 +90,7 @@ class MenuScene < SceneInstance
|
|||
super
|
||||
@first_render = args.state.tick_count if @first_render.nil?
|
||||
|
||||
Sprite.for(:menu).render(args)
|
||||
Sprite.for(:menu_l).render(args)
|
||||
|
||||
args.outputs.labels << label(
|
||||
@title.to_s.upcase,
|
|
@ -9,6 +9,10 @@ class PauseMenu < MenuScene
|
|||
key: :resume,
|
||||
on_select: ->(args) { Scene.pop(args) }
|
||||
},
|
||||
{
|
||||
key: :restart,
|
||||
on_select: ->(args) { Scene.switch(args, :intro, reset: true) }
|
||||
},
|
||||
{
|
||||
key: :settings,
|
||||
on_select: ->(args) { Scene.push(args, :settings, reset: true, reset_on_pop: true) }
|
||||
|
@ -19,12 +23,12 @@ class PauseMenu < MenuScene
|
|||
}
|
||||
]
|
||||
|
||||
if args.gtk.platform?(:desktop)
|
||||
menu_options << {
|
||||
key: :quit,
|
||||
on_select: ->(args) { args.gtk.request_quit }
|
||||
}
|
||||
end
|
||||
# if args.gtk.platform?(:desktop)
|
||||
# menu_options << {
|
||||
# key: :quit,
|
||||
# on_select: ->(args) { args.gtk.request_quit }
|
||||
# }
|
||||
# end
|
||||
|
||||
super args, opts, :paused, menu_options
|
||||
end
|
|
@ -25,8 +25,10 @@ module Sprite
|
|||
screen_s3: SpriteInstance.new({ w: 250, h: 210, path: 'sprites/screen-s3.png' }),
|
||||
screen_s4: SpriteInstance.new({ w: 250, h: 210, path: 'sprites/screen-s4.png' }),
|
||||
menu: SpriteInstance.new({ w: 1280, h: 720, path: 'sprites/menu.png' }),
|
||||
menu_l: SpriteInstance.new({ w: 2760, h: 1550, path: 'sprites/menu_l.png', x: -740, y: -415 }),
|
||||
tunnel_loop: SpriteInstance.new({ w: 1358, h: 720, path: 'sprites/tunnel-loop.png' }),
|
||||
tracks: SpriteInstance.new({ w: 1358, h: 55, path: 'sprites/tracks.png' }),
|
||||
dirt: SpriteInstance.new({ w: 194, h: 150, path: 'sprites/dirt.png' }),
|
||||
station_loop: SpriteInstance.new({ w: 1811, h: 720, path: 'sprites/station-loop.png' }),
|
||||
station_start: SpriteInstance.new({ w: 618, h: 720, path: 'sprites/station-start.png' }),
|
||||
station_end: SpriteInstance.new({ w: 518, h: 720, path: 'sprites/station-end.png' })
|
|
@ -16,6 +16,7 @@ TEXT = {
|
|||
paused: "Paused",
|
||||
quit: "Quit",
|
||||
resume: "Resume",
|
||||
restart: "Restart",
|
||||
return_to_main_menu: "Main Menu",
|
||||
settings: "Settings",
|
||||
sfx: "Sound Effects",
|
|
@ -53,7 +53,7 @@ def debug_tick(args)
|
|||
|
||||
debug_label(
|
||||
args, 24.from_right, 24.from_top,
|
||||
"v#{version} | DR v#{$gtk.version} (#{$gtk.platform}) | Ticks: #{args.state.tick_count} | FPS: #{args.gtk.current_framerate.round}",
|
||||
"v#{version} | DR v#{$gtk.version} (#{$gtk.platform}) | Ticks: #{args.state.tick_count} | FPS: #{args.gtk.current_framerate.round} | Win: #{args.grid.window_width}x#{args.grid.window_height}",
|
||||
ALIGN_RIGHT)
|
||||
|
||||
|
|
@ -23,12 +23,12 @@ module Scene
|
|||
# if `scene` is not a `SceneInstance`, it's probably a symbol representing
|
||||
# the scene we're switching to, so go get it.
|
||||
the_scene = scene.is_a?(SceneInstance) ? scene : SCENES[scene].new(args)
|
||||
puts '---'
|
||||
puts 'switching to'
|
||||
puts scene unless scene.is_a?(SceneInstance)
|
||||
puts SCENES[scene] unless scene.is_a?(SceneInstance)
|
||||
puts the_scene
|
||||
puts '---'
|
||||
# puts '---'
|
||||
# puts 'switching to'
|
||||
# puts scene unless scene.is_a?(SceneInstance)
|
||||
# puts SCENES[scene] unless scene.is_a?(SceneInstance)
|
||||
# puts the_scene
|
||||
# puts '---'
|
||||
|
||||
# if the stack is empty (e.g. we just cleared it), then push this scene
|
||||
args.state.scene_stack.push(the_scene) if args.state.scene_stack.empty?
|
||||
|
@ -56,7 +56,7 @@ module Scene
|
|||
scene = args.state.scene_stack.last
|
||||
scene = scene._?(default(args))
|
||||
reset = scene.reset_on_pop if reset.nil?
|
||||
puts reset, scene, scene.reset_on_pop
|
||||
# puts reset, scene, scene.reset_on_pop
|
||||
|
||||
switch(args, scene, reset: reset, push_or_pop: true)
|
||||
end
|
|
@ -2,7 +2,7 @@ devid=deathau
|
|||
devtitle=death.au
|
||||
gameid=cube-tube
|
||||
gametitle=Cube Tube
|
||||
version=0.1.0
|
||||
version=0.2.1
|
||||
icon=metadata/icon.png
|
||||
|
||||
# === Flags available at all licensing tiers ===
|
||||
|
@ -30,7 +30,7 @@ orientation=landscape
|
|||
# HD Mode: when enabled, will give you 720p, 1080p, 1440p, 4k, and 5k rendering options
|
||||
# Check out the following YouTube Video for a demo of DragonRuby's HD Capabilities
|
||||
# https://youtu.be/Rnc6z84zaa4
|
||||
# hd=false
|
||||
hd=true
|
||||
|
||||
# === Texture Atlases ===
|
||||
|
||||
|
@ -42,7 +42,7 @@ orientation=landscape
|
|||
|
||||
# All Screen Mode: when enabled, removes the letter box and lets you render outside of the 16:9 safe area
|
||||
# NOTE: requires hd=true
|
||||
# allscreen=false
|
||||
allscreen=true
|
||||
|
||||
# All Screen Mode's Max Scale: You can specify the maximum scale for your game. Any resolution higher than your max scale will give more area outside of your resolutions safe area:
|
||||
|
||||
|
@ -70,4 +70,4 @@ orientation=landscape
|
|||
# allscreen_max_scale=300
|
||||
|
||||
# 5k: scales up to 6400x2880
|
||||
# allscreen_max_scale=400
|
||||
allscreen_max_scale=400
|
BIN
🕹️cube-tube/metadata/icon-ios.png
Normal file
After ![]() (image error) Size: 209 KiB |
Before ![]() (image error) Size: 52 KiB After ![]() (image error) Size: 52 KiB ![]() ![]() |