Jump to content

Photo

Shooting Stars - game released

game xb compiler

54 replies to this topic

#1 sometimes99er OFFLINE  

sometimes99er

    River Patroller

  • 4,225 posts
  • Location:Denmark

Posted Sat Oct 22, 2011 2:39 AM

Just a bit of fun ...
 
8)

... to be continued

:)

Edited by sometimes99er, Wed Apr 4, 2018 10:22 PM.


#2 sometimes99er OFFLINE  

sometimes99er

    River Patroller

  • Topic Starter
  • 4,225 posts
  • Location:Denmark

Posted Sat Oct 22, 2011 9:08 AM

Okay, so move your gunship left and right using the joystick.

The "AND 31" insures player position "PL" to be in the range 0-31. Automatically creates the wrap around effect.

Added a bit of color, and redefined the gunship inspired by 2600 Space Invaders.

8)

icon_smile.gif

Edited by sometimes99er, Wed Apr 4, 2018 10:22 PM.


#3 sometimes99er OFFLINE  

sometimes99er

    River Patroller

  • Topic Starter
  • 4,225 posts
  • Location:Denmark

Posted Sat Oct 22, 2011 9:34 AM

We want stars to fall from the sky. Actually we will speed things up by not moving them down, but just adding a new star when it, or the column, grows or falls.

We set aside an array, "DIM ST(31)" for handling the columns.

We add one to a random column and display, something, and loops until one of them reaches row 10.

8)

icon_smile.gif

Edited by sometimes99er, Wed Apr 4, 2018 10:22 PM.


#4 sometimes99er OFFLINE  

sometimes99er

    River Patroller

  • Topic Starter
  • 4,225 posts
  • Location:Denmark

Posted Sat Oct 22, 2011 10:05 AM

Making it a bit more "presentable". icon_smile.gif

8)

Note how I, maybe temporarily, define patterns in one go across "color set" boundaries.

Edited by sometimes99er, Wed Apr 4, 2018 10:22 PM.


#5 sometimes99er OFFLINE  

sometimes99er

    River Patroller

  • Topic Starter
  • 4,225 posts
  • Location:Denmark

Posted Sat Oct 22, 2011 2:59 PM

And a quick review of the process so far ...

Posted Image

Edited by sometimes99er, Sun Jan 6, 2013 1:23 AM.


#6 unhuman OFFLINE  

unhuman

    Stargunner

  • 1,227 posts
  • Location:Vienna, VA

Posted Sat Oct 22, 2011 6:52 PM

The power of AND !!!

#7 sometimes99er OFFLINE  

sometimes99er

    River Patroller

  • Topic Starter
  • 4,225 posts
  • Location:Denmark

Posted Sun Oct 23, 2011 2:22 AM

Reserved numbers and letters (except X, Y and Z) in the characterset. Made some top and ground borders and reserved room for things like score. And you can shoot a laser now. Use joystick up or down for shooting. You can't shoot while moving ("IF Y AND NOT X").

8)
icon_smile.gif

Edited by sometimes99er, Wed Apr 4, 2018 10:23 PM.


#8 sometimes99er OFFLINE  

sometimes99er

    River Patroller

  • Topic Starter
  • 4,225 posts
  • Location:Denmark

Posted Sun Oct 23, 2011 4:52 AM

And again ... for those of you who are about to rock ...

Posted Image

Edited by sometimes99er, Sun Jan 6, 2013 1:25 AM.


#9 unhuman OFFLINE  

unhuman

    Stargunner

  • 1,227 posts
  • Location:Vienna, VA

Posted Sun Oct 23, 2011 6:24 AM

So sweet - adding score should be simple and then one has a legitimate game. :)

#10 sometimes99er OFFLINE  

sometimes99er

    River Patroller

  • Topic Starter
  • 4,225 posts
  • Location:Denmark

Posted Mon Oct 24, 2011 6:05 AM

So the main game loop, moving the base, adding stars, and checking for fire, runs at an okay speed. I wouldn't want to change that, or the game would be too slow to be "playable". You're able to move left and right and stars keep dropping.

