Jump to content
IGNORED

BASIC Ten-Liners are back for 2018!


slx

Recommended Posts

I submitted my first (and maybe last!) EXTREM-256 entry: DEFENDER

 

 

Victor, I used your compression scheme from last year.

 

Wow! That's amazing. I was missing your entry for this years contest. And it's OK to reuse some code.

 

I gave FastBasic a try and I'm not happy with the game I wrote, so I was thinking about a classic to clone and Defender was what I chose. But my idea was a very simple one, so I'll quit it... I have no chance against this jewel!!! ;)

Link to comment
Share on other sites

 

Wow! That's amazing. I was missing your entry for this years contest. And it's OK to reuse some code.

 

I gave FastBasic a try and I'm not happy with the game I wrote, so I was thinking about a classic to clone and Defender was what I chose. But my idea was a very simple one, so I'll quit it... I have no chance against this jewel!!! ;)

 

Thanks so much for the compliment - that is high praise from you! I felt like my game was suffering from feature creep - I tried to cram everything into I could, but maybe that was the point of going for the EXTREM 256.

Link to comment
Share on other sites

GATES is my Atari 2600 entry into the 10x120 category! I haven't submitted it yet, still have time and room to add to it :)

 

The game cross compiles with Atari SuperCharger BASIC and Atari Flashback BASIC, though the color registers initialize differently like like PAL and NTSC, gives the game binaries produced from the same code a slightly different flavor.

 

I've attached both GATES binaries but Stella cannot play the Flashback BASIC binary; use the Javatari emulator or the real hardware to try that one.

 

GATES_SuperCharger.BIN GATES_AFP.bin

 

0 if joy0up=1 then player0y=player0y+1:t=1-t else player0y=player0y-t:t=1-t: rem ** GATES, Atari 2600 10 lineBASIC Game!
1 if joy0left=1 then player0x=player0x-1 else player0x=player0x+2
2 if g=0 then BYTErowoffset=120:for j=0 to 3:player0(j)=pl(j):player0colors(j)=p2(j):next j:g=1 else goto 4
3 for x=20 to 70 step 10:for y = 0 to 19:vwpixel(x,y,on):next y,x:player0x=52:player0y=50:data pl 240,255,127,240
4 if e>7 then e=0:BITIndex=BITIndex+1:missile1x=missile1x+3:missile1y=missile1y+1 else e=e+1:return
5 if l<20 then l=l+1 else l=0:data p2 $36,$64,$76,$36:data R 3,8,2,0,3,8,8,5,3,0,3,5,8,8,5,5,8,5,3,0,2
6 scrollvirtualworldtoggle=1:AUDV0=0:AUDV1=0:COLUBK=0:x=BITIndex/10:rem get remainder!
7 if b=0 then x=x*10:x=x+10:vwpixel(x,R(l)+10,flip):vwpixel(x,R(l)+11,flip)
8 if CXP0FB>127 then CXCLR=0:COLUBK=$34:AUDC0=4:AUDF0=l:AUDC1=1:AUDF1=l:AUDV1=0:AUDV0=31:g=0:BITIndex=0
9 if BITIndex>71 then BITIndex=0 else for j=0 to 9:rowcolors(j)=rowcolors(j)+2:next j

 

https://www.youtube.com/watch?v=9KsTK7Jjz1A

 

  • Like 6
Link to comment
Share on other sites

Wow! That's amazing. I was missing your entry for this years contest. And it's OK to reuse some code.

 

I gave FastBasic a try and I'm not happy with the game I wrote, so I was thinking about a classic to clone and Defender was what I chose. But my idea was a very simple one, so I'll quit it... I have no chance against this jewel!!! ;)

Thanks so much for the compliment - that is high praise from you! I felt like my game was suffering from feature creep - I tried to cram everything into I could, but maybe that was the point of going for the EXTREM 256.

 

After having thought about it during this morning shower, I decided to continue with the development of my version of Defender in FastBasic, but I want to give it another game theme, something like what Activision did with Chopper Command... Any Ideas? Or should I just change the name?

 

The attachment is what I've done so far. I got stuck on boudaries and I'm figuring out on how to solve that to keep it continuos.

DEFENDER-preview-1.XEX

  • Like 4
Link to comment
Share on other sites

 

After having thought about it during this morning shower, I decided to continue with the development of my version of Defender in FastBasic, but I want to give it another game theme, something like what Activision did with Chopper Command... Any Ideas? Or should I just change the name?

 

The attachment is what I've done so far. I got stuck on boudaries and I'm figuring out on how to solve that to keep it continuos.

 

Nice - I like your pixel art. I decided to not try to make the wrap around continuous because it took up too much space and requires duplicating part of the screen.

