mirror of
https://github.com/SashLilac/cambridge.git
synced 2025-05-13 20:21:25 -05:00
Compare commits
5 Commits
v0.3-beta5
...
366ac1d552
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
366ac1d552 | ||
| 302353f716 | |||
|
|
e1741440f2 | ||
|
|
c56f290921 | ||
|
|
86e975f929 |
10
README.md
10
README.md
@@ -5,7 +5,7 @@ Cambridge
|
|||||||
|
|
||||||
Welcome to Cambridge, the next open-source falling-block game engine!
|
Welcome to Cambridge, the next open-source falling-block game engine!
|
||||||
|
|
||||||
The project is written and maintained exclusively by [SashLilac](https://github.com/SashLilac), [joezeng](https://github.com/joezeng) and [Oshisaure](https://github.com/oshisaure)!
|
The project is written and maintained exclusively by [Milla](https://github.com/MillaBasset), [joezeng](https://github.com/joezeng) and [Oshisaure](https://github.com/oshisaure)!
|
||||||
|
|
||||||
The Discord server has been reopened! https://discord.gg/AADZUmgsph
|
The Discord server has been reopened! https://discord.gg/AADZUmgsph
|
||||||
|
|
||||||
@@ -32,13 +32,13 @@ You do not need LÖVE on Windows, as it comes bundled with the program.
|
|||||||
|
|
||||||
#### Stable release
|
#### Stable release
|
||||||
|
|
||||||
To get the stable release, simply download either `cambridge-win32.zip` (32-bit) or `cambridge-windows.zip` (64-bit) in the [latest release](https://github.com/sashlilac/cambridge/releases/latest).
|
To get the stable release, simply download either `cambridge-win32.zip` (32-bit) or `cambridge-windows.zip` (64-bit) in the [latest release](https://github.com/MillaBasset/cambridge/releases/latest).
|
||||||
|
|
||||||
All assets needed are bundled with the executable.
|
All assets needed are bundled with the executable.
|
||||||
|
|
||||||
#### Bleeding edge
|
#### Bleeding edge
|
||||||
|
|
||||||
If you want the bleeding edge version, download [this](https://github.com/SashLilac/cambridge/archive/master.zip).
|
If you want the bleeding edge version, download [this](https://github.com/MillaBasset/cambridge/archive/master.zip).
|
||||||
|
|
||||||
Extract the ZIP, open a Command Prompt at the folder you extracted Cambridge to, then run this command:
|
Extract the ZIP, open a Command Prompt at the folder you extracted Cambridge to, then run this command:
|
||||||
|
|
||||||
@@ -66,7 +66,7 @@ You can download the .love file in the latest release, and run it with:
|
|||||||
|
|
||||||
Clone the repository in git:
|
Clone the repository in git:
|
||||||
|
|
||||||
git clone https://github.com/SashLilac/cambridge
|
git clone https://github.com/MillaBasset/cambridge
|
||||||
|
|
||||||
Alternatively, download the source code ZIP in the latest release.
|
Alternatively, download the source code ZIP in the latest release.
|
||||||
|
|
||||||
@@ -78,7 +78,7 @@ It should run automatically!
|
|||||||
|
|
||||||
## Installing modpacks
|
## Installing modpacks
|
||||||
|
|
||||||
For instructions on how to install modpacks, go to [this](https://github.com/SashLilac/cambridge-modpack) mod pack to get a taste of the mod potential.
|
For instructions on how to install modpacks, go to [this](https://github.com/MillaBasset/cambridge-modpack) mod pack to get a taste of the mod potential.
|
||||||
|
|
||||||
License
|
License
|
||||||
-------
|
-------
|
||||||
|
|||||||
@@ -1,8 +1,17 @@
|
|||||||
local binser = require 'libs.binser'
|
local binser = require 'libs.binser'
|
||||||
|
|
||||||
function loadSave()
|
function loadSave()
|
||||||
config = loadFromFile('config.sav')
|
local info = love.filesystem.getInfo(love.filesystem.getSaveDirectory())
|
||||||
highscores = loadFromFile('highscores.sav')
|
if not info or info.type ~= "directory" then
|
||||||
|
love.filesystem.remove(love.filesystem.getSaveDirectory())
|
||||||
|
love.filesystem.createDirectory(love.filesystem.getSaveDirectory())
|
||||||
|
end
|
||||||
|
config = loadFromFile(
|
||||||
|
love.filesystem.getSaveDirectory() .. '/config.sav'
|
||||||
|
)
|
||||||
|
highscores = loadFromFile(
|
||||||
|
love.filesystem.getSaveDirectory() .. '/highscores.sav'
|
||||||
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
function loadFromFile(filename)
|
function loadFromFile(filename)
|
||||||
@@ -40,9 +49,13 @@ function initConfig()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function saveConfig()
|
function saveConfig()
|
||||||
binser.writeFile('config.sav', config)
|
binser.writeFile(
|
||||||
|
love.filesystem.getSaveDirectory() .. '/config.sav', config
|
||||||
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
function saveHighscores()
|
function saveHighscores()
|
||||||
binser.writeFile('highscores.sav', highscores)
|
binser.writeFile(
|
||||||
|
love.filesystem.getSaveDirectory() .. '/highscores.sav', highscores
|
||||||
|
)
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
version = "v0.3-beta5.1"
|
version = "v0.3-beta5.2"
|
||||||
@@ -37,7 +37,7 @@ function CreditsScene:render()
|
|||||||
love.graphics.print("Project Heads", 320, 640 - self.frames / 2)
|
love.graphics.print("Project Heads", 320, 640 - self.frames / 2)
|
||||||
love.graphics.print("Other Game Developers", 320, 730 - self.frames / 2)
|
love.graphics.print("Other Game Developers", 320, 730 - self.frames / 2)
|
||||||
love.graphics.print("Special Thanks", 320, 950 - self.frames / 2)
|
love.graphics.print("Special Thanks", 320, 950 - self.frames / 2)
|
||||||
love.graphics.print("- SashLilac / TS3 / Milla", 320, math.max(1850 - self.frames / 2, 320))
|
love.graphics.print("- Milla", 320, math.max(1850 - self.frames / 2, 320))
|
||||||
|
|
||||||
love.graphics.setFont(font_3x5_2)
|
love.graphics.setFont(font_3x5_2)
|
||||||
love.graphics.print("Oshisaure\nJoe Zeng", 320, 590 - self.frames / 2)
|
love.graphics.print("Oshisaure\nJoe Zeng", 320, 590 - self.frames / 2)
|
||||||
|
|||||||
@@ -206,14 +206,14 @@ function GameMode:update(inputs, ruleset)
|
|||||||
self.piece.last_rotated = false
|
self.piece.last_rotated = false
|
||||||
self:onPieceMove(self.piece, self.grid, piece_dx)
|
self:onPieceMove(self.piece, self.grid, piece_dx)
|
||||||
end
|
end
|
||||||
if (piece_drot ~= 0) then
|
|
||||||
self.piece.last_rotated = true
|
|
||||||
self:onPieceRotate(self.piece, self.grid, piece_drot)
|
|
||||||
end
|
|
||||||
if (piece_dy ~= 0) then
|
if (piece_dy ~= 0) then
|
||||||
self.piece.last_rotated = false
|
self.piece.last_rotated = false
|
||||||
self:onPieceDrop(self.piece, self.grid, piece_dy)
|
self:onPieceDrop(self.piece, self.grid, piece_dy)
|
||||||
end
|
end
|
||||||
|
if (piece_drot ~= 0) then
|
||||||
|
self.piece.last_rotated = true
|
||||||
|
self:onPieceRotate(self.piece, self.grid, piece_drot)
|
||||||
|
end
|
||||||
|
|
||||||
if inputs["up"] == true and
|
if inputs["up"] == true and
|
||||||
self.piece:isDropBlocked(self.grid) and
|
self.piece:isDropBlocked(self.grid) and
|
||||||
@@ -242,7 +242,8 @@ function GameMode:update(inputs, ruleset)
|
|||||||
|
|
||||||
if self.piece.locked == true then
|
if self.piece.locked == true then
|
||||||
-- spin detection, immobile only for now
|
-- spin detection, immobile only for now
|
||||||
if self.immobile_spin_bonus and (
|
if self.immobile_spin_bonus and
|
||||||
|
self.piece.last_rotated and (
|
||||||
self.piece:isDropBlocked(self.grid) and
|
self.piece:isDropBlocked(self.grid) and
|
||||||
self.piece:isMoveBlocked(self.grid, { x=-1, y=0 }) and
|
self.piece:isMoveBlocked(self.grid, { x=-1, y=0 }) and
|
||||||
self.piece:isMoveBlocked(self.grid, { x=1, y=0 }) and
|
self.piece:isMoveBlocked(self.grid, { x=1, y=0 }) and
|
||||||
|
|||||||
Reference in New Issue
Block a user