BASIC 10 Liner Competition - Oric Entry

Everything related to BASIC version 1.x (Oric 1 and Atmos) or HYPERBASIC (Telestrat).
Don't hesitate to give your small program samples, technical insights, or questions...
rax
Pilot Officer
Posts: 71
Joined: Tue Jul 24, 2018 3:16 pm

Re: BASIC 10 Liner Competition - Oric Entry

Post 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 :)

User avatar
ibisum
Wing Commander
Posts: 1405
Joined: Fri Apr 03, 2009 8:56 am
Location: Vienna, Austria
Contact:

Re: BASIC 10 Liner Competition - Oric Entry

Post by ibisum »

That doesn't look like BASIC speeds to me!

User avatar
6502Nerd
Pilot Officer
Posts: 84
Joined: Thu Oct 08, 2020 9:48 pm
Location: Leicestershire, UK
Contact:

Re: BASIC 10 Liner Competition - Oric Entry

Post 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

User avatar
6502Nerd
Pilot Officer
Posts: 84
Joined: Thu Oct 08, 2020 9:48 pm
Location: Leicestershire, UK
Contact:

Re: BASIC 10 Liner Competition - Oric Entry

Post 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

User avatar
Dbug
Site Admin
Posts: 3572
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Re: BASIC 10 Liner Competition - Oric Entry

Post 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 :)

User avatar
Dbug
Site Admin
Posts: 3572
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Re: BASIC 10 Liner Competition - Oric Entry

Post 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 685 times

User avatar
6502Nerd
Pilot Officer
Posts: 84
Joined: Thu Oct 08, 2020 9:48 pm
Location: Leicestershire, UK
Contact:

Re: BASIC 10 Liner Competition - Oric Entry

Post 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.

User avatar
Dbug
Site Admin
Posts: 3572
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Re: BASIC 10 Liner Competition - Oric Entry

Post 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

User avatar
iss
Wing Commander
Posts: 1199
Joined: Sat Apr 03, 2010 5:43 pm
Location: Bulgaria
Contact:

Re: BASIC 10 Liner Competition - Oric Entry

Post by iss »

Dbug wrote:
Thu Feb 18, 2021 8:27 am
Nice 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... :?:

User avatar
6502Nerd
Pilot Officer
Posts: 84
Joined: Thu Oct 08, 2020 9:48 pm
Location: Leicestershire, UK
Contact:

Re: BASIC 10 Liner Competition - Oric Entry

Post 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! :)

User avatar
ibisum
Wing Commander
Posts: 1405
Joined: Fri Apr 03, 2009 8:56 am
Location: Vienna, Austria
Contact:

Re: BASIC 10 Liner Competition - Oric Entry

Post 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?

User avatar
Dbug
Site Admin
Posts: 3572
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Re: BASIC 10 Liner Competition - Oric Entry

Post 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 :)

User avatar
6502Nerd
Pilot Officer
Posts: 84
Joined: Thu Oct 08, 2020 9:48 pm
Location: Leicestershire, UK
Contact:

Re: BASIC 10 Liner Competition - Oric Entry

Post 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..

User avatar
ibisum
Wing Commander
Posts: 1405
Joined: Fri Apr 03, 2009 8:56 am
Location: Vienna, Austria
Contact:

Re: BASIC 10 Liner Competition - Oric Entry

Post by ibisum »

Oh totally, just dreaming along .. I mean, the lores char aesthetic is really a ripe playground ..

rax
Pilot Officer
Posts: 71
Joined: Tue Jul 24, 2018 3:16 pm

Re: BASIC 10 Liner Competition - Oric Entry

Post 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 :)

Post Reply