What about aliens that send down tractor beams to grab the people instead of flying down? That could make for a faster paced game - the aliens could fly around and then zap up a person nearly instantly and try to escape.

Link to comment
Share on other sites

 

After having thought about it during this morning shower, I decided to continue with the development of my version of Defender in FastBasic, but I want to give it another game theme, something like what Activision did with Chopper Command... Any Ideas? Or should I just change the name?

 

The attachment is what I've done so far. I got stuck on boudaries and I'm figuring out on how to solve that to keep it continuos.

 

Cool design, making it continuous can be done by duplicating part of the screen like Jeff suggested but I thought his version did that on the transitions when I watched it (was it another technique Jeff, it looked pretty close?)

 

I used that technique in my Defender III port, also written in BASIC but way more than 10 lines. I think adding or changing some of the theme would also be interesting to see.

 

I had enough room to add a Tribal drums soundtrack and meteors to GATES, I've still got some room but I think it's finished.

Link to comment
Share on other sites

 

BTW, I've finished a small game that fits the new PUR-80 category. I named it "Deep Canyon" (the 1st working version was named "Deep Forest"). Guess what? It is very similar to "Crazy Baloon II". I haven't submitted it yet because I must write the docs first. Here is a screenshot:

 

DEEP.PNG

 

Anyone else?

 

I submitted Deep Canyon for the "plain" PUR-80 category, i.e. it was written in the "old" Atari BASIC.

 

https://youtu.be/efwmLT5kJ6E

 

It seems that Atari entries are back!!! 8)

  • Like 7
Link to comment
Share on other sites

Nice - I like your pixel art. I decided to not try to make the wrap around continuous because it took up too much space and requires duplicating part of the screen.

What about aliens that send down tractor beams to grab the people instead of flying down? That could make for a faster paced game - the aliens could fly around and then zap up a person nearly instantly and try to escape.

 

In my version the aliens already go down to pick up humanoids and carry them to the top of the playfield. My idea was to be able to kill the alien and try to rescue the humanoid before it crashes into the ground. The battleship can fire, but there is no code to kill something yet...

 

post-20192-0-86357700-1520535054.png

 

Anyway, the idea of grabbing people with a beam sounds interesting and introduces extra difficulty to the game, but I think that it is also much more code.

 

Instead of adding acceleration, I was thinking about not allowing the battleship to stop... just keep moving to either side.

 

I'm also thinking about adding another enemy from the original game, but I'd need to change the order of players.

 

But I'm not sure which would be the rules to complete the rounds/waves and to finish the game.

 

Cool design, making it continuous can be done by duplicating part of the screen like Jeff suggested but I thought his version did that on the transitions when I watched it (was it another technique Jeff, it looked pretty close?)

 

I used that technique in my Defender III port, also written in BASIC but way more than 10 lines. I think adding or changing some of the theme would also be interesting to see.

 

As I could see in Jeff's video, there is a big jump when you wrap (0:38). Some aliens couldn't be hit or you might crash (just like hyperwarp in the arcade game) because of this behavior. It could be avoided if no aliens or humanoids were put in both extremes (and the land optionally be copied from the other side).

 

In my code, only the terrain has duplicated data at the end to allow smooth wrap around, but aliens and humanoids coordinates are not stored in the playfield but in simple arrays. The aliens did not move in my previous preview because I was trying to use a single formula to translate that data into P/M coordinates and borders were my problem in order to compare numbers inside expressions with the MOD operator, and that was crazy. In the new preview, I've linked the aliens to the data that is visible, but I had to duplicate part of the code!!! You can see how an alien changes its color when the screen scrolls horizontally, and that's because the player number changes... that allows to have two aliens at the same time in the screen, each with its own boundaries. Now, there is no wrap around problem!!! :grin:

 

The only problem I have is that some humanoids are being captured too fast... I think I need the scanner (radar)...

 

I had enough room to add a Tribal drums soundtrack and meteors to GATES, I've still got some room but I think it's finished.

 

I programmed a prototype like GATES for last year's contest, using some of the P/M techniques I developed for my Invaders 10-liner game the previous year, but it was too slow (and boring) in TurboBasic using HiRes graphics (single line P/Ms), so I suspended it waiting for a stable version of FastBasic. The first screenshot was the initial working prototype, but it was so simple that I wanted to add another degree of difficulty, and got the second one (with trace data).

 

post-20192-0-54672200-1520534061.png post-20192-0-69379200-1520534074.png

 

I forgot my game until you post about your entry, which is impressive BTW.

DEFENDER-preview-2.XEX

  • Like 3
