Skip to content
This repository has been archived by the owner on May 6, 2024. It is now read-only.

Commit

Permalink
Change ball sizes to 29x29
Browse files Browse the repository at this point in the history
This is the actual sphere size used in Zuma Blitz Kroakatoa.
  • Loading branch information
ShamblesSM committed Feb 18, 2023
1 parent 3286403 commit 029faf1
Show file tree
Hide file tree
Showing 27 changed files with 45 additions and 45 deletions.
Binary file modified games/ZumaBlitzRemake/images/game/ball_1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified games/ZumaBlitzRemake/images/game/ball_2.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified games/ZumaBlitzRemake/images/game/ball_3.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified games/ZumaBlitzRemake/images/game/ball_4.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified games/ZumaBlitzRemake/images/game/ball_4_cb.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified games/ZumaBlitzRemake/images/game/ball_5.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified games/ZumaBlitzRemake/images/game/ball_5_cb.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions games/ZumaBlitzRemake/sprites/game/ball_1.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"path": "images/game/ball_1.png",
"frame_size": {
"x": 32,
"y": 32
"x": 29,
"y": 29
},
"states": [
{
Expand Down
4 changes: 2 additions & 2 deletions games/ZumaBlitzRemake/sprites/game/ball_2.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"path": "images/game/ball_2.png",
"frame_size": {
"x": 32,
"y": 32
"x": 29,
"y": 29
},
"states": [
{
Expand Down
4 changes: 2 additions & 2 deletions games/ZumaBlitzRemake/sprites/game/ball_3.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"path": "images/game/ball_3.png",
"frame_size": {
"x": 32,
"y": 32
"x": 29,
"y": 29
},
"states": [
{
Expand Down
4 changes: 2 additions & 2 deletions games/ZumaBlitzRemake/sprites/game/ball_4.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"path": "images/game/ball_4.png",
"frame_size": {
"x": 32,
"y": 32
"x": 29,
"y": 29
},
"states": [
{
Expand Down
4 changes: 2 additions & 2 deletions games/ZumaBlitzRemake/sprites/game/ball_4_cb.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"path": "images/game/ball_4_cb.png",
"frame_size": {
"x": 32,
"y": 32
"x": 29,
"y": 29
},
"states": [
{
Expand Down
4 changes: 2 additions & 2 deletions games/ZumaBlitzRemake/sprites/game/ball_5.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"path": "images/game/ball_5.png",
"frame_size": {
"x": 32,
"y": 32
"x": 29,
"y": 29
},
"states": [
{
Expand Down
4 changes: 2 additions & 2 deletions games/ZumaBlitzRemake/sprites/game/ball_5_cb.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"path": "images/game/ball_5_cb.png",
"frame_size": {
"x": 32,
"y": 32
"x": 29,
"y": 29
},
"states": [
{
Expand Down
4 changes: 2 additions & 2 deletions games/ZumaBlitzRemake/sprites/game/ball_6.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"path": "images/game/ball_6.png",
"frame_size": {
"x": 32,
"y": 32
"x": 29,
"y": 29
},
"states": [
{
Expand Down
4 changes: 2 additions & 2 deletions games/ZumaBlitzRemake/sprites/game/ball_7.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"path": "images/game/ball_7.png",
"frame_size": {
"x": 32,
"y": 32
"x": 29,
"y": 29
},
"states": [
{
Expand Down
4 changes: 2 additions & 2 deletions games/ZumaBlitzRemake/sprites/game/ball_cannon.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"path": "images/game/ball_cannon.png",
"frame_size": {
"x": 32,
"y": 32
"x": 29,
"y": 29
},
"states": [
{
Expand Down
4 changes: 2 additions & 2 deletions games/ZumaBlitzRemake/sprites/game/ball_fire.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"path": "images/game/ball_fire.png",
"frame_size": {
"x": 32,
"y": 32
"x": 29,
"y": 29
},
"states": [
{
Expand Down
4 changes: 2 additions & 2 deletions games/ZumaBlitzRemake/sprites/game/ball_lightning.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"path": "images/game/ball_lightning.png",
"frame_size": {
"x": 32,
"y": 32
"x": 29,
"y": 29
},
"states": [
{
Expand Down
4 changes: 2 additions & 2 deletions games/ZumaBlitzRemake/sprites/game/ball_overlay.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"path": "images/game/ball_overlay.png",
"frame_size": {
"x": 32,
"y": 32
"x": 29,
"y": 29
},
"states": [
{
Expand Down
4 changes: 2 additions & 2 deletions games/ZumaBlitzRemake/sprites/game/ball_shadow.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"path": "images/game/ball_shadow.png",
"frame_size": {
"x": 32,
"y": 32
"x": 29,
"y": 29
},
"states": [
{
Expand Down
4 changes: 2 additions & 2 deletions games/ZumaBlitzRemake/sprites/game/ball_wild.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"path": "images/game/ball_wild.png",
"frame_size": {
"x": 32,
"y": 32
"x": 29,
"y": 29
},
"states": [
{
Expand Down
8 changes: 4 additions & 4 deletions src/Session.lua
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ end
function Session:destroyAllSpheres(noRewards)
self:destroyFunction(
function(sphere, spherePos) return true end,
self.level.shooter.pos + Vec2(0, -32),
self.level.shooter.pos + Vec2(0, -29),
nil,
noRewards
)
Expand All @@ -202,7 +202,7 @@ end
function Session:destroyColor(color)
self:destroyFunction(
function(sphere, spherePos) return sphere.color == color end,
self.level.shooter.pos + Vec2(0, -32)
self.level.shooter.pos + Vec2(0, -29)
)
end

Expand All @@ -226,7 +226,7 @@ end
function Session:destroyVertical(x, width)
self:destroyFunction(
function(sphere, spherePos) return math.abs(x - spherePos.x) <= width / 2 end,
self.level.shooter.pos + Vec2(0, -32)
self.level.shooter.pos + Vec2(0, -29)
)
end

Expand All @@ -252,7 +252,7 @@ end
function Session:destroyVerticalColor(x, width, color)
self:destroyFunction(
function(sphere, spherePos) return math.abs(x - spherePos.x) <= width / 2 and self:colorsMatch(color, sphere.color) end,
self.level.shooter.pos + Vec2(0, -32)
self.level.shooter.pos + Vec2(0, -29)
)
end

Expand Down
6 changes: 3 additions & 3 deletions src/ShotSphere.lua
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ function ShotSphere:moveStep()

-- add if there's a sphere nearby
local nearestSphere = _Game.session:getNearestSphere(self.pos)
if nearestSphere.dist and nearestSphere.dist < 32 then
if nearestSphere.dist and nearestSphere.dist < 29 then
-- If hit sphere is fragile, destroy the fragile spheres instead of hitting.
if nearestSphere.sphere:isFragile() then
nearestSphere.sphere:matchEffectFragile()
Expand Down Expand Up @@ -142,7 +142,7 @@ function ShotSphere:moveStep()
p = self.hitSphere.sphereGroup:getSpherePos(self.hitSphere.sphereID)
else
-- the inserted ball IS at the end of the group
local o = self.hitSphere.sphereGroup:getLastSphereOffset() + 32
local o = self.hitSphere.sphereGroup:getLastSphereOffset() + 29
p = self.hitSphere.path:getPos(o)
end
-- calculate length from the current position
Expand Down Expand Up @@ -271,7 +271,7 @@ function ShotSphere:drawDebug()
local p = _PosOnScreen(Vec2(self.pos.x, i))
love.graphics.circle("fill", p.x, p.y, 2)
local nearestSphere = _Game.session:getNearestSphere(Vec2(self.pos.x, i))
if nearestSphere.dist and nearestSphere.dist < 32 then
if nearestSphere.dist and nearestSphere.dist < 29 then
love.graphics.setLineWidth(3)
local p = _PosOnScreen(nearestSphere.pos)
love.graphics.circle("line", p.x, p.y, 16 * _GetResolutionScale())
Expand Down
4 changes: 2 additions & 2 deletions src/Sphere.lua
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ end
---Recalculates the offset this Sphere has from the offset of the Sphere Group it belongs to.
function Sphere:updateOffset()
-- calculate the offset
self.offset = self.prevSphere and self.prevSphere.offset + 32 * self.size or 0
self.offset = self.prevSphere and self.prevSphere.offset + 29 * self.size or 0
end


Expand Down Expand Up @@ -573,7 +573,7 @@ end
---Returns `true` if this sphere has not escaped the spawn point.
---@return boolean
function Sphere:isOffscreen()
return self:getOffset() < 32
return self:getOffset() < 29
end


Expand Down
2 changes: 1 addition & 1 deletion src/SphereChain.lua
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ function SphereChain:isPushingFrontTrain()
if prevChain and not prevChain.delQueue then
-- Check whether this sphere chain collides with a front one. If so, return true.
local dist = prevChain:getLastSphereGroup():getSphereOffset(1) - self.sphereGroups[1]:getLastSphereOffset()
return dist <= 32
return dist <= 29
end
end

Expand Down
10 changes: 5 additions & 5 deletions src/SphereGroup.lua
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ function SphereGroup:addSphere(color, pos, time, sphereEntity, position, effects
end
-- if it's a first sphere in the group, lower the offset
if position == 1 then
self.offset = self.offset - 32
self.offset = self.offset - 29
self:updateSphereOffsets()
end
sphere:updateOffset()
Expand All @@ -250,7 +250,7 @@ function SphereGroup:destroySphere(position, crushed)
if position == 1 then
self.spheres[position]:delete(crushed)
table.remove(self.spheres, position)
self.offset = self.offset + 32
self.offset = self.offset + 29
self:updateSphereOffsets()
self:checkUnfinishedDestructionAtSpawn()
elseif position == #self.spheres then
Expand Down Expand Up @@ -285,7 +285,7 @@ function SphereGroup:destroySpheres(position1, position2)
self.spheres[1]:delete()
table.remove(self.spheres, 1)
end
self.offset = self.offset + position2 * 32
self.offset = self.offset + position2 * 29
self:updateSphereOffsets()
self:checkUnfinishedDestructionAtSpawn()
elseif position2 == #self.spheres then -- or maybe on the end?
Expand Down Expand Up @@ -1161,7 +1161,7 @@ end


function SphereGroup:getBackPos()
return self:getSphereOffset(1) - 32 * self.spheres[1].size + 16
return self:getSphereOffset(1) - 29 * self.spheres[1].size + 16
end


Expand Down Expand Up @@ -1347,7 +1347,7 @@ function SphereGroup:deserialize(t)
self.spheres[i - 1].nextSphere = s
end
table.insert(self.spheres, s)
offset = offset + 32 * s.size
offset = offset + 29 * s.size
end
self.matchCheck = t.matchCheck
end
Expand Down

0 comments on commit 029faf1

Please sign in to comment.