From ae733d164a7458fb90cba8e360d64d5362ed0e0d Mon Sep 17 00:00:00 2001 From: OusmBlueNinja <89956790+OusmBlueNinja@users.noreply.github.com> Date: Mon, 23 Dec 2024 22:46:16 -0600 Subject: [PATCH] Created Basic Engine This project is kind of a dead end. --- core/__init__.py | 0 core/__pycache__/__init__.cpython-311.pyc | Bin 0 -> 178 bytes .../__pycache__/input_handler.cpython-311.pyc | Bin 0 -> 1250 bytes core/__pycache__/lua_api.cpython-311.pyc | Bin 0 -> 3393 bytes core/__pycache__/renderer.cpython-311.pyc | Bin 0 -> 2944 bytes core/input_handler.py | 15 +++ core/lua_api.py | 64 +++++++++++++ core/renderer.py | 50 ++++++++++ main.py | 89 ++++++++++++++++++ scripts/game.lua | 70 ++++++++++++++ 10 files changed, 288 insertions(+) create mode 100644 core/__init__.py create mode 100644 core/__pycache__/__init__.cpython-311.pyc create mode 100644 core/__pycache__/input_handler.cpython-311.pyc create mode 100644 core/__pycache__/lua_api.cpython-311.pyc create mode 100644 core/__pycache__/renderer.cpython-311.pyc create mode 100644 core/input_handler.py create mode 100644 core/lua_api.py create mode 100644 core/renderer.py create mode 100644 main.py create mode 100644 scripts/game.lua diff --git a/core/__init__.py b/core/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/core/__pycache__/__init__.cpython-311.pyc b/core/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..5fd267bed3fba58a9442950f0349f7ca3836fde6 GIT binary patch literal 178 zcmZ3^%ge<81ShSs(n0iN5CH>>P{wCAAY(d13PUi1CZpdYt_4u2C^aTN vJ~J<~BtBlRpz;@oO>TZlX-=wL5i8JCkiEtHK;i>4BO~Jn1{hJq3={(Zdk`#l literal 0 HcmV?d00001 diff --git a/core/__pycache__/input_handler.cpython-311.pyc b/core/__pycache__/input_handler.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..186a1c5e9469b535146ba2608bfa3524be819583 GIT binary patch literal 1250 zcmah|&ubG=5T5;!G;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E3@i5r;0`dkNqhVV%rEMf)hbB&>=R z_{x-l`kUBRUx{no_zhss0_j@<6G7#yw_koXN2ID2!bd0A%{_5z>{r zduHQIt#hE>InW?t$Eff)5)_2{Zt{my4?g|J>)*d#8+xNY^ahY>z31z_=T|O=v$Kt1oG3!n^zrQ!a9V9qCfR%LP5a~Jk<;^=cH(siB_t(4oSEQZJ?gkM$3Ol)H z>bVymgpBKEr! z<&%5<|C; zJONs?KuSmsBdr-y+2pGY(hA4>lD!Rb5CX|i7P#R2A(CyM&`;!%K=pGBFD00%?sPx# literal 0 HcmV?d00001 diff --git a/core/__pycache__/renderer.cpython-311.pyc b/core/__pycache__/renderer.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b3d8856bfc72e82efa7f0273b2a8ab7df55d6814 GIT binary patch literal 2944 zcmbVO%}*Og6rbI-F_ASnrHkt@sHU0{=C?anR< zAV=bm1C=g6XeBE3kV6ms6Ku;8Xr)R~dnq?pv{IE*-<$Coo1}@_@$PTm z{O0X@Z|1$(@wW{PK?3c}`CB8O1_=2LJ6`jZgzXa`%oB}hf=PymNG=ggyiYV~StMi) zZr+9jO&A~%-xhZJ)Dp`cp3e43=*|5}d62il6@-EWE=Ng& z)*%tAAXs4U?;_~FUBp%=63DLdxiEViUc(`Ti0B6FaXOq-bvKYsn!4lY!1-+59Hy^> zf{o4;<>?1%EPlh*sU5e|x~0bZExnr>cl3C7N*y25Eys?lDNT>3C!Nuh6~BJD?{eEa zKv6wTONol6C*9ga!mtb{k(g@q@)z|eKe|%@rpe~3Ei=AZx#(*Q2aCi5q-Nl^4LW>v zs&bF3%5wiJ2vC(mMo`5G@ixmg4Ljwm6Otjf%DrWf*2=xxXq(WJmM9SGP0+*nv$lk` zpJ|nrG6F6sZ`D=>*dqhz^*>nCUSe%k?Bf;Ub0t%^=mBudQs(-G4bzN>^dK;C~Qb22||h`?d`L%U>_g`Lp#Axbh4iNDJMIy}59t5H2x%6mU}x&Gv4{ z&3U->b-bLR4zbYosYq$|vGBc1GmQ3k? zCv(A)cmj5nMDxoNvJ7FYc`=bvanK5TVntNd_9|ynw(wkgy`H_QcyK#B)0~DKDkD@E zS=E?WJvJ;>6{=KGs8EtSpX$;&L9t@N;!O{M$4G!4hDSw>)s5&*;;x}NqiztzQQa6B zb=(>ooKU&`Fm`fPnWTzQ5M)TN`3T5~P!g_aV-M>%fp4b5H1?(Kjp&v3!FC~t(L`EWEB?kI#y zEZ5+;e(mw0?Ae=ea$8t9eH6DANnvtIgC>sN5xV`%HraG%y8hM$Gux z)3*$}a;^L+6v*tc*%&+C#i`$em{V-skWgDmDt4M0j;`X_wZy)`S=CH+)+&F>{d*}b`+|oscyruWLP7LGpd&& z*=@C=CS%G){7@>aKouvYjN7_048(KZ?t>$;PPgFPqYx^M!U9F=Sh3SnAk$U=*a~d& zv<*7}n!1}XvxRJhL_I5iZepsbdQ))rIJ{)v0hlI#?IX>{ zmxgl(+X@HUibSfrB5?e?cjnUEz%PeStz3Kpq=zt}SuSa@Y~f4E45#w)^R zQ+U4r%l@ScD}jes)*IJv{&3*&?Oan&p{Xa^)bn@I&)$@FOtV_;iwOJ-5@JvMiWUk3&#*ebwu`BxO1 z{P35c46QzYdy!OwEcvhD0_ 120 then + enemy_speed = -enemy_speed + elseif enemy_x < 40 then + enemy_speed = -enemy_speed + end +end + +function draw() + -- Draw Player + spr(math.floor(player_x), math.floor(player_y), player_sprite, 11) + + -- Draw Enemy + spr(math.floor(enemy_x), math.floor(enemy_y), enemy_sprite, 9) + + -- Draw some pixels as obstacles or decorations + px(80, 72, 5) + px(81, 72, 5) + px(82, 72, 5) +end