mirror of
https://github.com/SashLilac/cambridge.git
synced 2025-05-13 20:21:25 -05:00
Compare commits
11 Commits
06225bd35a
...
v0.3-april
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
23a8c400ba | ||
|
|
bfbba75f17 | ||
|
|
27e699841e | ||
|
|
fac8c6584e | ||
|
|
9e447d51a7 | ||
|
|
4dfa234bc3 | ||
|
|
92d67968f5 | ||
|
|
d68bd13d2a | ||
|
|
a84335646d | ||
|
|
d46973f12d | ||
|
|
d4360b3662 |
@@ -26,13 +26,13 @@ All assets needed are bundled with the executable.
|
||||
|
||||
#### Bleeding edge
|
||||
|
||||
If you want the bleeding edge version, download [this](https://github.com/MillaBasset/cambridge/archive/master.zip).
|
||||
If you want the bleeding edge version, download [this](https://github.com/MillaBasset/cambridge/archive/master.zip). Extract the ZIP to a folder of your choosing.
|
||||
|
||||
Extract the ZIP, open a Command Prompt at the folder you extracted Cambridge to, then run this command:
|
||||
Assuming you're on a 64-bit system, you can double-click `start_win64.bat` to run the game. If that doesn't work, open a Command Prompt where you extracted Cambridge and run:
|
||||
|
||||
dist\windows\love.exe .
|
||||
|
||||
Alternatively, if you're on a 32-bit system, run this instead:
|
||||
If you're on a 32-bit system, you'll want to double-click `start_win32.bat`. If that doesn't work, run this instead:
|
||||
|
||||
dist\win32\love.exe .
|
||||
|
||||
@@ -42,7 +42,7 @@ Then, check the mod pack section at the bottom of this page.
|
||||
|
||||
### macOS, Linux
|
||||
|
||||
If you haven't already, install `love` with your favourite package manager (Homebrew on macOS, your system's default on Linux). **Make sure you're using LÖVE 11, because it won't work with earlier versions!**
|
||||
If you haven't already, install `love` with your favourite package manager (Homebrew on macOS, your system's default on Linux). **Make sure you're using LÖVE 11.3, because it won't work with earlier or later versions!**
|
||||
|
||||
#### Downloading a release
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@ backgrounds = {
|
||||
love.graphics.newImage("res/backgrounds/1800.png"),
|
||||
love.graphics.newImage("res/backgrounds/1900.png"),
|
||||
title = love.graphics.newImage("res/backgrounds/title.png"),
|
||||
title_no_icon = love.graphics.newImage("res/backgrounds/title-no-icon.jpg"),
|
||||
title_night = love.graphics.newImage("res/backgrounds/title-night.jpg"),
|
||||
snow = love.graphics.newImage("res/backgrounds/snow.png"),
|
||||
input_config = love.graphics.newImage("res/backgrounds/options-input.png"),
|
||||
|
||||
2
main.lua
2
main.lua
@@ -118,7 +118,7 @@ function love.keypressed(key, scancode)
|
||||
love.filesystem.remove("ss")
|
||||
love.filesystem.createDirectory("ss")
|
||||
end
|
||||
print("Saving screenshot as "..ss_name)
|
||||
print("Saving screenshot as "..love.filesystem.getSaveDirectory().."/"..ss_name)
|
||||
GLOBAL_CANVAS:newImageData():encode("png", ss_name)
|
||||
-- function keys are reserved
|
||||
elseif string.match(scancode, "^f[1-9]$") or string.match(scancode, "^f[1-9][0-9]+$") then
|
||||
|
||||
BIN
res/backgrounds/title-no-icon.jpg
Normal file
BIN
res/backgrounds/title-no-icon.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 343 KiB |
@@ -5,7 +5,7 @@ CreditsScene.title = "Credits"
|
||||
function CreditsScene:new()
|
||||
self.frames = 0
|
||||
-- higher = slower
|
||||
self.scroll_speed = 1.85
|
||||
self.scroll_speed = 1.8
|
||||
switchBGM("credit_roll", "gm3")
|
||||
|
||||
DiscordRPC:update({
|
||||
@@ -40,14 +40,14 @@ function CreditsScene:render()
|
||||
|
||||
love.graphics.setFont(font_3x5_4)
|
||||
love.graphics.print("Cambridge Credits", 320, 500 - offset)
|
||||
love.graphics.print("THANK YOU\nFOR PLAYING!", 320, math.max(2030 - offset, 240))
|
||||
love.graphics.print("THANK YOU\nFOR PLAYING!", 320, math.max(2050 - offset, 240))
|
||||
|
||||
love.graphics.setFont(font_3x5_3)
|
||||
love.graphics.print("Game Developers", 320, 550 - offset)
|
||||
love.graphics.print("Project Heads", 320, 640 - offset)
|
||||
love.graphics.print("Notable Game Developers", 320, 750 - offset)
|
||||
love.graphics.print("Special Thanks", 320, 1000 - offset)
|
||||
love.graphics.print("- Milla", 320, math.max(2110 - offset, 320))
|
||||
love.graphics.print("- Milla", 320, math.max(2130 - offset, 320))
|
||||
|
||||
love.graphics.setFont(font_3x5_2)
|
||||
love.graphics.print("Oshisaure\nJoe Zeng", 320, 590 - offset)
|
||||
@@ -66,7 +66,7 @@ function CreditsScene:render()
|
||||
"CylinderKnot\neightsixfivezero\nEricICX\nGesomaru\n" ..
|
||||
"gizmo4487\nJBroms\nKirby703\nKitaru\n" ..
|
||||
"M1ssing0\nMattMayuga\nMyPasswordIsWeak\n" ..
|
||||
"Nikki Karissa\noffwo\nOliver\nPineapple\npokemonfan1937\n" ..
|
||||
"Nikki Karissa\nnim\noffwo\nOliver\nPineapple\npokemonfan1937\n" ..
|
||||
"Pyra Neoxi\nRDST64\nRocketLanterns\nRustyFoxxo\n" ..
|
||||
"saphie\nShelleloch\nSimon\nstratus\nSuper302\n" ..
|
||||
"switchpalacecorner\nterpyderp\nTetrian22\nTetro48\nThatCookie\n" ..
|
||||
|
||||
@@ -9,6 +9,7 @@ function GameScene:new(game_mode, ruleset, inputs)
|
||||
self.retry_ruleset = ruleset
|
||||
self.secret_inputs = inputs
|
||||
self.game = game_mode(self.secret_inputs)
|
||||
self.game.secret_inputs = inputs
|
||||
self.ruleset = ruleset(self.game)
|
||||
self.game:initialize(self.ruleset)
|
||||
self.inputs = {
|
||||
|
||||
@@ -4,14 +4,14 @@ local ReplayScene = Scene:extend()
|
||||
|
||||
ReplayScene.title = "Replay"
|
||||
|
||||
function ReplayScene:new(replay, game_mode, ruleset, inputs)
|
||||
function ReplayScene:new(replay, game_mode, ruleset)
|
||||
config.gamesettings = replay["gamesettings"]
|
||||
love.math.setRandomSeed(replay["random_low"], replay["random_high"])
|
||||
love.math.setRandomState(replay["random_state"])
|
||||
self.retry_replay = replay
|
||||
self.retry_mode = game_mode
|
||||
self.retry_ruleset = ruleset
|
||||
self.secret_inputs = inputs
|
||||
self.secret_inputs = replay["secret_inputs"]
|
||||
self.game = game_mode(self.secret_inputs)
|
||||
self.game.save_replay = false
|
||||
self.ruleset = ruleset(self.game)
|
||||
|
||||
@@ -170,8 +170,7 @@ function ReplaySelectScene:onInputPress(e)
|
||||
scene = ReplayScene(
|
||||
replays[self.menu_state.replay],
|
||||
mode,
|
||||
rules,
|
||||
replays[self.menu_state.replay]["secret_inputs"]
|
||||
rules
|
||||
)
|
||||
elseif e.input == "up" or e.scancode == "up" then
|
||||
self:changeOption(-1)
|
||||
|
||||
@@ -60,18 +60,38 @@ function TitleScene:update()
|
||||
else self.y_offset = 310 - self.frames end
|
||||
end
|
||||
|
||||
local block_offsets = {
|
||||
{color = "M", x = 0, y = 0},
|
||||
{color = "G", x = 32, y = 0},
|
||||
{color = "Y", x = 64, y = 0},
|
||||
{color = "B", x = 0, y = 32},
|
||||
{color = "O", x = 0, y = 64},
|
||||
{color = "C", x = 32, y = 64},
|
||||
{color = "R", x = 64, y = 64}
|
||||
}
|
||||
|
||||
function TitleScene:render()
|
||||
love.graphics.setFont(font_3x5_4)
|
||||
love.graphics.setColor(1, 1, 1, 1 - self.snow_bg_opacity)
|
||||
love.graphics.draw(
|
||||
backgrounds["title"], -- title_night
|
||||
backgrounds["title_no_icon"], -- title, title_night
|
||||
0, 0, 0,
|
||||
0.5, 0.5
|
||||
)
|
||||
|
||||
-- 490, 192
|
||||
for _, b in ipairs(block_offsets) do
|
||||
love.graphics.draw(
|
||||
blocks["2tie"][b.color],
|
||||
490 + b.x, 192 + b.y, 0,
|
||||
2, 2
|
||||
)
|
||||
end
|
||||
|
||||
--[[
|
||||
love.graphics.draw(
|
||||
misc_graphics["icon"],
|
||||
460, 170, 0,
|
||||
490, 192, 0,
|
||||
2, 2
|
||||
)
|
||||
]]
|
||||
|
||||
1
start_win32.bat
Normal file
1
start_win32.bat
Normal file
@@ -0,0 +1 @@
|
||||
dist\win32\love.exe .
|
||||
1
start_win64.bat
Normal file
1
start_win64.bat
Normal file
@@ -0,0 +1 @@
|
||||
dist\windows\love.exe .
|
||||
@@ -16,11 +16,10 @@ GameMode.hash = ""
|
||||
GameMode.tagline = ""
|
||||
GameMode.rollOpacityFunction = function(age) return 0 end
|
||||
|
||||
function GameMode:new(secret_inputs)
|
||||
function GameMode:new()
|
||||
self.replay_inputs = {}
|
||||
self.random_low, self.random_high = love.math.getRandomSeed()
|
||||
self.random_state = love.math.getRandomState()
|
||||
self.secret_inputs = secret_inputs
|
||||
self.save_replay = config.gamesettings.save_replay == 1
|
||||
|
||||
self.grid = Grid(10, 24)
|
||||
|
||||
@@ -309,7 +309,7 @@ local mroll_points = {10, 20, 30, 100}
|
||||
local grade_conversion = {
|
||||
[0] = 0,
|
||||
1, 2, 3, 4, 5, 5, 6, 6, 7, 7,
|
||||
7, 8, 8, 8, 9, 9, 9, 10, 11, 12, 12,
|
||||
7, 8, 8, 8, 9, 9, 9, 10, 11, 12,
|
||||
12, 12, 13, 13, 14, 14, 15, 15, 16, 16,
|
||||
17
|
||||
}
|
||||
@@ -354,8 +354,7 @@ function MarathonA3Game:getAggregateGrade()
|
||||
return math.min(
|
||||
self.section_cool_grade +
|
||||
math.floor(self.roll_points / 100) +
|
||||
grade_conversion[self.grade],
|
||||
self.roll_frames > 3238 and 32 or 31
|
||||
grade_conversion[self.grade]
|
||||
)
|
||||
end
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ function SurvivalA2Game:new()
|
||||
self.roll_frames = 0
|
||||
self.combo = 1
|
||||
self.randomizer = History6RollsRandomizer()
|
||||
|
||||
|
||||
self.SGnames = {
|
||||
"9", "8", "7", "6", "5", "4", "3", "2", "1",
|
||||
"S1", "S2", "S3", "S4", "S5", "S6", "S7", "S8", "S9",
|
||||
@@ -101,6 +101,7 @@ function SurvivalA2Game:onLineClear(cleared_row_count)
|
||||
self.clear = true
|
||||
if new_level < 999 then
|
||||
self.game_over = true
|
||||
return
|
||||
end
|
||||
end
|
||||
self.level = new_level
|
||||
|
||||
@@ -209,7 +209,7 @@ function Ruleset:initializePiece(
|
||||
|
||||
local colours
|
||||
if table.equalvalues(
|
||||
self.colourscheme, {"I", "J", "L", "O", "S", "T", "Z"}
|
||||
table.keys(self.colourscheme), {"I", "J", "L", "O", "S", "T", "Z"}
|
||||
) then
|
||||
colours = ({self.colourscheme, ColourSchemes.Arika, ColourSchemes.TTC})[config.gamesettings.piece_colour]
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user