Page 2 of 5

Re: BASIC 10 Liner Competition - Oric Entry

Posted: Tue Feb 16, 2021 8:55 pm
by rax
Dbug wrote: Tue Feb 16, 2021 7:52 pm Just a small test I'm doing, to see if speedwise my wide would work, now to get the entire game to fit in 10 lines, with player control, handling the longer strides when killing extremities, etc... that's going to be a challenge :D
Looks great :)

Re: BASIC 10 Liner Competition - Oric Entry

Posted: Tue Feb 16, 2021 10:38 pm
by ibisum
That doesn't look like BASIC speeds to me!

Re: BASIC 10 Liner Competition - Oric Entry

Posted: Wed Feb 17, 2021 5:30 pm
by 6502Nerd
ibisum wrote: Tue Feb 16, 2021 10:38 pm That doesn't look like BASIC speeds to me!
Nice speed - if in BASIC this must be plotting strings and likely using LEFT$, RIGHT$ or MID$ to show the right part! I might try something with this technique (if that's what is being used here). But one thing I found took code space is the initialisation of the strings.. anyway this looks great and has got me thinking! :D

Re: BASIC 10 Liner Competition - Oric Entry

Posted: Wed Feb 17, 2021 5:43 pm
by 6502Nerd
Dbug wrote: Tue Feb 16, 2021 7:52 pm Just a small test I'm doing, to see if speedwise my wide would work, now to get the entire game to fit in 10 lines, with player control, handling the longer strides when killing extremities, etc... that's going to be a challenge :D
Even if not in 10 lines - this would be seriously impressive speed in BASIC and a good game too! :D

Re: BASIC 10 Liner Competition - Oric Entry

Posted: Wed Feb 17, 2021 6:54 pm
by Dbug
I do generate some strings on startup, with the letters as aliens, and then just a simple PLOT at the right position to display the string, and there are additional spaces on the left and right to erase the previous position.

Nothing crazy complicated :)

Re: BASIC 10 Liner Competition - Oric Entry

Posted: Wed Feb 17, 2021 9:38 pm
by Dbug
I added colors, sound (well, it's a gif) when the invaders move, the game over/restart sequence, and they move down while speeding.
altgr_invaders_color.gif
altgr_invaders_color.gif (168.33 KiB) Viewed 6217 times

Re: BASIC 10 Liner Competition - Oric Entry

Posted: Wed Feb 17, 2021 10:02 pm
by 6502Nerd
Dbug wrote: Wed Feb 17, 2021 9:38 pm I added colors, sound (well, it's a gif) when the invaders move, the game over/restart sequence, and they move down while speeding.
altgr_invaders_color.gif
Oh very nice - I am already trying something similar but will have to be less complex I think to fit in 10 lines? Although maybe you can do something properly even if more than 10 lines, it looks excellent.

Slightly off-topic of 10 line BASIC games - It reminds me of a Happy New Year program I made for start of 2020 before I joined this wonderful forum. This program also uses long strings to update the central scrolling banner - many people who saw it were surprised it was BASIC, but it's down to using the string technique as you have found.

Re: BASIC 10 Liner Competition - Oric Entry

Posted: Thu Feb 18, 2021 8:27 am
by Dbug
Nice one :)

Well, if you think about it, the string technique is a bit like having access to a primitive form of "memcpy" and "batching".

Instead of thinking in terms of "single entities" you can draw them all one go, at least up to a point, and that may only work for some types of games, obviously :D

Re: BASIC 10 Liner Competition - Oric Entry

Posted: Thu Feb 18, 2021 9:14 am
by iss
Dbug wrote: Thu Feb 18, 2021 8:27 amNice one :)
+1 from me!

And thinking further about the strings - would it be possible to hack somehow the HIMEM and/or BASIC data area pointers so that the value of a string "maps" at screen memory - something like direct 'sprintf' to video memory? Of course there will be more problems to resolve i.e. protecting char definitions from being overwritten by other variables etc... :?:

Re: BASIC 10 Liner Competition - Oric Entry

Posted: Thu Feb 18, 2021 11:27 am
by 6502Nerd
Dbug wrote: Thu Feb 18, 2021 8:27 am Well, if you think about it, the string technique is a bit like having access to a primitive form of "memcpy" and "batching".
Exactly this! :)

Re: BASIC 10 Liner Competition - Oric Entry

Posted: Sat Feb 20, 2021 1:32 pm
by ibisum
Clever use of attribute planning to make a marquee, I admit that it now seems obvious this can be done in BASIC, you just have to prepare the field... of course you could do the same thing in HIRES with a lot of DOKE'ing too, or is that not allowed in the competition?

Re: BASIC 10 Liner Competition - Oric Entry

Posted: Sat Feb 20, 2021 1:52 pm
by Dbug
POKE DOKE and HIRES are all allowed, but it's hard to move a lot of things in HIRES in BASIC at a decent speed.

I also asked for precisions regarding control codes: We don't have to CHR$(27)+"X" everywhere, we can directly embed attributes and control codes in the BASIC strings, which is a real space saver :)

Re: BASIC 10 Liner Competition - Oric Entry

Posted: Sun Feb 21, 2021 12:47 pm
by 6502Nerd
I think a simple single line of invaders going across and down the screen might be possible in LORES...HIRES is too much for BASIC..

Re: BASIC 10 Liner Competition - Oric Entry

Posted: Sun Feb 21, 2021 1:14 pm
by ibisum
Oh totally, just dreaming along .. I mean, the lores char aesthetic is really a ripe playground ..

Re: BASIC 10 Liner Competition - Oric Entry

Posted: Mon Feb 22, 2021 1:42 pm
by rax
6502Nerd wrote: Sun Feb 21, 2021 12:47 pm I think a simple single line of invaders going across and down the screen might be possible in LORES...HIRES is too much for BASIC..
Yes, I tried, but it really move slowly in HIRES mode :)