From d214d7dc3f1a0f5b69b94a5e16b9dbba518106c5 Mon Sep 17 00:00:00 2001 From: Jaidyn Ann Date: Mon, 21 Sep 2020 08:56:05 -0500 Subject: [PATCH] Collision tweaks; new animations --- art/sprites/bat.png | Bin 898 -> 7452 bytes art/sprites/bird.png | Bin 3812 -> 17696 bytes main.lua | 80 ++++++++++++++++++++++++++++++++----------- 3 files changed, 60 insertions(+), 20 deletions(-) diff --git a/art/sprites/bat.png b/art/sprites/bat.png index f779c884c18d0f2782efc4e21e62530dac4ab2bf..c1b56a338edfddb540b2b8a01b0fbc6235326400 100644 GIT binary patch literal 7452 zcmeHMc{r49-=0uPk1SD&GEG{fF^d_@m?1l5CrgRO%smWdF*BAS*&-uF3<_x-Oqj^Vzp>-?S9?>?{dciq>0%rOfyLs60S zA`l2f)YwSR3jE&&$S}?LRoAkmF5XRxjYsC1^oDfejVA# z9!Z7_Ncj>l{(U4q=m${#%TdEYx zw6q+N`P_u?sL0cflA~5HB@$v=`>}qfU)}W)qTia%`+5+e-%Vx}Y@XK|_;?>|^r|n%6r*esE17yLMasp@RE$8cdxV zy)J3`s@)a0oJ=A-Eo!nJoy?UP++cAkzcSP6_D<)#{??MdTQBR<6V0htC|jSr7?Y13 z$UXc;qlz;cBlX&7>$3r|;4OZpG9ixlR77@-1@>La6$;wOoNn^15V>X>p`W55n??&X z$-@No+46cEWiF>_`JI;67+ql`;i2@PUqImMgV`5sw8WD$1RqF>o^n==K*)_9N1<6s zjs2*%k{+Dc*RA%JG|AH+w+26Jj0zF`EO29=^f&wWEVuL7*RGkG&R)=URmxVSXFIGs zm1=t89cN0A~}7|N=CmLZ$*wyrdNlX5)M(ILO)+8(?8MW5Gu zFa`^TTe^zgmsMpLn&H|iXjNufeJ1s>eNs*bO7HNddd45#+RrHU@4VGHdV753EwyX+ z<$?rneK9a~GOARc)j4rJwtYYf_fAhxMf_BX_6va}%i$poLw9Uf^a~VVgeKFdPnQw`-X3Zx2uD6M^+4elYdOyHKoM3ul-&xy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DgSN{I4moCk;6;YoYmx*QC2bk#7(CA5<|>Se-C&0g0u;%<|obSGM{+SdvX^sK`&X_&gDVx3+Y9>N;_(Rv>Ng6S7!>sKa(j;3By{{ z@$S*Zxl7`RfR_b=H((IHoH+hi>i6YokVMOu;YSyct|%F;YubA;RBU@6%oc(Cv=r-* zX7#f+`UDsGrV75Qc@QV7Qu66GYla~xU&HYIB@%REh%Rf+E0gb>R9DpgsZd@~J35US z>=tjd2gaJ+!MVKU~yC9z%% z1+EL$T1GA1ts2(}pb(Khk1ZYyoAF5m_uqpZC*@Zd>(c=&5O8whf<%mXsr?5Cu#!IA zNdY^TS$nhtX`7VXD;UR2dv_%$4!oXqx4GLzj(rp}r8lLsb5$r{XX;e>`pFTNf6mBB z?x@7#YL*~6nN#@fdv~*e5wF4|)Kkv%7c#e%&9NyleSJ5KH8n(LP{t+{vQh_CRBzlk$#FfJOaGRNHK=lm4-&+of*BdN1EQ&9;$48CT+?S zRN%EJ2hO!>U2sglsUyenDF#!avHE;&vwB?>Z}D#~c=Kdba-`c_ifZa)jXY^>4y}`Q`Wl_D&C=3D(N};(%bwli!=C_6SY&ePP<_c#hG8VaJVK4RLJK03F^=VUFGj7L zYsvHeIIzG^RhnM0T{R!r8$PU^Bn+ckVh&D{zn|~8a4wn02B;B%p$dOLF^_H%faGvm8qjy#$Gr*a&*C{_2bD2)jM+vqLT%h~ZYtp5zeP|r-a3ga5}KTJP~MF0Q* diff --git a/main.lua b/main.lua index 6c734fb..c4e211d 100644 --- a/main.lua +++ b/main.lua @@ -24,7 +24,7 @@ function love.load () dieParticle = nil love.graphics.setDefaultFilter("nearest", "nearest", 0) bg = love.graphics.newImage("art/bg/sky.png") - a_ttf = love.graphics.newFont("art/font/alagard.ttf") + a_ttf = love.graphics.newFont("art/font/alagard.ttf", nil, "none") lifeText = love.graphics.newText(a_ttf, "Press Enter") waveText = love.graphics.newText(a_ttf, "") @@ -297,7 +297,9 @@ end -- drawing the flier (ofc) function Flier:draw ( ) - if ( self.flying > 0 ) then + if ( self.living == false ) then + self.actor:switch('die') + elseif ( self.flying > 0 ) then self.actor:switch('flap') self.actor:getAnimation():restart() self.flying = self.flying - 1 @@ -387,8 +389,23 @@ end function Flier:physics_dead ( dt ) -- ignore all input, fall through bottom gravity = 2 + max_vel = 300 self.y_vel = self.y_vel + gravity self.y = self.y + self.y_vel * dt + + if ( self.x_vel > 0 ) then + self.x_vel = self.x_vel - (max_vel / (turn * 3)) + elseif ( self.x_vel < 0 ) then + self.x_vel = self.x_vel + (max_vel / (turn * 3)) + end + + if ( self.x < -10 ) then + self.x = 800 + elseif ( self.x > 810 ) then + self.x = 0 + end + + self.x = self.x + self.x_vel * dt if ( self.y > 700 ) then self:killFinalize() return false @@ -398,10 +415,12 @@ function Flier:physics_dead ( dt ) end -- kill the Flier, show cool particles -function Flier:kill () +function Flier:kill ( murderer ) self.living = false - dieParticle:moveTo(self.x, self.y) - dieParticle:emit(30) + self.x_vel = murderer.x_vel + + dieParticle:moveTo( self.x, self.y ) + dieParticle:emit( 30 ) end -- run after Flier falls through screen @@ -418,21 +437,24 @@ Bat = class('Bat', Flier) function Bat:initialize () -- animations batSheet = love.graphics.newImage("art/sprites/bat.png") - flapFrames = {2,3,4,5} - idleFrames = {1} batFlapAnim = animx.newAnimation{ - img = batSheet, tileWidth = 32, frames = flapFrames + img = batSheet, tileWidth = 32, frames = {2,3,4,5} }:onAnimOver( function() self.actor:switch('idle') end ) - batIdleAnim = animx.newAnimation { - img = batSheet, tileWidth = 32, frames = idleFrames + img = batSheet, tileWidth = 32, frames = {1} + } + batDieAnim = animx.newAnimation { + img = batSheet, tileWidth = 32, frames = {6} + } + batBlockAnim = animx.newAnimation { + img = batSheet, tileWidth = 32, frames = {7} } batActor = animx.newActor { - ['idle'] = batIdleAnim, ['flap'] = batFlapAnim + ['idle'] = batIdleAnim, ['flap'] = batFlapAnim, ['die'] = batDieAnim }:switch('idle') Flier.initialize( self, 50, 100, batActor ) @@ -491,8 +513,10 @@ function Bird:initialize ( x, y ) -- animations birdSheet = love.graphics.newImage("art/sprites/bird.png") - flapFrames = { {2,3,4,5}, {7,8,9,10}, {12,13,14,15} } - idleFrames = { {1}, {6}, {11} } + flapFrames = { {2,3,4,5}, {9,10,11,12}, {16,17,18,19} } + idleFrames = { {1}, {8}, {15} } + dieFrames = { {6}, {13}, {20} } + blockFrames = { {7}, {14}, {21} } birdFlapAnim = animx.newAnimation{ img = birdSheet, tileWidth = 32, tileHeight = 32, frames = flapFrames[self.species] @@ -504,8 +528,17 @@ function Bird:initialize ( x, y ) img = birdSheet, tileWidth = 32, tileHeight = 32, frames = idleFrames[self.species] } + birdDieAnim = animx.newAnimation { + img = birdSheet, tileWidth = 32, tileHeight = 32, frames = dieFrames[self.species] + } + + birdBlockAnim = animx.newAnimation { + img = birdSheet, tileWidth = 32, tileHeight = 32, frames = blockFrames[self.species] + } + birdActor = animx.newActor { - ['idle'] = birdIdleAnim, ['flap'] = birdFlapAnim + ['idle'] = birdIdleAnim, ['flap'] = birdFlapAnim, ['die'] = birdDieAnim, + ['block'] = birdBlockAnim }:switch('idle') self.actor = birdActor @@ -594,11 +627,11 @@ end -- assuming a and b are colliding, act accordingly -- aka, bounce-back or kill one function judgeCollision ( a, b ) - if ( a.y < b.y - 5 and a.living ) then - b:kill() - elseif ( a.y > b.y + 5 and b.living ) then - a:kill() - else + if ( a.y < b.y - 9 and ( a.living or a.class() == "Bat" ) ) then + b:kill( a ) + elseif ( a.y > b.y + 9 and ( b.living or a.class() == "Bat" ) ) then + a:kill( b ) + elseif ( a.living and b.living ) then a.x_vel = a.x_vel * -1 b.x_vel = b.x_vel * -1 end @@ -611,7 +644,14 @@ end -------------------------------------------------------------------------------- -- return whether or not two objects are colliding/overlapping function colliding ( a, b ) - if ( inRange(a.x, b.x - 16, b.x + 16) and inRange(a.y, b.y - 16, b.y + 16) ) then +-- min_b_y = -16; max_b_y = 16 +-- min_b_x = -16; max_b_x = 16 +-- if ( b.direction == right ) then +-- min_b_x = min_b_x + 16 +-- max_b_x = max_b_x + 16 +-- end + + if ( inRange(a.x, b.x - 16, b.x + 16) and inRange(a.y, b.y + -16, b.y + 16) ) then return true else return false