Initialize
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
/target
|
||||||
5470
Cargo.lock
generated
Normal file
15
Cargo.toml
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
[package]
|
||||||
|
name = "rusty_engine_tutorial"
|
||||||
|
version = "0.1.0"
|
||||||
|
edition = "2024"
|
||||||
|
|
||||||
|
[dependencies]
|
||||||
|
rusty_engine = "7.0.0"
|
||||||
|
|
||||||
|
[profile.dev]
|
||||||
|
opt-level = 3
|
||||||
|
debug = false
|
||||||
|
debug-assertions = false
|
||||||
|
overflow-checks = false
|
||||||
|
incremental = false
|
||||||
|
codegen-units = 16
|
||||||
BIN
assets/audio/music/Classy 8-Bit.ogg
Normal file
BIN
assets/audio/music/Mysterious Magic.ogg
Normal file
1
assets/audio/music/README.md
Normal file
@@ -0,0 +1 @@
|
|||||||
|
The music files "Arcade Fantasy.ogg", "Classy 8-Bit.ogg", "Mysterious Magic.ogg", and "Whimsical Popsicle.ogg" have been licensed for non-attribution use in Rusty Engine itself by a commercial license agreement between the author of Rusty Engine and the creator of the music, Eric Matyas. However, any distribution of these music files in any project created using Rusty Engine must include attribution information as per the directions at https://soundimage.org/attribution-info/ or be independently licensed.
|
||||||
BIN
assets/audio/music/Whimsical Popsicle.ogg
Normal file
4
assets/audio/sfx/README.md
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
Assets adapted from Kenney [Audio Packs] under the [CC0 1.0 Universal] license.
|
||||||
|
|
||||||
|
[CC0 1.0 Universal]: https://creativecommons.org/publicdomain/zero/1.0/
|
||||||
|
[Audio Packs]: https://www.kenney.nl/assets?q=audio
|
||||||
BIN
assets/audio/sfx/click.ogg
Normal file
BIN
assets/audio/sfx/confirmation1.ogg
Normal file
BIN
assets/audio/sfx/confirmation2.ogg
Normal file
BIN
assets/audio/sfx/congratulations.ogg
Normal file
BIN
assets/audio/sfx/forcefield1.ogg
Normal file
BIN
assets/audio/sfx/forcefield2.ogg
Normal file
BIN
assets/audio/sfx/impact1.ogg
Normal file
BIN
assets/audio/sfx/impact2.ogg
Normal file
BIN
assets/audio/sfx/impact3.ogg
Normal file
BIN
assets/audio/sfx/jingle1.ogg
Normal file
BIN
assets/audio/sfx/jingle2.ogg
Normal file
BIN
assets/audio/sfx/jingle3.ogg
Normal file
BIN
assets/audio/sfx/minimize1.ogg
Normal file
BIN
assets/audio/sfx/minimize2.ogg
Normal file
BIN
assets/audio/sfx/switch1.ogg
Normal file
BIN
assets/audio/sfx/switch2.ogg
Normal file
BIN
assets/audio/sfx/tones1.ogg
Normal file
BIN
assets/audio/sfx/tones2.ogg
Normal file
BIN
assets/font/FiraMono-Medium.ttf
Executable file
BIN
assets/font/FiraSans-Bold.ttf
Executable file
4
assets/sprite/racing/README.md
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
Assets adapted from Kenney [Racing Pack] under the [CC0 1.0 Universal] license.
|
||||||
|
|
||||||
|
[CC0 1.0 Universal]: https://creativecommons.org/publicdomain/zero/1.0/
|
||||||
|
[Racing Pack]: https://kenney.nl/assets/racing-pack
|
||||||
18
assets/sprite/racing/barrel_blue.collider
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
Poly([
|
||||||
|
(28, 0),
|
||||||
|
(25.868626, 10.715136),
|
||||||
|
(19.79899, 19.79899),
|
||||||
|
(10.715136, 25.868626),
|
||||||
|
(0, 28),
|
||||||
|
(-10.715136, 25.868626),
|
||||||
|
(-19.79899, 19.79899),
|
||||||
|
(-25.868626, 10.715136),
|
||||||
|
(-28, 0),
|
||||||
|
(-25.868626, -10.715136),
|
||||||
|
(-19.79899, -19.79899),
|
||||||
|
(-10.715136, -25.868626),
|
||||||
|
(0, -28),
|
||||||
|
(10.715136, -25.868626),
|
||||||
|
(19.79899, -19.79899),
|
||||||
|
(25.868626, -10.715136),
|
||||||
|
])
|
||||||
BIN
assets/sprite/racing/barrel_blue.png
Normal file
|
After Width: | Height: | Size: 977 B |
18
assets/sprite/racing/barrel_red.collider
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
Poly([
|
||||||
|
(28, 0),
|
||||||
|
(25.868626, 10.715136),
|
||||||
|
(19.79899, 19.79899),
|
||||||
|
(10.715136, 25.868626),
|
||||||
|
(0, 28),
|
||||||
|
(-10.715136, 25.868626),
|
||||||
|
(-19.79899, 19.79899),
|
||||||
|
(-25.868626, 10.715136),
|
||||||
|
(-28, 0),
|
||||||
|
(-25.868626, -10.715136),
|
||||||
|
(-19.79899, -19.79899),
|
||||||
|
(-10.715136, -25.868626),
|
||||||
|
(0, -28),
|
||||||
|
(10.715136, -25.868626),
|
||||||
|
(19.79899, -19.79899),
|
||||||
|
(25.868626, -10.715136),
|
||||||
|
])
|
||||||
BIN
assets/sprite/racing/barrel_red.png
Normal file
|
After Width: | Height: | Size: 977 B |
10
assets/sprite/racing/barrier_red.collider
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
Poly([
|
||||||
|
(-105, -29),
|
||||||
|
(-105, 28),
|
||||||
|
(-102, 31),
|
||||||
|
(102, 31),
|
||||||
|
(105, 28),
|
||||||
|
(105, -29),
|
||||||
|
(103, -31),
|
||||||
|
(-103, -31),
|
||||||
|
])
|
||||||
BIN
assets/sprite/racing/barrier_red.png
Normal file
|
After Width: | Height: | Size: 261 B |
10
assets/sprite/racing/barrier_white.collider
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
Poly([
|
||||||
|
(-105, -29),
|
||||||
|
(-105, 28),
|
||||||
|
(-102, 31),
|
||||||
|
(102, 31),
|
||||||
|
(105, 28),
|
||||||
|
(105, -29),
|
||||||
|
(103, -31),
|
||||||
|
(-103, -31),
|
||||||
|
])
|
||||||
BIN
assets/sprite/racing/barrier_white.png
Normal file
|
After Width: | Height: | Size: 261 B |
19
assets/sprite/racing/car_black.collider
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
Poly([
|
||||||
|
(-45, 33.5),
|
||||||
|
(38.5, 33.5),
|
||||||
|
(50, 29.5),
|
||||||
|
(57, 22.5),
|
||||||
|
(59, 18),
|
||||||
|
(59, -13),
|
||||||
|
(57, -23),
|
||||||
|
(51, -29),
|
||||||
|
(45, -32),
|
||||||
|
(37, -34),
|
||||||
|
(-43, -34),
|
||||||
|
(-50, -32),
|
||||||
|
(-57, -26.5),
|
||||||
|
(-60, -19),
|
||||||
|
(-60, 19),
|
||||||
|
(-58, 24.5),
|
||||||
|
(-52, 30.5),
|
||||||
|
])
|
||||||
BIN
assets/sprite/racing/car_black.png
Normal file
|
After Width: | Height: | Size: 3.3 KiB |
19
assets/sprite/racing/car_blue.collider
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
Poly([
|
||||||
|
(-45, 33.5),
|
||||||
|
(38.5, 33.5),
|
||||||
|
(50, 29.5),
|
||||||
|
(57, 22.5),
|
||||||
|
(59, 18),
|
||||||
|
(59, -13),
|
||||||
|
(57, -23),
|
||||||
|
(51, -29),
|
||||||
|
(45, -32),
|
||||||
|
(37, -34),
|
||||||
|
(-43, -34),
|
||||||
|
(-50, -32),
|
||||||
|
(-57, -26.5),
|
||||||
|
(-60, -19),
|
||||||
|
(-60, 19),
|
||||||
|
(-58, 24.5),
|
||||||
|
(-52, 30.5),
|
||||||
|
])
|
||||||
BIN
assets/sprite/racing/car_blue.png
Normal file
|
After Width: | Height: | Size: 3.3 KiB |
19
assets/sprite/racing/car_green.collider
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
Poly([
|
||||||
|
(-45, 33.5),
|
||||||
|
(38.5, 33.5),
|
||||||
|
(50, 29.5),
|
||||||
|
(57, 22.5),
|
||||||
|
(59, 18),
|
||||||
|
(59, -13),
|
||||||
|
(57, -23),
|
||||||
|
(51, -29),
|
||||||
|
(45, -32),
|
||||||
|
(37, -34),
|
||||||
|
(-43, -34),
|
||||||
|
(-50, -32),
|
||||||
|
(-57, -26.5),
|
||||||
|
(-60, -19),
|
||||||
|
(-60, 19),
|
||||||
|
(-58, 24.5),
|
||||||
|
(-52, 30.5),
|
||||||
|
])
|
||||||
BIN
assets/sprite/racing/car_green.png
Normal file
|
After Width: | Height: | Size: 3.3 KiB |
19
assets/sprite/racing/car_red.collider
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
Poly([
|
||||||
|
(-45, 33.5),
|
||||||
|
(38.5, 33.5),
|
||||||
|
(50, 29.5),
|
||||||
|
(57, 22.5),
|
||||||
|
(59, 18),
|
||||||
|
(59, -13),
|
||||||
|
(57, -23),
|
||||||
|
(51, -29),
|
||||||
|
(45, -32),
|
||||||
|
(37, -34),
|
||||||
|
(-43, -34),
|
||||||
|
(-50, -32),
|
||||||
|
(-57, -26.5),
|
||||||
|
(-60, -19),
|
||||||
|
(-60, 19),
|
||||||
|
(-58, 24.5),
|
||||||
|
(-52, 30.5),
|
||||||
|
])
|
||||||
BIN
assets/sprite/racing/car_red.png
Normal file
|
After Width: | Height: | Size: 3.3 KiB |
19
assets/sprite/racing/car_yellow.collider
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
Poly([
|
||||||
|
(-45, 33.5),
|
||||||
|
(38.5, 33.5),
|
||||||
|
(50, 29.5),
|
||||||
|
(57, 22.5),
|
||||||
|
(59, 18),
|
||||||
|
(59, -13),
|
||||||
|
(57, -23),
|
||||||
|
(51, -29),
|
||||||
|
(45, -32),
|
||||||
|
(37, -34),
|
||||||
|
(-43, -34),
|
||||||
|
(-50, -32),
|
||||||
|
(-57, -26.5),
|
||||||
|
(-60, -19),
|
||||||
|
(-60, 19),
|
||||||
|
(-58, 24.5),
|
||||||
|
(-52, 30.5),
|
||||||
|
])
|
||||||
BIN
assets/sprite/racing/car_yellow.png
Normal file
|
After Width: | Height: | Size: 3.3 KiB |
10
assets/sprite/racing/cone_straight.collider
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
Poly([
|
||||||
|
(-22, 16),
|
||||||
|
(-16, 22),
|
||||||
|
(16, 22),
|
||||||
|
(22, 16),
|
||||||
|
(22, -16),
|
||||||
|
(16, -22),
|
||||||
|
(-16, -22),
|
||||||
|
(-22, -16),
|
||||||
|
])
|
||||||
BIN
assets/sprite/racing/cone_straight.png
Normal file
|
After Width: | Height: | Size: 2.0 KiB |
4
assets/sprite/rolling/README.md
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
Assets adapted from Kenney [Rolling Ball Assets] pack under the [CC0 1.0 Universal] license.
|
||||||
|
|
||||||
|
[CC0 1.0 Universal]: https://creativecommons.org/publicdomain/zero/1.0/
|
||||||
|
[Rolling Ball Assets]: https://kenney.nl/assets/rolling-ball-assets
|
||||||
18
assets/sprite/rolling/ball_blue.collider
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
Poly([
|
||||||
|
(16.5, 0),
|
||||||
|
(15.244012, 6.3142767),
|
||||||
|
(11.667262, 11.667262),
|
||||||
|
(6.3142767, 15.244012),
|
||||||
|
(0, 16.5),
|
||||||
|
(-6.3142767, 15.244012),
|
||||||
|
(-11.667262, 11.667262),
|
||||||
|
(-15.244012, 6.3142767),
|
||||||
|
(-16.5, 0),
|
||||||
|
(-15.244012, -6.3142767),
|
||||||
|
(-11.667262, -11.667262),
|
||||||
|
(-6.3142767, -15.244012),
|
||||||
|
(0, -16.5),
|
||||||
|
(6.3142767, -15.244012),
|
||||||
|
(11.667262, -11.667262),
|
||||||
|
(15.244012, -6.3142767),
|
||||||
|
])
|
||||||
BIN
assets/sprite/rolling/ball_blue.png
Normal file
|
After Width: | Height: | Size: 647 B |
18
assets/sprite/rolling/ball_blue_alt.collider
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
Poly([
|
||||||
|
(16.5, 0),
|
||||||
|
(15.244012, 6.3142767),
|
||||||
|
(11.667262, 11.667262),
|
||||||
|
(6.3142767, 15.244012),
|
||||||
|
(0, 16.5),
|
||||||
|
(-6.3142767, 15.244012),
|
||||||
|
(-11.667262, 11.667262),
|
||||||
|
(-15.244012, 6.3142767),
|
||||||
|
(-16.5, 0),
|
||||||
|
(-15.244012, -6.3142767),
|
||||||
|
(-11.667262, -11.667262),
|
||||||
|
(-6.3142767, -15.244012),
|
||||||
|
(0, -16.5),
|
||||||
|
(6.3142767, -15.244012),
|
||||||
|
(11.667262, -11.667262),
|
||||||
|
(15.244012, -6.3142767),
|
||||||
|
])
|
||||||
BIN
assets/sprite/rolling/ball_blue_alt.png
Normal file
|
After Width: | Height: | Size: 743 B |
18
assets/sprite/rolling/ball_red.collider
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
Poly([
|
||||||
|
(16.5, 0),
|
||||||
|
(15.244012, 6.3142767),
|
||||||
|
(11.667262, 11.667262),
|
||||||
|
(6.3142767, 15.244012),
|
||||||
|
(0, 16.5),
|
||||||
|
(-6.3142767, 15.244012),
|
||||||
|
(-11.667262, 11.667262),
|
||||||
|
(-15.244012, 6.3142767),
|
||||||
|
(-16.5, 0),
|
||||||
|
(-15.244012, -6.3142767),
|
||||||
|
(-11.667262, -11.667262),
|
||||||
|
(-6.3142767, -15.244012),
|
||||||
|
(0, -16.5),
|
||||||
|
(6.3142767, -15.244012),
|
||||||
|
(11.667262, -11.667262),
|
||||||
|
(15.244012, -6.3142767),
|
||||||
|
])
|
||||||
BIN
assets/sprite/rolling/ball_red.png
Normal file
|
After Width: | Height: | Size: 647 B |
18
assets/sprite/rolling/ball_red_alt.collider
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
Poly([
|
||||||
|
(16.5, 0),
|
||||||
|
(15.244012, 6.3142767),
|
||||||
|
(11.667262, 11.667262),
|
||||||
|
(6.3142767, 15.244012),
|
||||||
|
(0, 16.5),
|
||||||
|
(-6.3142767, 15.244012),
|
||||||
|
(-11.667262, 11.667262),
|
||||||
|
(-15.244012, 6.3142767),
|
||||||
|
(-16.5, 0),
|
||||||
|
(-15.244012, -6.3142767),
|
||||||
|
(-11.667262, -11.667262),
|
||||||
|
(-6.3142767, -15.244012),
|
||||||
|
(0, -16.5),
|
||||||
|
(6.3142767, -15.244012),
|
||||||
|
(11.667262, -11.667262),
|
||||||
|
(15.244012, -6.3142767),
|
||||||
|
])
|
||||||
BIN
assets/sprite/rolling/ball_red_alt.png
Normal file
|
After Width: | Height: | Size: 743 B |
10
assets/sprite/rolling/block_corner.collider
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
Poly([
|
||||||
|
(-64, 59),
|
||||||
|
(-59, 64),
|
||||||
|
(-49, 64),
|
||||||
|
(64, -49),
|
||||||
|
(64, -59),
|
||||||
|
(59, -64),
|
||||||
|
(-59, -64),
|
||||||
|
(-64, -59),
|
||||||
|
])
|
||||||
BIN
assets/sprite/rolling/block_corner.png
Normal file
|
After Width: | Height: | Size: 947 B |
10
assets/sprite/rolling/block_narrow.collider
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
Poly([
|
||||||
|
(-64, 11),
|
||||||
|
(-59, 16),
|
||||||
|
(59, 16),
|
||||||
|
(64, 11),
|
||||||
|
(64, -11),
|
||||||
|
(59, -16),
|
||||||
|
(-59, -16),
|
||||||
|
(-64, -11),
|
||||||
|
])
|
||||||
BIN
assets/sprite/rolling/block_narrow.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
10
assets/sprite/rolling/block_small.collider
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
Poly([
|
||||||
|
(-16, 11),
|
||||||
|
(-11, 16),
|
||||||
|
(11, 16),
|
||||||
|
(16, 11),
|
||||||
|
(16, -11),
|
||||||
|
(11, -16),
|
||||||
|
(-11, -16),
|
||||||
|
(-16, -11),
|
||||||
|
])
|
||||||
BIN
assets/sprite/rolling/block_small.png
Normal file
|
After Width: | Height: | Size: 407 B |
10
assets/sprite/rolling/block_square.collider
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
Poly([
|
||||||
|
(-32, 27),
|
||||||
|
(-27, 32),
|
||||||
|
(27, 32),
|
||||||
|
(32, 27),
|
||||||
|
(32, -27),
|
||||||
|
(27, -32),
|
||||||
|
(-27, -32),
|
||||||
|
(-32, -27),
|
||||||
|
])
|
||||||
BIN
assets/sprite/rolling/block_square.png
Normal file
|
After Width: | Height: | Size: 513 B |
18
assets/sprite/rolling/hole_end.collider
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
Poly([
|
||||||
|
(18.5, 0),
|
||||||
|
(17.09177, 7.0796432),
|
||||||
|
(13.081475, 13.081475),
|
||||||
|
(7.0796432, 17.09177),
|
||||||
|
(0, 18.5),
|
||||||
|
(-7.0796432, 17.09177),
|
||||||
|
(-13.081475, 13.081475),
|
||||||
|
(-17.09177, 7.0796432),
|
||||||
|
(-18.5, 0),
|
||||||
|
(-17.09177, -7.0796432),
|
||||||
|
(-13.081475, -13.081475),
|
||||||
|
(-7.0796432, -17.09177),
|
||||||
|
(0, -18.5),
|
||||||
|
(7.0796432, -17.09177),
|
||||||
|
(13.081475, -13.081475),
|
||||||
|
(17.09177, -7.0796432),
|
||||||
|
])
|
||||||
BIN
assets/sprite/rolling/hole_end.png
Normal file
|
After Width: | Height: | Size: 909 B |
18
assets/sprite/rolling/hole_start.collider
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
Poly([
|
||||||
|
(24.5, 0),
|
||||||
|
(22.635048, 9.375744),
|
||||||
|
(17.324116, 17.324116),
|
||||||
|
(9.375744, 22.635048),
|
||||||
|
(0, 24.5),
|
||||||
|
(-9.375744, 22.635048),
|
||||||
|
(-17.324116, 17.324116),
|
||||||
|
(-22.635048, 9.375744),
|
||||||
|
(-24.5, 0),
|
||||||
|
(-22.635048, -9.375744),
|
||||||
|
(-17.324116, -17.324116),
|
||||||
|
(-9.375744, -22.635048),
|
||||||
|
(0, -24.5),
|
||||||
|
(9.375744, -22.635048),
|
||||||
|
(17.324116, -17.324116),
|
||||||
|
(22.635048, -9.375744),
|
||||||
|
])
|
||||||
BIN
assets/sprite/rolling/hole_start.png
Normal file
|
After Width: | Height: | Size: 970 B |
9
src/main.rs
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
use rusty_engine::prelude::*;
|
||||||
|
|
||||||
|
fn main() {
|
||||||
|
let mut game = Game::new();
|
||||||
|
|
||||||
|
// setup game here
|
||||||
|
|
||||||
|
game.run(());
|
||||||
|
}
|
||||||