From 305a56dd29a2dbdf786ef45a03d70b93fa10cb02 Mon Sep 17 00:00:00 2001 From: Jaidyn Ann Date: Sat, 19 Sep 2020 18:43:39 -0500 Subject: [PATCH] Background; phys tweaks --- art/bg/sky.png | Bin 6362 -> 6967 bytes conf.lua | 4 ++ main.lua | 135 +++++++++++++++++++++++++++++++++++++++---------- 3 files changed, 113 insertions(+), 26 deletions(-) create mode 100644 conf.lua diff --git a/art/bg/sky.png b/art/bg/sky.png index 10c440be58192813933e4f3fb97d24a18d1e2477..5c692b6ca917b92226e76b8a94a1251a964f150f 100644 GIT binary patch literal 6967 zcmeHM`9IWewExVQktNwe34^jPL*FFpP}b}vvTrF%ObS_N;TuW}5lWUwWE*7PMuiFa zB5Pz{Gq$k~#>}1Xz4w><)BOYP{rvKLp7T8CoY(6-=e*B3&-2{U+>nD!kPQF;4r3#| zTL1uN{DSYYFfoRU;pGeh0C}KmrV9X-ICiQVlrb0eFuG+10AZ2w%*=r zGY&$JQ>of}gq9Wp`uJkYsT-b6zuo?AkZldu3&#$2IJhCsL#bl3rCWx93t)RpLH?Sn(yWJw`8B@hF zjnqNPv;z?DJ2Wro*U+Msvsk!u9&{#H5Zs)1ln>%WkipH)kaa;jme!85N;gFmD8gW` z>GODv+8C5JiN}(E0a*-yn_D+&l?=n!^KNWhL1}THbw=Gs#{;hk`@F*RMD z87b@mlj{vbEntA2{3|@JR3$-=J6%ju$=$vb$+mCswFNkw8LlDxJS%@P|CN&kRu;7$ zM#@h&Y+e0Q-&VulsdVsp;BgCc*f05I48Wpvz2XMRGO|=gDptq{axF_QHsUboM-o@#9-6p1{;6t@1dVf2tQlP_WDD@7 z-ts>y3a7baMAo|$SmzeR4qpx$X;iU2qJhAH0y?tq`F>Ik1f?ccXI3tV&-&h}gC-RV zakr`V(A5;7oE!_Y3VdyPA*{t2Lj!Q8g5Tus0q?38XqBzyS#;v`(PIg0j{L4v0>YX3 zC`efZ^p;)JgvX&%m|N$?z8j^Jf}OTL$I)NqcmA;+c1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J)JQ8{&3w-3M+F-I*|(ak68Er%6 0 ) then + self.actor:switch('flap') + self.actor:getAnimation():restart() + self.flying = self.flying - 1 + end if ( self.direction == right ) then self.actor:flipX(true) elseif (self.direction == left) then @@ -98,21 +116,19 @@ function Flier:draw ( ) self.actor:draw( self.x, self.y ) end ----------------------------------------- --- "PHYSICS" ----------------------------------------- --- "physics" being used verryyyyy lightly here - --- does basics physics work (determines velocity) for a flier +-------------------- +-- "physics" +-------------------- function Flier:physics ( dt ) self:physics_x( dt ) self:physics_y( dt ) end +-- physics on the x-axis function Flier:physics_x ( dt ) max_vel = 300 min_vel = -300 - turn = 300 + turn = 150 -- holding arrow-key if ( self.moving ) then @@ -132,14 +148,15 @@ function Flier:physics_x ( dt ) self.x = self.x + self.x_vel * dt end +-- physics on the y-axis function Flier:physics_y ( dt ) - gravity = .85 + gravity = 2 floor = 500 -- wing-flap - if ( self.flying ) then - self.y_vel = -175 - self.flying = false + if ( self.flying > 0 ) then + self.y_vel = -200 + self.flying = self.flying - 1 end -- gravity @@ -156,9 +173,14 @@ function Flier:physics_y ( dt ) self.y = self.y + self.y_vel * dt end + +---------------------------------------- +-- BAT player characters +---------------------------------------- Bat = class('Bat', Flier) -function Bat:initialize() +function Bat:initialize () + -- animations batSheet = love.graphics.newImage("art/sprites/bat.png") batFlapAnim = animx.newAnimation{ @@ -182,3 +204,64 @@ function Bat:initialize() Flier.initialize( self, 50, 100, batActor ) end + + +---------------------------------------- +-- BIRD enemy characters +---------------------------------------- +Bird = class('Bird', Flier) + +function Bird:initialize ( x, y ) + -- animations + birdSheet = love.graphics.newImage("art/sprites/bat.png") + + birdFlapAnim = animx.newAnimation{ + img = birdSheet, + tileWidth = 32, + frames = { 2, 3, 4, 5 } + }:onAnimOver( function() + player.actor:switch('idle') + end ) + + birdIdleAnim = animx.newAnimation { + img = birdSheet, + tileWidth = 32, + frames = { 1 } + } + + birdActor = animx.newActor { + ['idle'] = birdIdleAnim, + ['flap'] = birdFlapAnim + }:switch('idle') + + Flier.initialize( self, x, y, birdActor ) + self.direction=right +end + +function Bird:update ( dt ) + self:destiny() + self:physics( dt ) +end + +-- basic "ai" (determines where the bird should go) +function Bird:destiny () + self:destiny_x() + self:destiny_y() +end + +-- "ai" on x-axis +function Bird:destiny_x () + if ( self.x > 500 ) then + self.direction = left + elseif (self.x < 200) then + self.direction = right + end + self.moving = true +end + +-- "ai" on y-axis +function Bird:destiny_y () + if ( self.y > player.y and math.random(0,50) == 25 ) then + self.flying = 2 + end +end