Link to comment
Share on other sites

Hi!

 

In my code, only the terrain has duplicated data at the end to allow smooth wrap around, but aliens and humanoids coordinates are not stored in the playfield but in simple arrays. The aliens did not move in my previous preview because I was trying to use a single formula to translate that data into P/M coordinates and borders were my problem in order to compare numbers inside expressions with the MOD operator, and that was crazy.

The MOD operator is not good for wrapping coordinates because it does not wraps around 0 or maximum value, i.e., ((X+Y) MOD Y) is not the same as (X MOD Y) when (-Y < X < 0) or when (X+Y > 32767), but you can use & (bit-wise AND) without worring about wrapping the integers.

 

This means that you could do:

 j = 0  ' First player is P0 '
 for i=0 to num_ships
  pos = (x(i)+myXpos) & 2047 ' Get screen position modulo 2048 '
  if pos > 10 and pos < 200  ' If we are in range, '
    poke HPOSP0+j, pos       ' set current player X pos and '
    move ShipData, P0BASE+128*J + y(i), 8 ' put data into player '
    inc j
    if j > 4     ' If we already have 4 players in screen, '
      exit       ' cant add more. '
    endif
  endif
 next i
This will place up to 4 "ships" into the screen. assuming that the scrolling play-field is 2048 pixels wide.
  • Like 1
Link to comment
Share on other sites

This will place up to 4 "ships" into the screen. assuming that the scrolling play-field is 2048 pixels wide.

Nice approach. Thanks! I guess that it could be used with more than 4 players by alternating frames (and adding some flickering) without having to split the player vertically using DLIs.

 

What I actually did to solve the boundaries problem was to split the playfield in zones a bit wider than the screen, allowing only one alien and one humanoid inside each of them. When the screen scrolls, at most two adjacent zones could be displayed in the screen at the same time, so data is taken from both of them whichever they are, even if they are both the last one and the first one respectively. Then, the MOD and "div" operators are useful to identify the zones involved and to compute the relative position in screen of the elements.

 

  • Like 2
Link to comment
Share on other sites

 

In my version the aliens already go down to pick up humanoids and carry them to the top of the playfield. My idea was to be able to kill the alien and try to rescue the humanoid before it crashes into the ground. The battleship can fire, but there is no code to kill something yet...

 

attachicon.gifdefender-proto.png

 

Anyway, the idea of grabbing people with a beam sounds interesting and introduces extra difficulty to the game, but I think that it is also much more code.

 

Instead of adding acceleration, I was thinking about not allowing the battleship to stop... just keep moving to either side.

 

I'm also thinking about adding another enemy from the original game, but I'd need to change the order of players.

 

But I'm not sure which would be the rules to complete the rounds/waves and to finish the game.

 

 

As I could see in Jeff's video, there is a big jump when you wrap (0:38). Some aliens couldn't be hit or you might crash (just like hyperwarp in the arcade game) because of this behavior. It could be avoided if no aliens or humanoids were put in both extremes (and the land optionally be copied from the other side).

 

In my code, only the terrain has duplicated data at the end to allow smooth wrap around, but aliens and humanoids coordinates are not stored in the playfield but in simple arrays. The aliens did not move in my previous preview because I was trying to use a single formula to translate that data into P/M coordinates and borders were my problem in order to compare numbers inside expressions with the MOD operator, and that was crazy. In the new preview, I've linked the aliens to the data that is visible, but I had to duplicate part of the code!!! You can see how an alien changes its color when the screen scrolls horizontally, and that's because the player number changes... that allows to have two aliens at the same time in the screen, each with its own boundaries. Now, there is no wrap around problem!!! :grin:

 

The only problem I have is that some humanoids are being captured too fast... I think I need the scanner (radar)...

 

 

I programmed a prototype like GATES for last year's contest, using some of the P/M techniques I developed for my Invaders 10-liner game the previous year, but it was too slow (and boring) in TurboBasic using HiRes graphics (single line P/Ms), so I suspended it waiting for a stable version of FastBasic. The first screenshot was the initial working prototype, but it was so simple that I wanted to add another degree of difficulty, and got the second one (with trace data).

 

attachicon.gifproto1.png attachicon.gifproto2.png

 

I forgot my game until you post about your entry, which is impressive BTW.

 

Thanks vitoco! :) GATES development followed a similar path to your prototype, adding gravity and inertia elements enhanced the gameplay along with escalating degrees of difficulty.

 

Invaders, Millipede, Where's my Cheese (reminds me of Escape from the MindMaster) and Space Ranger are incredible games inspiring to see fitting in 10 lines of code!

 

