IndyUK [Lexaloffle Blog Feed]https://www.lexaloffle.com/bbs/?uid=110636 Shoot-em demo <p>Hi Everyone,</p> <p>Just wanted to share a demo of something that I've been working on as part of journey of learning Pico 8. I've drawn so much inspiration from popular shooters, especially Xenon 2 on the Amiga. </p> <p>There's plenty still left to do but I don't know if this will turn into a proper game as it's somewhat unconventional how I've done things. All of the game graphical output is using custom code and interacting directly with the video memory. I'm not using any of the in-built command set - mostly using <em>memcpy</em>.</p> <p>The next part I'll be working on is enemy AI. It won't be anything spectacular, probably just plain old predefined paths but, lets see where things go.</p> <p>Anyway, hope you like the demo.</p> <p><object width="640" height="400"><param name="movie" value="https://www.youtube.com/v/4tp7QlzxwN8&hl=en&fs=1&rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="https://www.youtube.com/v/4tp7QlzxwN8&hl=en&fs=1&rel=0" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="400"></embed></object></p> https://www.lexaloffle.com/bbs/?tid=146232 https://www.lexaloffle.com/bbs/?tid=146232 Sat, 21 Dec 2024 10:40:00 UTC Need help on calling functions in tables <p>Hi everyone,</p> <p>I would like to call functions within a table from within a for loop. The type of loop I want to use is as follows;</p> <div> <div class=scrollable_with_touch style="width:100%; max-width:800px; overflow:auto; margin-bottom:12px"> <table style="width:100%" cellspacing=0 cellpadding=0> <tr><td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> <td background=/gfx/code_bg0.png> <div style="font-family : courier; color: #000000; display:absolute; padding-left:10px; padding-top:4px; padding-bottom:4px; "> <pre>for x=#enemy,1,-1 do enemy.restoreenemybg[x]() end</pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <p>No matter what combination I try, I just can't get it to work. </p> <p>FYI - The reason I'm using this type of for loop is because I need to loop in reverse. The following version doesn't allow this.</p> <div> <div class=scrollable_with_touch style="width:100%; max-width:800px; overflow:auto; margin-bottom:12px"> <table style="width:100%" cellspacing=0 cellpadding=0> <tr><td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> <td background=/gfx/code_bg0.png> <div style="font-family : courier; color: #000000; display:absolute; padding-left:10px; padding-top:4px; padding-bottom:4px; "> <pre>for e in all(enemy)</pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <p>I would really appreciate any help on this.</p> <p>Many thanks,</p> https://www.lexaloffle.com/bbs/?tid=146035 https://www.lexaloffle.com/bbs/?tid=146035 Wed, 11 Dec 2024 20:04:11 UTC