The shooting itself was fast enough to remove a column of stars and continue as if everything is still running. Adding score and sound wouldn't be impossible here. I was then thinking about having the stars disappear, doing some stuff, but not too much, and then get back into the action. This is what I have done now. And the laser now only hits below the stars - actually not much of an effect, but it works.

I'm not sure where it's going to go now. I thought about having something in the sky, above the stars, and if you hit it, you're being punished somehow. Don't know if that would work. I guess the "action" is almost there, to make that kind of mistake, and if you're not fast enough, the stars will descend on you. Plenty of room for an end of game/level effect.

8)

Edited by sometimes99er, Wed Apr 4, 2018 10:23 PM.


#11 unhuman OFFLINE  

unhuman

    Stargunner

  • 1,227 posts
  • Location:Vienna, VA

Posted Mon Oct 24, 2011 12:12 PM

Well, you're staying in potentially BASIC-only features... You could compile it with Wilhelm's computer for some amazing results.

#12 sometimes99er OFFLINE  

sometimes99er

    River Patroller

  • Topic Starter
  • 4,225 posts
  • Location:Denmark

Posted Mon Oct 24, 2011 12:37 PM

Well, you're staying in potentially BASIC-only features... You could compile it with Wilhelm's computer for some amazing results.


Yeah, that's right. I was planning on bringing in some sprites somehow, maybe as moving bunkers, stars shootings left and right. But absolutely. Good input/idea. A lot of things can be done without sprites. I never took the time to play with any of the compilers. The Wilhelm was Basic only, but then there also were another ?

Edit1:
Surprise ! The Development Resource thread does not have the compilers listed (other than the My Little Compiler) !?

Edit2:
Wilhelm:
All SS1-6 compile fine, but none of them work. SS1 displays fine, but base can't be moved with the joystick. Guess I have to read the DOCS.

Edit3:
Oh ...
IF-THEN-ELSE - works only with line numbers, just like in BASIC. XB style not supported.
DISPLAY - equivalent of PRINT.
RANDOMIZE - no effect.
RND - returns a value of 0. RND is only useful when it is multiplied by a number. i.e. INT(RND*6) gives result (0,1,2,3,4,5).
Do not nest arrays, like Q=A(B(7)). Will make compiled version crash.
Not supported: DEF, ATN, COS, EXP, LOG, SIN and TAN.
No File processing capabilities.

Edit4:
Recoded it according to the guidelines above, and it works. And it's fast ! :thumbsup:

Posted Image

Edited by sometimes99er, Sun Jan 6, 2013 1:26 AM.


#13 RXB OFFLINE  

RXB

    River Patroller

  • 3,583 posts
  • Location:Vancouver, Washington, USA

Posted Mon Oct 24, 2011 3:26 PM

I have thought about doing that for some time. Make a GPL Compiler, first a TI BASIC one then a XB one.

XB = GPL

CALL CLEAR = ALL 32

CALL HCHAR(4,6,65,8) =ST 65,V@102
MOVE 8,V@102,V@103

IF INT(X*11)+A=47 THEN KABOOM ELSE PFFT =DST @X,@TMP
DMUL 11,@TMP
DADD @A,@TMP
DCEQ 47,@TMP
BS KABOOM
BR PFFT

As it is all GPL (Exactly the same as BASIC and XB are written in) I could support DEF, even Arrays without a problem.
Matter of fact as I have the Source Code for BASIC and XB written in GPL it would be pretty easy.
I could even support CALL LINK and the entire thing runs from GRAM. In Classic99 or a Emulators it would be cool.

#14 sometimes99er OFFLINE  

sometimes99er

    River Patroller

  • Topic Starter
  • 4,225 posts
  • Location:Denmark

Posted Mon Oct 24, 2011 3:45 PM

I have thought about doing that for some time. Make a GPL Compiler, first a TI BASIC one then a XB one.


Wilhelm estimates that the use of integers instead of floating point alone makes programs 5 times faster.

Would your GPL Compiler use and/or allow floating point ?

#15 RXB OFFLINE  

RXB

    River Patroller

  • 3,583 posts
  • Location:Vancouver, Washington, USA