So are both versions of Defender, awesome if you can fit the Radar in too that puts the icing on the cake along with that startup sound.

Link to comment
Share on other sites

 

Cool design, making it continuous can be done by duplicating part of the screen like Jeff suggested but I thought his version did that on the transitions when I watched it (was it another technique Jeff, it looked pretty close?)

 

I used that technique in my Defender III port, also written in BASIC but way more than 10 lines. I think adding or changing some of the theme would also be interesting to see.

 

I had enough room to add a Tribal drums soundtrack and meteors to GATES, I've still got some room but I think it's finished.

My DEFENDER playfield just jumps from one end to the other (using a MOD in the X-coordinate update) when the ship goes past the end. The effect is an abrupt change in scenery. Maybe there's enough else going on that it isn't noticeable.

Link to comment
Share on other sites

Hi!

 

 

The MOD operator is not good for wrapping coordinates because it does not wraps around 0 or maximum value, i.e., ((X+Y) MOD Y) is not the same as (X MOD Y) when (-Y < X < 0) or when (X+Y > 32767), but you can use & (bit-wise AND) without worring about wrapping the integers.

 

This means that you could do:

 j = 0  ' First player is P0 '
 for i=0 to num_ships
  pos = (x(i)+myXpos) & 2047 ' Get screen position modulo 2048 '
  if pos > 10 and pos < 200  ' If we are in range, '
    poke HPOSP0+j, pos       ' set current player X pos and '
    move ShipData, P0BASE+128*J + y(i), 8 ' put data into player '
    inc j
    if j > 4     ' If we already have 4 players in screen, '
      exit       ' cant add more. '
    endif
  endif
 next i
This will place up to 4 "ships" into the screen. assuming that the scrolling play-field is 2048 pixels wide.

 

 

I add the MOD value before MOD'ing to avoid the TBXL definition of MOD for negative numbers. That's an interesting topic for Googling - I don't think there's a proper definition for MOD of a negative quotient, so it is left to the implementer.

Link to comment
Share on other sites

Hi!

 

I add the MOD value before MOD'ing to avoid the TBXL definition of MOD for negative numbers. That's an interesting topic for Googling - I don't think there's a proper definition for MOD of a negative quotient, so it is left to the implementer.

In FastBasic I implemented the TurboBasicXL rule, that happens to be same as the C99 rule: "division truncates towards 0" and "a MOD b = a - (a/b)*b", as this is the "most compatible" rule.

 

But I also don't like that rule, I found it less useful as it is not symmetric around 0, I would prefer rounding towards -infinity or even rounding to nearest, but both are a little more difficult to implement than the current rule.

 

A little trivia, when testing different BASIC interpreters in the Atari, I discovered that AdvanBASIC did not correctly implement the above rule, it gives incorrect results for the MOD operation with negative divisors.

  • Like 1
Link to comment
Share on other sites

My DEFENDER playfield just jumps from one end to the other (using a MOD in the X-coordinate update) when the ship goes past the end. The effect is an abrupt change in scenery. Maybe there's enough else going on that it isn't noticeable.

 

Yes, there's a lot going on watching that awesome radar display and the game, I had to look carefully to see it; a bunch of invaders suddenly pop into view - feels more like a warp feature because your run is so long before the wrap, very cool to see that implemented too! :)

Link to comment
Share on other sites

The smooth counter scrolling in SWITCHBACK is awesome. Got me thinking about things and came up with this PUR-120 entry:

 

https://youtu.be/ZzicI8xO0Yg

 

screenshot.png?raw=true

Nice and cute!!! I just want to try it...

 

 

So are both versions of Defender, awesome if you can fit the Radar in too that puts the icing on the cake along with that startup sound.

 

I run out of space in my pixeled version of Defender for EXTREM-256 category. I included the scanner (radar) but I'll have to discard some features to be able to include others like sound FX. Or jump to the FREI category.

 

I've attached another preview... It is possible to kill the aliens, there are unlimited lives, it is possible to kill the humanoids when they are being abducted, but you can save them and return them to the land.

 

DEFENDER-preview-3.XEX

  • Like 6
Link to comment
Share on other sites

I've officially entered GATES for the Atari VCS in the contest, here is the finished description page:

http://relationalframework.com/Atari2600gamesonline.htm#GATES

 

And there is a GATES high score contest underway, please give it a try and share your score!

http://atariage.com/forums/topic/276511-gates-gate-crasher-atari-contest/

 

There are a few vids showing gameplay strategy on the real hardware and in emulation. Interestingly if you listen to the soundtracks, only a real hardware TIA chip can reproduce the tribal drums effect, they sound more like clicks and beeps in emulation.

 

  • Like 4
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...