Fixed the bug (I had an older verison of pico8 and the sub() function behaved differrently, thanks to @choo-t for the solution)
(The game was made for the basic shmup showcase jam following the lazydev'tutorials)
My thoughts on the game:
I followed the tutorials without a lot of changes to the game so at the start of the jam I had to choose what to do with the game I already had, I felt really inspired playing stick it to the stickman and I wanted some similar mechanics in my game, I decided to keep the wave game mode as some kind of "campaign" in which u could win the game and then add the mechanic I wanted in a new infinite game mode. I considered having just one game mode but I didn't think it would change remarkably in terms of token because for the new game I'd still have to copy most the code (I also considered starting from scratch but it seemed to much work), I struggled a little with the token limit in the last days but I guess that no matter what I would still probably have reached it.
Also a few times I lost sight of the vision and just started to add whatever came to mind in the game, I think I should have dedicated more time in the beginning into planning what power ups I wanted in the game and how they could interact with each other (e.g., the xp boost is almost useless it just makes you go faster through the game I thought it made sense when I introduced it in the game because the difficulty was time based while now is level based but still it didn’t really add much to the gameplay)
One interesting tradeoff I had is that the token limitation made me think about writing most of the code in a string and then turning it into code with a function, turning for example an array in a string and then have a function go through it and create the array or do it for function parameters, decreasing the readability of the code. (I only reached the limit toward the end so I only used it in a few arrays that I knew I would probably never modify again)
(English isn’t my first language and I’m writing this after testing and debugging the game if there are some mistakes I’m sorry and pls let me know)
If I start playing in "wave" mode, this error message appears after a few seconds.
If I select "arcade" mode I can play a bit, and it is fun. But if I shoot down all the enemies, so there are none left on the screen, the same error happens. So I think there must be a way for myen to be defined but to have its hp or type be nil.
This happened on the Web player. Sometimes people find errors appear in different places between the Web player and the standalone application.
For anyone wanting to include a screenshot like this with your bug reports, see the Pico-8 Manual on Screenshots and GIFs.
Good luck as you investigate this problem.
@dan789678264 Found your problem :
• Update your local PICO-8 to the latest version (0.2.5c at the time of writing)
• Replace one single line of code :
Line 1773, replace
It's because sub() behavior have been changed in PICO-8 0.2.5, so your game work on your itch.io because you exported the html player with version 0.2.4c, but here on the BBS, the player is always up to date.
Seem lot of people used the non-digit parameter trick on sub() (myself included), is it possible on the BBS to grep for
sub\(([^,]+),([^,]+),\D\) and replace with
$1[$2] or warn the author about the change affecting their cartridge ?
[Please log in to post a comment]