Jump to content

Short and Sweet (SSGC) contest


314 replies to this topic

#26  

    Dragonstomper

  • 573 posts
  • Joined: 02-February 10
  • Location:Richmond, VA

Posted Wed Mar 3, 2010 10:02 AM

Whoa, you can use AND in XB IFs? Can you also use OR? I must've overlooked this in the manual, because I'm quite used to doing things this way in other languages. That'll be great if XB supports it as well.

#27  

    River Patroller

  • 3,019 posts
  • Joined: 18-November 09
  • Location:Elizabethtown, KY

Posted Wed Mar 3, 2010 10:19 AM

Yea, ANDs are do-able... OR is also available, but I'm not sure to what capacity. :)

#28  

    River Patroller

  • 3,019 posts
  • Joined: 18-November 09
  • Location:Elizabethtown, KY

Posted Wed Mar 3, 2010 10:26 AM

Try this code.... It will print "success". THen change line 10 to say "A=1" and leave the rest of the line the same. You'll see. =)



5 CALL CLEAR
10 A=2 :: B=1 :: X=3 :: Y=4 :: P=1
40 IF A>B AND X<Y AND P=1 THEN GOTO 300 ELSE GOTO 200
200 PRINT "OOPS"
205 GOTO 205
300 PRINT "SUCCESS"
305 GOTO 305


"OR" works the same way. You can use the hell out of em. Should bring your code size down if you were using multiple lines to determine this.

Edited by Opry99er, Wed Mar 3, 2010 10:28 AM.


#29  

    Dragonstomper

  • 770 posts
  • Joined: 13-May 02
  • Location:Vienna, VA

Posted Wed Mar 3, 2010 10:26 AM

I'm trying to avoid all sorts of branches... Just wondering about the oddities. Just wanted confirmation that the system was crazy and not me.

-H

View PostOpry99er, on Wed Mar 3, 2010 9:25 AM, said:

40 IF A>B AND X<Y AND P=1 THEN GOSUB 300 ELSE GOSUB 200

This checks for 3 conditions and if ALL are true, it jumps to 300. If ANY of these are UNTRUE it will jump to 200. Of course, this looks bulky... But it works. :)


#30  

    Dragonstomper

  • 573 posts
  • Joined: 02-February 10
  • Location:Richmond, VA

Posted Wed Mar 3, 2010 11:19 AM

ANDs and ORs will certainly reduce the number if nasty nested IFs in my code. Don't know why I got it into my head they weren't supported in XB, probably because they weren't exactly highlighted in the IF-THEN demos in the manual. Boolean comparators should be loudly proclaimed when they are available. :)

#31  

    River Patroller

  • 3,019 posts
  • Joined: 18-November 09
  • Location:Elizabethtown, KY

Posted Wed Mar 3, 2010 11:27 AM

Boolean? What... Are we speaking Jabberwockian-ese now? Hehehe--- glad I could help.

#32  

    Moonsweeper

  • 384 posts
  • Joined: 21-September 08
  • Location:Toledo, OH

Posted Wed Mar 3, 2010 11:32 AM

That's my next 30-line program. FOOLISH EARTHLING... BEWARE THE WRATH... OF THE BOOLEAN COMPARATORS!!!!!!!!!!!

#33  

    Dragonstomper

  • 625 posts
  • Joined: 08-July 09
  • Location:Oklahoma CIty.

Posted Wed Mar 3, 2010 11:34 AM

View PostOpry99er, on Sun Feb 28, 2010 12:34 PM, said:

Thanks to Filip and a few others, the Atariage TI-99 forum is a bustling hub of activity.  My personal thanks to Filip for starting the first contest, and this post is to announce a brand new game program competition.  Here's the deal:: this is the (S)hort and (S)weet (G)aming ©ontest

A 30 line BASIC or XB game on the subject matter of your choice.  30 lines of program and an additional 10 lines available for DATA statements are available.  The format for this is designed to make the competition do-able for everyone.  You may not have time to do a 300 line game or one done in assembly, but a 30 line game will encourage creativity.  :). Competition starts immediately and will end on April 15th.  Good luck!

First prize--- a CF7+ with a 512 MB card, a TI99/4a console, and an XB cart

Other prizes (2nd and 3rd place) will be announced later.








Found another horse to beat here. What can the system comprise of that the game runs on (Speech synth, Mem-Ex etc....)

#34  

    River Patroller

  • 3,019 posts
  • Joined: 18-November 09
  • Location:Elizabethtown, KY

Posted Wed Mar 3, 2010 11:45 AM

32k yes
Speech synth yes

basically if it'll run on a basic system, then yea. No SAMS (although I don't think you need it), just a stock TI, speech synth, standard PEB... You know.. :). Speech would be cool!!! No assembly access (CALL LOAD, CALL LINK) though--- just straight XB. Have fun

#35  

    Dragonstomper

  • 573 posts
  • Joined: 02-February 10
  • Location:Richmond, VA

Posted Wed Mar 3, 2010 12:24 PM

Yep, looking at speech for my game too...

#36  

    Dragonstomper

  • 625 posts
  • Joined: 08-July 09
  • Location:Oklahoma CIty.