Posted Mon Oct 24, 2011 4:19 PM

I have thought about doing that for some time. Make a GPL Compiler, first a TI BASIC one then a XB one.


Wilhelm estimates that the use of integers instead of floating point alone makes programs 5 times faster.

Would your GPL Compiler use and/or allow floating point ?


Yes I would, but show the people where to fix the BASIC or XB programs so they do not use Floating Point.
I would put in the output listing where Floating Point was being used and say "Slows down program here, suggest rewrite"
The BASIC or XB programs are much more easy to fix the the Compiled versions is.

I see this is the main problem with most Compilers today as they do not point out flaws in the source files.
(By the way that 5 times faster is from a Forth Book by Leo Brodie i.e. Starting Forth)

Edited by RXB, Mon Oct 24, 2011 4:22 PM.


#16 unhuman OFFLINE  

unhuman

    Stargunner

  • 1,227 posts
  • Location:Vienna, VA

Posted Mon Oct 24, 2011 5:32 PM

My compiled version of Bloxo-TI-z used the joystick and worked fine. I never used real hardware, however, just emulation. The only issue I did have was with button press / unpress / state detection. I worked around it though. :)

The only real problem with compilation is it does delay the code / test / fix / whatever cycle. But... since the game already worked, it was just making it more responsive and then doing appropriate slow downs to ensure it wasn't too fast....

#17 RXB OFFLINE  

RXB

    River Patroller

  • 3,583 posts
  • Location:Vancouver, Washington, USA

Posted Mon Oct 24, 2011 5:48 PM

My compiled version of Bloxo-TI-z used the joystick and worked fine. I never used real hardware, however, just emulation. The only issue I did have was with button press / unpress / state detection. I worked around it though. :)

The only real problem with compilation is it does delay the code / test / fix / whatever cycle. But... since the game already worked, it was just making it more responsive and then doing appropriate slow downs to ensure it wasn't too fast....


Well my point was to make some thing that would work in Emulators or on a real TI99/4A.
Emulations is fine but why even be on a TI99/4A web site if the point is not be a TI99/4A, but a Emulation of some of what it does?
Pretty much breaks the idea of why we like the TI to just make a utility that only partially uses the what we use or love.
Like a mechanical Dog, yea barks and fetches sticks but really not the same at all, just a facsimile of a Dog. Do you see my point?

Also the amount of fixing the code is going to be a lot less then Assembly as the two are so far apart, BASIC and XB are already in GPL so the step is small.
(Down the line I could go the next step and make a GPL compiler that takes the GPL and turns that into Assembly)

Edited by RXB, Mon Oct 24, 2011 5:53 PM.


#18 sometimes99er OFFLINE  

sometimes99er

    River Patroller

  • Topic Starter
  • 4,225 posts
  • Location:Denmark

Posted Tue Oct 25, 2011 12:28 AM

The only real problem with compilation is it does delay the code / test / fix / whatever cycle. But... since the game already worked, it was just making it more responsive and then doing appropriate slow downs to ensure it wasn't too fast....


Wilhelm estimated programs being 20 times faster, sometimes 70 times faster. Turning on CPU Overdrive here makes things about 10 times faster, so maybe that let's me isolate a good deal of the development to pre compilation. I think I would compile and test about every hour (developing time) to insure I'm not out on a detour though.

Wilhelm says that the compiled versions has its own small and fast interpreter. Here's what I got (all TIFILES) ...

SS7 (=SS5 recoded) 896 bytes
SS7M 896 bytes
SS7A 2688 bytes
SS7O 15744 bytes
SS7C 4736 bytes

If I did the TI Basic to Assembly conversion myself, I think I'd end up with less than 736 bytes. Now size isn't the big question, but it's interesting how size develops. I guess most of the size right now is the interpreter, and hopefully that's a constant (of there about).

The big issue is (to me right now), how stable is this Wilhelm's Compiler ?

#19 retroclouds OFFLINE  

retroclouds

    Stargunner

  • 1,698 posts
  • Location:Germany

Posted Wed Oct 26, 2011 11:43 PM

