![]() |
|
Tiny Space Invaders - Printable Version +- QB64 Phoenix Edition (https://qb64phoenix.com/forum) +-- Forum: QB64 Rising (https://qb64phoenix.com/forum/forumdisplay.php?fid=1) +--- Forum: Code and Stuff (https://qb64phoenix.com/forum/forumdisplay.php?fid=3) +---- Forum: Programs (https://qb64phoenix.com/forum/forumdisplay.php?fid=7) +---- Thread: Tiny Space Invaders (/showthread.php?tid=3926) Pages:
1
2
|
Tiny Space Invaders - bplus - 09-09-2025 Code: (Select All) _Title "b+ Space Invaders" ' mod of one found at LBIt kinda works might be simplified a bit... Anti-Unseen Machine style no libraries and no special directories LOL! RE: Tiny Space Invaders - bplus - 09-09-2025 Dang it! Once again I try some simple code in QBJS and no... I thought latest QBJS updates removed need to DIM everything before using? RE: Tiny Space Invaders - Pete - 09-09-2025 +1. I would have rated it +2, but for some reason you didn't code it in SCREEN 0. You could have... You should have. Pete RE: Tiny Space Invaders - bplus - 09-09-2025 Right again! maybe you'd like to fix it
RE: Tiny Space Invaders - dbox - 09-09-2025 (09-09-2025, 05:32 PM)bplus Wrote: I thought latest QBJS updates removed need to DIM everything before using? That is correct, the latest version doesn't require you to DIM your variables. However, you did find a bug with the Mid$ statement, which was just added in the last release. It was not correctly parsing the code when arrays were being passed in as arguments. I've made a fix to the dev server which you can try out here: Tiny Invaders (QBJS Dev Server) (If you don't immediately see the fixed version you might need to refresh your browser.) I'll include the fix in a patch release that I plan to put out soon. RE: Tiny Space Invaders - Unseen Machine - 09-09-2025 Quote:It kinda works might be simplified a bit... Anti-Unseen Machine style no libraries and no special directories LOL!I used to code everything, over and over and over again, then I learnt about libraries and now you all have to suffer! I assume QbJS is Java script? Not a language ive ever tried...it'lll surely be a major plus though as its a major language.John RE: Tiny Space Invaders - dbox - 09-09-2025 (09-09-2025, 10:21 PM)Unseen Machine Wrote: I assume QbJS is Java script? Not a language ive ever tried...it'lll surely be a major plus though as it’s a major language. QBJS is essentially just QBasic that can run in the browser. QB64 compiles to C. QBJS compiles to Javascript. https://github.com/boxgaming/qbjs/wiki/QBasic-Language-Support RE: Tiny Space Invaders - bplus - 09-09-2025 Ok your link works @dbox Yeah @Unseen Machine give it a try maybe start with something simple normal QB64 working code, paste into left panel https://qbjs.org the triangle button is the "play" button for a run, it turns to square to stop. The rectangle with up arrow is for sharing code say on a forum like this. eg copy and paste right into editor here. https://boxgaming.github.io/qbjs/?code=X1RpdGxlICJiKyBTcGFjZSBJbnZhZGVycyIgJyBtb2Qgb2Ygb25lIGZvdW5kIGF0IExCClNjcmVlbiBfTmV3SW1hZ2UoMjU2LCAzMjDEBSkgJyAzMiB4IDIwIGNoYXJzCl/GME1vdmUgNTAwLCAxNTAKRG8KICAgIFJlRGltIEEkKDQpxRBGb3IgaSA9IDAgVG8gNMUTxAFBJChpKSA9ICJBIM4C5ACmbGVuID0gMTYgIHNvIG1ha2UgZmllbGTkAIZ3aWRlICAwIDMxxUtOZXh0xQlzecQyOSAnc2hpcCB5xhR4xBQ0xxR4xRPECmlzIDHmAMrGT8RleCBzdGFydHPkARFzeCArIDEsIG15xFctIDHFS21hxE/HeMUMMCAnbGVmdOQBUWFsaWVuIGhvYXJkxiDkAI8wICd0b3AgziTMJWTERsZRYsQxYXkgKyA2xhDEG2HkAIlJbnQoUm5kICogMTbmAVNtxCwtxjjnAXbEAUNscyAnZHJhdyBldmVyeXRoaW5nyR3uAYcgJ+YBUW9mIEEncyDxAL/IAV9QcmludFN0cmluZyAoYXggKiA4LCAo5QCoaSnmAJMs5gHMyTjpAZPSQWLHQWJ5yDsibyLJLElm5ADaPuUApGjkAo7NPG3HPG3KPCrKPM4sc8csc8osL0lcIiAndGhl5gIDLyBjYW5ub27/ASD/ASDkALNpICvmAe5teeUAt80gyFpq5AHoxFpMZW4o5QEv6gEwz1DlAfRq5QJ2PeQCl0FuZCBNaWQkxjcsIGosIDHmAzkixXDWHSAiOu0CJ8wB7QGhxAFFbmQgSWb2AcFJZiAo5AG4Pj3kAwTkAI1ieCA8xQ0rIDIpxhLEaXN5KSBPcucCHDTlA40p5gChQmVlcDogRXhpdCBEbyAnIGJsZXcgdXDmAYkgICcgZGlkIGJvbWIgdOQD6291dOcBnSBvcuYBdCByZWFjaCBncuQEs+kAm+UDhOUBL+QDSSd1cGRhdGXvAaXmAVE85wJTyRfFP+kDcjE66AOLOsZVMMkpRWxzZcZEK+QEkD4gMzHFSiAncnVuIGl0IGJhY2sgb24gc2FtZSBsaW5lIHRvIHNsb3cgZG93biDkAnFjcnVzaM57xW4tyG8xNcpw7gGL5QFaYuUApCAn5gKF5AEpySBJZsQePuQE+eYAlm5ld84iyUblAOrKacUY+wRk8wCN8AOg5QJgbeYFIegBfmJ1bGxldOQGaWlzc2lsZc89POQAh8o9LTHkAf5lYWN0aXbEPmFmdGVyIHBhc3NlZCBob3JkykBXaGlsZSBfTW91c2VJbnB1dDogV2XrAg3lBezkAMcoxiRYIC0gOCkgLyA46gDQayTFJEtleSTJFElmxhciIOYDT/AD3+4AtcRl5gYe5wNf5wYgJyBmaXJl6AK3IGlmIGxhc3ToAQUgaGFz5ADWdOUCD+4Coe8BZF9EaXNwbGHmBsDFEUxpbWl05wG5TG9vcMUJU2xlZXAKxA8gVW50aWwgX0tleURvd24oMjcpCgonIDIwMjAtMTEtMTMgdGlueSBz5QgKaecICiBiK8oiNMQwPdgBIEluc3RydWN0aW9uc9QnxD5t5AFy5AL5beQIEuQD2C/nAQvlBvxhbmQgcmlnaHQKJ+YAiWJhcsQu6wE0Cgon1X/fAccB RE: Tiny Space Invaders - Pete - 09-10-2025 (09-09-2025, 07:35 PM)bplus Wrote: Right again! maybe you'd like to fix it You know I haven't coded anything since April, but... Code: (Select All)
I've beat it a couple of times, but I wouldn't call it easy. Right and left arrow keys to move, but don't hold them down, you have to tap each time to move. Space bar to fire, and you can fire when the missile disappears, either with a hit (sound) or when it passes the last row occupied by ships. I really didn't want a gosub routine, but polling the keyboard in multiple places makes it smoother. Pete RE: Tiny Space Invaders - bplus - 09-10-2025 +1 yeah some nice improvements over my version eg, that you might actually win! LOL |