Posted Wed Mar 3, 2010 12:35 PM

--> No assembly access (CALL LOAD, CALL LINK) though--- just straight XB. <--

What if you use CALL LOAD "JUST" to fiddle with the memory locations only (as in PEEK or POKE)with no machine execution ? (Getting exasperated yet?)

#37  

    Dragonstomper

  • 770 posts
  • Joined: 13-May 02
  • Location:Vienna, VA

Posted Wed Mar 3, 2010 12:45 PM

View Postmarc.hull, on Wed Mar 3, 2010 12:35 PM, said:

--> No assembly access (CALL LOAD, CALL LINK) though--- just straight XB. <--

What if you use CALL LOAD "JUST" to fiddle with the memory locations only (as in PEEK or POKE)with no machine execution ? (Getting exasperated yet?)

Yep, that's what I want to do... Where are all the locations documented? That's what I want.. :)

#38  

    River Patroller

  • 3,019 posts
  • Joined: 18-November 09
  • Location:Elizabethtown, KY

Posted Wed Mar 3, 2010 12:46 PM

Yea--- as long as your game stands alone without assembly routines, you're fine. :).

#39  

    River Patroller

  • 3,019 posts
  • Joined: 18-November 09
  • Location:Elizabethtown, KY

Posted Wed Mar 3, 2010 12:48 PM

Unhuman, I have them-- I'll have to locate them... Probably by tonight-- unless Marc Hull would be so kind..... :)

#40  

    Dragonstomper

  • 625 posts
  • Joined: 08-July 09
  • Location:Oklahoma CIty.

Posted Wed Mar 3, 2010 1:26 PM

View PostOpry99er, on Wed Mar 3, 2010 12:48 PM, said:

Unhuman, I have them-- I'll have to locate them... Probably by tonight-- unless Marc Hull would be so kind..... :)
Bob Carmany just posted them on the no drama TI site so that is where I got them. Here they are hopefully...

Attached Files



#41 ONLINE  

    Stargunner

  • 1,070 posts
  • Joined: 14-October 07
  • Location:Germany

Posted Wed Mar 3, 2010 2:51 PM

View Postmarc.hull, on Wed Mar 3, 2010 1:26 PM, said:

View PostOpry99er, on Wed Mar 3, 2010 12:48 PM, said:

Unhuman, I have them-- I'll have to locate them... Probably by tonight-- unless Marc Hull would be so kind..... :)
Bob Carmany just posted them on the no drama TI site so that is where I got them. Here they are hopefully...

Perhaps we should add those to an "Extended Basic" tips&tricks page.
I'll see if I can add it to the development resources thread. I've been collecting some things to add but didn't
find much time to update the thread lately. Will try this weekend. ;)

#42  

    Dragonstomper

  • 573 posts
  • Joined: 02-February 10
  • Location:Richmond, VA

Posted Wed Mar 3, 2010 6:52 PM

My first entry is up - Fly Guy. May be tweaked a little as I regain the ability to write XB, but the game will stay largely the same, for better or worse.

#43  

    Stargunner

  • 1,376 posts
  • Joined: 01-May 07
  • Location:SJC

Posted Wed Mar 3, 2010 11:03 PM

View Postmarc.hull, on Wed Mar 3, 2010 1:26 PM, said:

View PostOpry99er, on Wed Mar 3, 2010 12:48 PM, said:

Unhuman, I have them-- I'll have to locate them... Probably by tonight-- unless Marc Hull would be so kind..... :)
Bob Carmany just posted them on the no drama TI site so that is where I got them. Here they are hopefully...

... there seem to be some errors in that list, or at least poor choice of terminology (for instance, you can't CALL LOAD the sprite coincidence register to any value, it's read-only and the RAM location is just a mirror you can CALL PEEK). I can't sit and try them all, but if you find some that you want to use that don't work, don't be too shocked. Feel free to ask if there's another way for specific ones that don't work. :)

#44  

    River Patroller

  • 3,019 posts
  • Joined: 18-November 09
  • Location:Elizabethtown, KY

Posted Wed Mar 3, 2010 11:11 PM

Yea--- I looked over that list earlier and you can peek into the VDP status register all you want to--- but not LOAD it... Weird. I used a
CALL PEEK to the byte containing the coincidence indicator in the VDP status register during the Honeycomb Rapture development, but it proved to be no faster or more precise that CALL COINC(ALL)--- I imagine that the GPL interpretation of CALL COINC(ALL) is simply a peek to that byte--- probably wasn't any more efficient because of my gameloop
structure... There is a test for that--- but if I understand your predicament correctly, you aren't using SPRITEs anyway--- this might be a moot point. Tursi's the one to ask about this stuff for sure! :)

#45  

    Stargunner

  • 1,376 posts
  • Joined: 01-May 07
  • Location:SJC

Posted Thu Mar 4, 2010 4:31 AM

Actually, CALL COINC seems to go and hit the VDP again.. I thought you'd said the CALL PEEK was faster. Ah well.. will benchmark it another time.