Edit1:
Surprise ! The Development Resource thread does not have the compilers listed (other than the My Little Compiler) !?


It's still on my todo list. I requested about collecting information on basic/exbasic compilers a while ago.
I'll see that I'll update the Development Resources thread with what I have at this time. Just give me some time. I'm currently preparing myself for an exam and have almost no TI time.

In the meantime I have also been in touch with errorfree (not a member of atariage). I had some interesting discussion with him during the last regional TI-Treffen in Birkenau germany.
He worked on an Extended Basic compiler during the last few years. It's written in assembly language and runs on the TI-99/4A. As with the other compilers around it does have some
restrictions. But it's the only compiler I know about that has seen maintenance since the 80's.

Ofcourse I'm also looking forward seeing how the compiler Rich started working will look like.

Edited by retroclouds, Wed Oct 26, 2011 11:46 PM.


#20 RXB OFFLINE  

RXB

    River Patroller

  • 3,583 posts
  • Location:Vancouver, Washington, USA

Posted Thu Oct 27, 2011 12:06 AM

The core is the EA module so the only thing replaced is the Assembler with a Compiler and of course no option for RXB.

Other then that it looks very much like a REA cart with my Directory utility. So will run EA3, EA5 and built in EA Editor.

Edited by RXB, Thu Oct 27, 2011 12:08 AM.


#21 sometimes99er OFFLINE  

sometimes99er

    River Patroller

  • Topic Starter
  • 4,225 posts
  • Location:Denmark

Posted Fri Oct 28, 2011 4:26 AM

Okay, so this small XB Game Development thread has changed a bit. We're going to use the Wilhelm's compiler, so it's going to be much more TI Basic than XB, though the final product will be an XB format file.

I've moved the stars to the top of the screen. Added more colors to the stars. The line below the base is now made up of oil barrels. One line reserved at the bottom for game information like lives and score.

I tried to divide the code into sections and add a comment or two. I'll probably add much more comments - to help me - and you. I'll look into making the flow easier to follow. I've added one CALL SOUND statement to maybe try and have the game wait a frame, and it looks as if it had the desired effect on the compiled version. Apart from this maybe being a bit of fun, I'm almost clueless as to what would make this playable and challenging. Any ideas ?
 
8)

Edited by sometimes99er, Wed Apr 4, 2018 10:23 PM.


#22 sometimes99er OFFLINE  

sometimes99er

    River Patroller

  • Topic Starter
  • 4,225 posts
  • Location:Denmark

Posted Fri Oct 28, 2011 4:32 AM

:)

Posted Image

Edited by sometimes99er, Sun Jan 6, 2013 1:29 AM.


#23 sometimes99er OFFLINE  

sometimes99er

    River Patroller

  • Topic Starter
  • 4,225 posts
  • Location:Denmark

Posted Sat Oct 29, 2011 1:48 AM

Fire moved from joystick up and down to joystick fire (tabulator in Classic99) and Q. Also you can shoot while moving. To shoot more than once, you have to release and press fire again. Fire sound added, this actually slows the speed of the stars, but just for now.

Edited by sometimes99er, Thu Jan 12, 2012 1:22 PM.


#24 sometimes99er OFFLINE  

sometimes99er

    River Patroller

  • Topic Starter
  • 4,225 posts
  • Location:Denmark

Posted Mon Oct 31, 2011 1:36 AM

Added a timer. You get 20 seconds on the first level, then it's on to the next, with stars shooting faster.

Edited by sometimes99er, Sun Jan 6, 2013 1:31 AM.


#25 sometimes99er OFFLINE  

sometimes99er

    River Patroller

  • Topic Starter
  • 4,225 posts
  • Location:Denmark

Posted Wed Nov 2, 2011 1:46 AM

Compiles fine with the new updated Extended Basic Compiler v2.1 by Harry Wilhelm. Runs fine too. There's a limited increase in footprint (I guess the new support library is just a bit bigger, and that all of it (the support library) is included in the final compiled file.

Posted Image

Edited by sometimes99er, Sun Jan 6, 2013 2:19 AM.






Also tagged with one or more of these keywords: game, xb, compiler

0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users