From 71b3eafbe4be236c06b06116b8dd761fb0628210 Mon Sep 17 00:00:00 2001 From: Noah Petherbridge Date: Fri, 18 Sep 2020 22:35:43 -0700 Subject: [PATCH] Add Player Character Sprites * Added initial walking sprites for the player character, "Boy." * Player doodad filename and title screen level are now configurable in the balance/numbers.go package. --- dev-assets/doodads/boy/boy.js | 37 ++++++++++++++++++++++++ dev-assets/doodads/boy/stand-left.png | Bin 0 -> 1388 bytes dev-assets/doodads/boy/stand-right.png | Bin 0 -> 1382 bytes dev-assets/doodads/boy/walk-left-1.png | Bin 0 -> 1370 bytes dev-assets/doodads/boy/walk-left-2.png | Bin 0 -> 1376 bytes dev-assets/doodads/boy/walk-left-3.png | Bin 0 -> 1389 bytes dev-assets/doodads/boy/walk-right-1.png | Bin 0 -> 1358 bytes dev-assets/doodads/boy/walk-right-2.png | Bin 0 -> 1365 bytes dev-assets/doodads/boy/walk-right-3.png | Bin 0 -> 1391 bytes dev-assets/doodads/boy/walk-right.gif | Bin 0 -> 3417 bytes dev-assets/doodads/build.sh | 15 ++++++++++ pkg/balance/numbers.go | 6 ++++ pkg/main_scene.go | 2 +- pkg/play_scene.go | 2 +- 14 files changed, 60 insertions(+), 2 deletions(-) create mode 100644 dev-assets/doodads/boy/boy.js create mode 100644 dev-assets/doodads/boy/stand-left.png create mode 100644 dev-assets/doodads/boy/stand-right.png create mode 100644 dev-assets/doodads/boy/walk-left-1.png create mode 100644 dev-assets/doodads/boy/walk-left-2.png create mode 100644 dev-assets/doodads/boy/walk-left-3.png create mode 100644 dev-assets/doodads/boy/walk-right-1.png create mode 100644 dev-assets/doodads/boy/walk-right-2.png create mode 100644 dev-assets/doodads/boy/walk-right-3.png create mode 100644 dev-assets/doodads/boy/walk-right.gif diff --git a/dev-assets/doodads/boy/boy.js b/dev-assets/doodads/boy/boy.js new file mode 100644 index 0000000..9d17f5c --- /dev/null +++ b/dev-assets/doodads/boy/boy.js @@ -0,0 +1,37 @@ +function main() { + var playerSpeed = 12; + var gravity = 4; + var Vx = Vy = 0; + + var animating = false; + var animStart = animEnd = 0; + var animFrame = animStart; + + Self.SetMobile(true); + Self.SetGravity(true); + Self.SetHitbox(0, 0, 29, 52); + Self.AddAnimation("walk-left", 200, ["stand-left", "walk-left-1", "walk-left-2", "walk-left-3", "walk-left-2", "walk-left-1"]); + Self.AddAnimation("walk-right", 200, ["stand-right", "walk-right-1", "walk-right-2", "walk-right-3", "walk-right-2", "walk-right-1"]); + + Events.OnKeypress(function(ev) { + Vx = 0; + Vy = 0; + + if (ev.Right) { + if (!Self.IsAnimating()) { + Self.PlayAnimation("walk-right", null); + } + Vx = playerSpeed; + } else if (ev.Left) { + if (!Self.IsAnimating()) { + Self.PlayAnimation("walk-left", null); + } + Vx = -playerSpeed; + } else { + Self.StopAnimation(); + animating = false; + } + + // Self.SetVelocity(Point(Vx, Vy)); + }) +} diff --git a/dev-assets/doodads/boy/stand-left.png b/dev-assets/doodads/boy/stand-left.png new file mode 100644 index 0000000000000000000000000000000000000000..3ce4be7ed74c142826a640ba0eebbeec800a90b4 GIT binary patch literal 1388 zcmV-y1(W)TP)EX>4Tx04R}tkv&MmKpe$iQ?)7;2Rn#3WT;LSL`5963Pq?8YK2xEOfLO`CJjl7 zi=*ILaPVWX>fqw6tAnc`2!4P#IXWr2NQwVT3N2zhIPS;0dyl(!fKV?p&FUBjG~G5+ ziMW`_u8N^o^k4u%bU~DvWz0!Z629Z>9s$1I#dwzgxj#prnzI-X5Q%4*VcNtS#M7I$ z!FiuJ!ius=d`>)O(glehxvqHp#<}3Kz%wIeIyFxmAr=d5th6yJni}yGaa7fG$`>*o ztDLtuYvn3y-jlyDoYPm9xlVH!2`pj>5=1DdqJ%PR#Aww?v5=zuxQ~Cx^-JVZ$W;O( z#{w$QAiI9>Klt6Pm7kpOlEQJI^TlyKMu5;R(5N}i_p#$NPJrMuaHY5Wl{zr7NT;3U1Cs<00006VoOIv0RI600RN!9r;`8x010qNS#tmY z3ljhU3ljkVnw%H_000McNlirueSad^gZEa<4bO1wgWnpw> zWFU8GbZ8()Nlj2!fese{00TrxL_t(o!|j(bNLxV|$N%@}-qC(u!0$5pBf2j@{6^MjVKnDf@ z>MuhnB%JW!S&E+b`Xl4bvx+_l4-^0+b;m?H<$D%EX*CzR4k`m7yaK#o7UsOykERBz ziU5T00Pc!i$47u+>}`7PknWhp}Hz~`z%Hl%2 zWxB>$I3_*yYD|G5BCxUNr=u#k00W0$PhNvcORj^}5-sFypDSdli~z94<5b(lUi>(2><$v`!V+{Bk<^i~Q#4ZfrgLkHk{u??{A86-6t%Yl z!523gAj!l;ND#|tX6RN`w-T7MOa24v;gbX)_*Jq-LMUKXi6FxY6+%HY$~g)Ewe~+M zY8vGntt>8R*A@->%72(CwsN8aFrA(93R>aG$MQQJ5ojWXzT zb_$)tE(&=Y=|K+wkhL-zRoOOb8wT7_+c+XWk57G8g1eqHr3#1K8S3IG4`)rmKr*a5}^u;YoOXq1+v!7# literal 0 HcmV?d00001 diff --git a/dev-assets/doodads/boy/stand-right.png b/dev-assets/doodads/boy/stand-right.png new file mode 100644 index 0000000000000000000000000000000000000000..66a85d15b3d5a7c79c34c5b1d6d0884841a7b8e0 GIT binary patch literal 1382 zcmV-s1)2JZP)EX>4Tx04R}tkv&MmKpe$iQ?)7;2Rn#3WT;LSL`5963Pq?8YK2xEOfLO`CJjl7 zi=*ILaPVWX>fqw6tAnc`2!4P#IXWr2NQwVT3N2zhIPS;0dyl(!fKV?p&FUBjG~G5+ ziMW`_u8N^o^k4u%bU~DvWz0!Z629Z>9s$1I#dwzgxj#prnzI-X5Q%4*VcNtS#M7I$ z!FiuJ!ius=d`>)O(glehxvqHp#<}3Kz%wIeIyFxmAr=d5th6yJni}yGaa7fG$`>*o ztDLtuYvn3y-jlyDoYPm9xlVH!2`pj>5=1DdqJ%PR#Aww?v5=zuxQ~Cx^-JVZ$W;O( z#{w$QAiI9>Klt6Pm7kpOlEQJI^TlyKMu5;R(5N}i_p#$NPJrMuaHY5Wl{zr7NT;3U1C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.png new file mode 100644 index 0000000000000000000000000000000000000000..733624d2e010eae7e503b2cc724e3f90169c7749 GIT binary patch literal 1370 zcmV-g1*Q6lP)EX>4Tx04R}tkv&MmKpe$iQ?)7;2Rn#3WT;LSL`5963Pq?8YK2xEOfLO`CJjl7 zi=*ILaPVWX>fqw6tAnc`2!4P#IXWr2NQwVT3N2zhIPS;0dyl(!fKV?p&FUBjG~G5+ ziMW`_u8N^o^k4u%bU~DvWz0!Z629Z>9s$1I#dwzgxj#prnzI-X5Q%4*VcNtS#M7I$ z!FiuJ!ius=d`>)O(glehxvqHp#<}3Kz%wIeIyFxmAr=d5th6yJni}yGaa7fG$`>*o ztDLtuYvn3y-jlyDoYPm9xlVH!2`pj>5=1DdqJ%PR#Aww?v5=zuxQ~Cx^-JVZ$W;O( z#{w$QAiI9>Klt6Pm7kpOlEQJI^TlyKMu5;R(5N}i_p#$NPJrMuaHY5Wl{zr7NT;3U1Cs<00006VoOIv0RI600RN!9r;`8x010qNS#tmY z3ljhU3ljkVnw%H_000McNlirueSad^gZEa<4bO1wgWnpw> zWFU8GbZ8()Nlj2!fese{00S~fL_t(o!|j+cXd5vUhJPKIvUseMC4oTp95n?K@L~$- z5K^!g(?Y==x1<@`rL+{1-B3uDG#nfkCH}^*;UY>G{dP|2A$!Yu24AojGR^5L<{jEr8v<*(=pSZGni90y;1NP=9Kq zkaWVEhgo`gbv-fOzNqShh(J?dlUE8U_t0Dm* zA^_VlGcJ2}4dSuR^P_9RcFyl!bW7s4yEhT=5ybXAP*Hjjgh6gE2k{f&GFhoWmKL+A z#s`rdOI;U4ASO9P0uhS|esSI%VxNEBUJmpPfB$m(k;Mc6w1141+1e~&YqJy?WBs+e z>)6^XMKG*CGe#taXJ*XPMv0mz`{B4NkB=#a(L0RXq0E@Yoh|@ibkYO>eEWG88xLV4 zrEnaeT?g>sk#UTAsuu;X21+UB@4o;5TZg0wHH>cE`hrkUkkwNg&DO=g^j zLp407F0ib? zJ*Ou_tfn;8@SF!^?{Io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2N7n_V((#_W)dFQ*AyLa#1 zdnXCu1^v1 zoPkW(PJt{XJk0j@TLBzv(Kr>vJLXkj{`H5TSo9>5p?A5`=+s1MIl zG`J=@C%4Cs9xHM1{UE3i#i9&)I>KwBbK-}RG^ApoFmr5n$3I`+;q#Xn zWq%?NLFOJD8Yt0j2K)0BZ2ziS1Mt^G&n0MsB46=>c_7TEY1Ngo(mH2s1Zy|p{jrfu zR3%@*mxFN zc>4~?UgP*hKhQ4&i2o`NnLBdzHKomtS)WK?{L_O-2;fdSrag!t6~t}cohwmagU!@9 z+A7FKzRexAe-{`j(K#75D9Z&J4bgLnFaP<&n1o346W^6kVGKFS)sL;#WLsrcGCa= zTHC$Q0?~pPU6i)=vU0^%Gg`eu_q9vKP0a6`;U4r7hnPbdmpIhEHZcWYLFaH=s54HA zrH0sq2nFDSGXSARhz$st0t6WL4+g_SsDe0#0P*Hj4G0wgshOrj2Y}9@94ifxed5Qx zJ>Pl1-?y%SObI$QH8tjxK={_{z=qX?F2KJzZI5n(vPU;gI%u3CHtj`!0fJ72MR5NA QGynhq07*qoM6N<$f~W9g-2eap literal 0 HcmV?d00001 diff --git a/dev-assets/doodads/boy/walk-right-2.png b/dev-assets/doodads/boy/walk-right-2.png new file mode 100644 index 0000000000000000000000000000000000000000..2aac09e32e931d4fb3c1a1bf9f13df5b218ec351 GIT binary patch literal 1365 zcmV-b1*-aqP)EX>4Tx04R}tkv&MmKpe$iQ?)7;2Rn#3WT;LSL`5963Pq?8YK2xEOfLO`CJjl7 zi=*ILaPVWX>fqw6tAnc`2!4P#IXWr2NQwVT3N2zhIPS;0dyl(!fKV?p&FUBjG~G5+ ziMW`_u8N^o^k4u%bU~DvWz0!Z629Z>9s$1I#dwzgxj#prnzI-X5Q%4*VcNtS#M7I$ z!FiuJ!ius=d`>)O(glehxvqHp#<}3Kz%wIeIyFxmAr=d5th6yJni}yGaa7fG$`>*o ztDLtuYvn3y-jlyDoYPm9xlVH!2`pj>5=1DdqJ%PR#Aww?v5=zuxQ~Cx^-JVZ$W;O( z#{w$QAiI9>Klt6Pm7kpOlEQJI^TlyKMu5;R(5N}i_p#$NPJrMuaHY5Wl{zr7NT;3U1Cs<00006VoOIv0RI600RN!9r;`8x010qNS#tmY z3ljhU3ljkVnw%H_000McNlirueSad^gZEa<4bO1wgWnpw> zWFU8GbZ8()Nlj2!fese{00S*aL_t(o!|j;QYZ^fm$G^LH3IUHMUK&X92Plyg3A6_( z=s_%)OR&AHN7Gv`6+EQWLVJvtLWDx4mkPaUNpnb{gp`2&1Cm0#SUoO?y*WMTth3|( znBAStDFchU&voBtzwgbwHv;!#Hk3fWj%md8o>9})M>X-qjY&4h558`Wh`E{s>ha;vD&(1BJ`cKRt0CN>sfc{{(1jH($gbC0e3{8sg z*AyfoI|NQ4VPP7-76Pc!yfG^9Z_KJd?Uh}S<#2?Q2X;WL5|N;94`2y^b;{c*)cdDv z#5yM~&ll$p9}97?>w#4w@=0kmJM44f^4tvNupkxkMZ-xUUqoVO5B>r%Y!K%_}p|a65InGqu#`)QsnLV9K0svN?yfWGO z5qOHGQ%R&#NlZ@bAcWwNdWcN5Z33Wnd8K@=!n@aX+gm25b<17Krh*O#awWr=0YYsahjy?pbf3D^f^}Lj4%(9O zs^m&odG^Ql?L`&v-fh!Xk5#49!sOGYYbdmXeOz4ikg2wn;4ME7GFQk7CBltkfM@%CoyT~Rv6eWDFsB$1` z{X#hrYg(0>LIFs{jp$SAf9( zS+Ne;^D)MrW{00CN@PFVmlDxv)O4-uy2+;NdZ<;D@Bl6#%AHP88?}gRB}f1!M?e1o XSvY+44q!rH00000NkvXXu0mjf*@b7f literal 0 HcmV?d00001 diff --git a/dev-assets/doodads/boy/walk-right-3.png b/dev-assets/doodads/boy/walk-right-3.png new file mode 100644 index 0000000000000000000000000000000000000000..0bd2b72123eb94e700612e050a9384beccbfa2e6 GIT binary patch literal 1391 zcmV-#1(5oQP)EX>4Tx04R}tkv&MmKpe$iQ?)7;2Rn#3WT;LSL`5963Pq?8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=7PNb@k~Jw(iy}VKgecn=TW_q{}!; zh7mK4lK&S7zzT!{5V0MpZazxH-`tNteGIdq?qd0lv}@~HD;Po4~W z)LW(TQJW`+E#yAvER*h^(I}Z)(?O8$XsY*%{Pjw$urA|SOd}^7bRN56omT^H($ao5 e#1`z)sT%d-?%JF7uWoF#6K{HR{)i&MqQ3yfZly~A literal 0 HcmV?d00001 diff --git a/dev-assets/doodads/build.sh b/dev-assets/doodads/build.sh index f7afb2b..784a47c 100755 --- a/dev-assets/doodads/build.sh +++ b/dev-assets/doodads/build.sh @@ -8,6 +8,19 @@ fi mkdir -p ../../assets/doodads +boy() { + cd boy/ + + doodad convert -t "Boy" stand-right.png stand-left.png \ + walk-right-1.png walk-right-2.png walk-right-3.png \ + walk-left-1.png walk-left-2.png walk-left-3.png \ + boy.doodad + doodad install-script boy.js boy.doodad + + cp *.doodad ../../../assets/doodads/ + cd .. +} + buttons() { cd buttons/ @@ -123,6 +136,7 @@ onoff() { cd .. } +boy buttons switches doors @@ -132,3 +146,4 @@ objects onoff doodad edit-doodad -quiet -lock -author "Noah" ../../assets/doodads/*.doodad doodad edit-doodad -hide ../../assets/doodads/azu-blu.doodad +doodad edit-doodad -hide ../../assets/doodads/boy.doodad diff --git a/pkg/balance/numbers.go b/pkg/balance/numbers.go index 0d23bd4..d2221b7 100644 --- a/pkg/balance/numbers.go +++ b/pkg/balance/numbers.go @@ -43,6 +43,12 @@ var ( } DefaultEraserBrushSize = 8 MaxEraserBrushSize = 32 // the bigger, the slower + + // Default player character doodad in Play Mode. + PlayerCharacterDoodad = "boy.doodad" + + // Level name for the title screen. + DemoLevelName = "example 1.level" ) // Edit Mode Values diff --git a/pkg/main_scene.go b/pkg/main_scene.go index 71b780c..0310a74 100644 --- a/pkg/main_scene.go +++ b/pkg/main_scene.go @@ -171,7 +171,7 @@ func (s *MainScene) SetupDemoLevel(d *Doodle) error { s.canvas.SetScriptSupervisor(s.scripting) // Title screen level to load. - if lvl, err := level.LoadFile("example1.level"); err == nil { + if lvl, err := level.LoadFile(balance.DemoLevelName); err == nil { s.canvas.LoadLevel(d.Engine, lvl) s.canvas.InstallActors(lvl.Actors) diff --git a/pkg/play_scene.go b/pkg/play_scene.go index d3928e1..1c4a5bc 100644 --- a/pkg/play_scene.go +++ b/pkg/play_scene.go @@ -193,7 +193,7 @@ func (s *PlayScene) Setup(d *Doodle) error { // setupPlayer creates and configures the Player Character in the level. func (s *PlayScene) setupPlayer() { // Load in the player character. - player, err := doodads.LoadFile("azu-blu.doodad") + player, err := doodads.LoadFile(balance.PlayerCharacterDoodad) if err != nil { log.Error("PlayScene.Setup: failed to load player doodad: %s", err) player = doodads.NewDummy(32)