I got inspired and stayed up far too late doing a quickie. I consider this more of a warm up, it's the first XB program I've written in years, but I don't know that I'll get to anything else for the contest. ;)

Attached File  zombxb.jpg   137.65K   9 downloads

Quote

Trapped in a blue world, surrounded by zombies, with only your innate laser powers to survive!
They want to eat your brains, so stay one step ahead of them!

Use the joystick to move. You will automatically fire in the direction you are moving.
The zombies are coming up everywhere, and moving in towards you. They're slow, but deadly,
and only a head-shot will take them out. Some of these guys are JUST floating heads, take
those out too!

Don't worry about a headless body - eventually it will disintegrate. It's harmless!

You score one point for every step you take and survive. You get two points every time a
zombie spawns, so keep blasting!

Watch out for the electrified barriers - if you touch one, that's instant death!

ZomBXB (Zom-B-X-B ;) ) is a simple little shooter, loosely inspired by Robotron and that zombie farmer concept in the other thread. ;) Originally I coded it for two joysticks, but that was way too easy since it can't speed up enough to overwhelm you, so it always fires in the direction you are moving. Might be a couple of little bugs still, but I've played it a fair bit tonight. :)

30 lines of code, 3 lines of data.. though there's lots of room left technically, quite a few lines could still be packed. Still.. even though it's a bit easy, hopefully there's a little fun to be had.

On the technical side - I really cheat with the laser. Even though I'm using sprites for the players and zombies, the zombie heads are background characters. So I just draw and erase the lasers... zombies quit moving if they lose their heads, and eventually their body is recycled. That helps keep the framerate up (and explains the odd scoring - by giving you points when a zombie spawns, you are still encouraged to shoot them, without having to check every position erased.)

If they get too close to you, you can't shoot them, you have to back off. This is because you move before you shoot, but I left it that way to ensure there is a bit of a challenge - if they get close you need to make sure you still have an escape route!

Unzip the files, and drop in the Classic99 DSK1 folder. It's intended to run at normal speed, but it will run okay in CPU OverDrive (though be a bit harder ;) ).


Attached File  ZombXB.zip   1.87K   11 downloads

#46  

    Stargunner

  • 1,758 posts
  • Joined: 25-October 06

Posted Thu Mar 4, 2010 4:59 AM

View PostTursi, on Thu Mar 4, 2010 4:31 AM, said:

Unzip the files, and drop in the Classic99 DSK1 folder. It's intended to run at normal speed, but it will run okay in CPU OverDrive (though be a bit harder ;) ).
I get * FOR-NEXT NESTING IN 1010 :|

#47 ONLINE  

    Stargunner

  • 1,070 posts
  • Joined: 14-October 07
  • Location:Germany

Posted Thu Mar 4, 2010 5:38 AM

Will try this evening. Looks cool :)

Looking at the screenshot the game has an Odyssey 2 touch.
The Odyssey 2 (known as Philips Videopac G7000 in Europe) was my very first game console before
I even had a TI-99/4A. Ah the memories :D

#48  

    Dragonstomper

  • 573 posts
  • Joined: 02-February 10
  • Location:Richmond, VA

Posted Thu Mar 4, 2010 7:46 AM

Nice one Tursi, I'll check it out later. Cool that it runs in normal speed, too. I noticed that with CPU Overdrive on, speech runs too fast to be comprehensible, so I left it out of my game. Does anyone else experience that?

Oh, and while I'm on the subject of the excellent Classic99 (such a great development tool too), is there any way to perhaps add a menu choice that resizes the window to exact magnifications? I like to run everything in unfiltered pixel mode at 2x or 3x size, and it would be fantastic if the window sized itself to match those proportions. I always seem to get it a little off when I resize it by hand. Not a huge necessity, it's a fab emulator in any case, just thought I'd ask in case it's simple to implement.

Meanwhile, hoping to see more contest entries! :love:

#49  

    River Patroller

  • 3,019 posts
  • Joined: 18-November 09
  • Location:Elizabethtown, KY

Posted Thu Mar 4, 2010 8:03 AM

I'll certainly be playing this one this afternoon!!!! :). Thanks for the entry! Listen, if we have at least 15 entries, I'm planning on putting all these games on a disk to be released at the Faire.. Calling it the "Disk 30" disk. (thanks Codex)--- that is, if you all would allow it. If you don't want your game on the disk, shoot me an email and let me know. :)

#50  

    Dragonstomper

  • 625 posts
  • Joined: 08-July 09
  • Location:Oklahoma CIty.

Posted Thu Mar 4, 2010 8:10 AM

--> Actually, CALL COINC seems to go and hit the VDP again....

I am not sure this is correct as I ran into an interesting situation yesterday using the COINC sub. Apparently XB can outrun the VDP interrupt when two CALL COINC's are run back to back. I had an odd error that had no other explanation. When I spaced the calls out time wise a bit(no pun intended) the error corrected itself. If the COINC sub was reading the VDP status reg then this could not happen as that register is cleared after a read. I believe that the sub is used with the "ALL" parameter it is looking at the scratch pad location (can't remember which one) and reporting back on it's status. Amazing to think that XB can outrun anything ;-)





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users