Alternatively, join us on Discord.

Dodge 68k (Voyage 200)

Started by princetonlion.tibd, January 01, 2015, 08:02:07 am

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

princetonlion.tibd

January 01, 2015, 08:02:07 am Last Edit: January 02, 2015, 04:43:12 pm by princetonlion.tibd
I'm making a game called Dodge, a port/expansion of a 83+ game I made with my friend T.Wang.

Dodge 83+ links: ShowHide


Current features (V2.0):
-Options: Choose your own character, line, and speed.
-High Scores: Top three scores are saved
-Gameplay:
  *Randomized speed
  *Player slows down over time


Anyway war sucks. Just bring us your food instead of missiles  :P ~ DJ Omnimaga (11.10.2016 20:21:48)

DJ Omnimaga

I wonder if this type of pure BASIC game would slow down much if you would use pictures instead of lines? I know that 68K pictures can be any size, like sprites, but I never tried them in a game. Of course if you need Disp scrolling then disregard pictures, though, lol. Anyway do you have a new screenshot for people who don't have a Voyage 200 or way to try? :)

compsystems

January 02, 2015, 03:12:29 pm #2 Last Edit: January 02, 2015, 03:34:32 pm by compsystems
Hello

Sorry for my bad English, please princetonlion.tibd  can create a version without GOTO, Thanks

I extracted the source code in Unicode format, using Tiedit68k

Please try this latest versión

Tiedit New Beta version 0.7.5.28

http://www.jaimeza.org/Mathematic/TexasInstruments/ti68k/ti68k_SDK/TIEdit075_beta.rar


dodge()
Prgm
  Local s,b,k,c,d,cc,f,i,cc,k,cl,cht,h,spd,l
  {8,10,20,40}→l
  1→b
  1→d
  0→k
  5→spd
  "π"→cc
  "|"→cl
  0→s
  Lbl aa
  2→i
  0→s
  Try
    If s>dghigh[1] Then
      dghigh[2]→dghigh[3]
      dghigh[1]→dghigh[2]
      s→dghigh[1]
    EndIf
    If s>dghigh[2] and s<dghigh[1] Then
      dghigh[2]→dghigh[3]
      s→dghigh[2]
    EndIf
    If s>dghigh[3] and s<dghigh[1] and s<dghigh[2]
      s→dghigh[3]
  Else
    Define dghigh={0,0,0}
  EndTry
  ClrIO
  Disp "Dodge V.2.0","By Princetonlion.tibd","","High Scores",dghigh[1],dghigh[2],dghigh[3]
  Toolbar
    Title "Play",p
    Title "Help"
    Item "Instructions",h
    Item "Credits",crd
    Title "Options",o
    Title "Cheat code",c
    Title "Quit",q
  EndTBar
  Lbl crd
  ClrIO
  Disp "Ported to V200 by Princetonlion.tibd","Agranovskiy 2014","More information: omnimaga.org","","Original by Princetonlion.tibd & T.Wang"
  Pause
  Goto aa
  Lbl o
  ClrIO
  Disp "Options","Your Charactor:",cc,"Your Line Charactor:",cl,"Starting Speed:",i
  Toolbar
    Title "Speed"
    Item "Very Slow",de
    Item "Slow",dm
    Item "Normal",dh
    Title "Characters"
    Item "Custom Player",cc
    Item "Custom Line",cl
    Title "Clear Score",dhs
    Title "Reset Settings",ors
    Title "Back",aa
  EndTBar
  Lbl dhs
  ClrIO
  Disp "Are you sure you want to clear","High scores and score?"
  Toolbar
    Title "Yes",chs
    Title "No",aa
  EndTBar
  Lbl chs
  {0,0,0}→dghigh
  0→s
  Goto o
  Lbl cl
  Request "Custom Line",cl
  left(cl,1)→cl
  Goto o
 
  Lbl cc
  Request "Custom Player",cc
  left(cc,1)→cc
  Goto o
  Lbl de
  3→i
  Goto o
  Lbl dm
  5→i
  Goto o
  Lbl dh
  20→i
  Goto o
  Lbl ors
  2→i
  0→s
  "π"→cc
  "|"→cl
  Lbl c
  ClrIO
  Request "Cheat code",cht
  If cht="123outerme" Then
    Disp "Starting score is 1337"
    1337→s
    Pause
    Goto aa
  EndIf
  Disp "Wrong code!","The code is on omnimaga.org"
  Pause
  Goto aa
  Lbl h
  ClrIO
  Disp "Use arrow keys to move player.","Avoid the lines.Score is saved in dghigh"
  Pause
  Lbl p
  1→b
  1→d
  0→k
  While true
    ClrIO
    Output 84,b,cc
    Output 45,117,s
    rand(234)→d
    rand(234)→f
    b→h
    For c,0,84,i
      Output c,d,cl
      Output c,f,cl
      Output c,h,cl
      If c=80 and (d=b or d=b+1 or d=b+2 or d=b-1 or d=b-2 or f=b or f=b+1 or f=b+2 or f=b-1 or f=b-2 or h=b or h=b+1 or h=b+2 or h=b-1 or h=b-2) Then
        Goto aa
      EndIf
      getKey()→k
      If k≠0 Then
        Output 84,b," "
      EndIf
      If k=340 and b<234 Then
        b+spd→b
        Output 84,b,cc
      EndIf
      If k=337 and b>−7 Then
        b-spd→b
        Output 84,b,cc
      EndIf
      If c=80 and (d=b or d=b+1 or d=b+2 or d=b-1 or d=b-2 or f=b or f=b+1 or f=b+2 or f=b-1 or f=b-2 or h=b or h=b+1 or h=b+2 or h=b-1 or h=b-2) Then
        Goto aa
      EndIf
      Output 45,117,s
      Output 84,b,cc
    EndFor
    s+1→s
    If fPart(s/10)=0
      spd-1→spd
    If i≤8
      i+2→i
    If i≥8
      l[rand(4)]→i
  EndWhile
  Lbl q
  ClrIO
  DispHome
  Stop
EndPrgm


PD: The above code can display color (highlighted)?
New TI-edit for 68k_CPU calculators

http://home.arcor.de/p-engels/tiedit/

princetonlion.tibd

Quote from: DJ Omnimaga on January 02, 2015, 04:35:58 am
I wonder if this type of pure BASIC game would slow down much if you would use pictures instead of lines? I know that 68K pictures can be any size, like sprites, but I never tried them in a game. Of course if you need Disp scrolling then disregard pictures, though, lol. Anyway do you have a new screenshot for people who don't have a Voyage 200 or way to try? :)

I'll upload the screenshots. And I do have a beta version with sprites, just that I haven't implemented collisions yet.
Quote from: compsystems on January 02, 2015, 03:12:29 pm
Hello

Sorry for my bad English, please princetonlion.tibd  can create a version without GOTO, Thanks

I extracted the source code in Unicode format, using Tiedit68k

Please try this latest versión

PD: The above code can display color (highlighted)?

What's wrong with the version with goto?

And I can't open .rar files on my mac. I'll try it when I can get to a windows computer.
I don't know about the color/highlighting, could you explain it a bit more?
Anyway war sucks. Just bring us your food instead of missiles  :P ~ DJ Omnimaga (11.10.2016 20:21:48)

DJ Omnimaga

Using Lbl/Goto is generally discouraged in programming, especially older calculators. It can lead to slowdowns in BASIC because the calc will search from the beginning to the end of the program to find the Lbl. Goto also makes the program harder to follow in some cases. And if Goto is nested in a loop or If block this causes a memory leak on some calculators.

compsystems

January 02, 2015, 05:17:12 pm #5 Last Edit: January 02, 2015, 05:21:21 pm by compsystems
Is easier to understand the code in functional form, ie calling subroutines or a single code without goto, the goto should be used in extreme cases where it is almost impossible to use the functional form.

On the highlighted I mean is show code in various colors on the forum.

PS: I continue with TI68k calculators that allow me to create dialog boxes in TI-BASIC and that have management command pixels. without requiring compilation or learn complex languages as LUA

Hopefully Tinspire developers incorporate "missing" TI68k basic commands


...

I would like you to please test TIedit, in which it is developing
New TI-edit for 68k_CPU calculators

http://home.arcor.de/p-engels/tiedit/

princetonlion.tibd

Quote from: compsystems on January 02, 2015, 05:17:12 pm
Is easier to understand the code in functional form, ie calling subroutines or a single code without goto, the goto should be used in extreme cases where it is almost impossible to use the functional form.

On the highlighted I mean is show code in various colors on the forum.

I would like you to please test TIedit, in which it is developing

I think the forum doesn't show syntax highlighting.

I don't really like subprograms, but I have another program called doge (reference at DJ's joke for the first dodge on omni) I use to test gameplay while skipping the menu. I can make that a subprogram.
Anyway war sucks. Just bring us your food instead of missiles  :P ~ DJ Omnimaga (11.10.2016 20:21:48)

DJ Omnimaga

Yeah unfortunately SMF software currently lacks TI-BASIC syntax highlighting. Someone would need to write a mod for that)

princetonlion.tibd

Quote from: DJ Omnimaga on January 02, 2015, 07:46:45 pm
Yeah unfortunately SMF software currently lacks TI-BASIC syntax highlighting. Someone would need to write a mod for that)

like this?

And the person writing the mod would need to make TI BASIC availiable :P
Anyway war sucks. Just bring us your food instead of missiles  :P ~ DJ Omnimaga (11.10.2016 20:21:48)

TIfanx1999

January 02, 2015, 09:40:01 pm #9 Last Edit: January 02, 2015, 09:45:52 pm by Art_of_camelot
Quote from: compsystems on January 02, 2015, 05:17:12 pm
Hopefully Tinspire developers incorporate "missing" TI68k basic commands


If you Mean Texas Instruments themselves, I think that is very unlikely. It seems they plan on keeping nspire BASIC pretty limited.

*Edit* And yea, use of Goto is generally discouraged. Sub programs or loops are usually used instead, or subroutines of some sort (provided the language supports it).

princetonlion.tibd

I guess I'll make a version with subprograms then.
Anyway war sucks. Just bring us your food instead of missiles  :P ~ DJ Omnimaga (11.10.2016 20:21:48)

DJ Omnimaga

January 02, 2015, 10:21:38 pm #11 Last Edit: January 02, 2015, 10:23:46 pm by DJ Omnimaga
Quote from: princetonlion.tibd on January 02, 2015, 08:19:49 pm
Quote from: DJ Omnimaga on January 02, 2015, 07:46:45 pm
Yeah unfortunately SMF software currently lacks TI-BASIC syntax highlighting. Someone would need to write a mod for that)

like this?

And the person writing the mod would need to make TI BASIC availiable :P

Yeah something like that, but we would need it for like 10-15 different calc languages >.<

Quote from: princetonlion.tibd on January 02, 2015, 10:01:11 pm
I guess I'll make a version with subprograms then.


It's possible to make a program not use goto without having to rely on sub-programs. It requires extra variables or a list element and nesting many Repeat/While loops, though.

princetonlion.tibd

I know, just that subprograms are easier for me.
Anyway war sucks. Just bring us your food instead of missiles  :P ~ DJ Omnimaga (11.10.2016 20:21:48)

Streetwalrus

Iirc 68k basic supports functions. ;)

DJ Omnimaga

Although functions might be a problem if his code gets large and if the 68K BASIC editor lacks a search function.  It gets hard to find anything in such case. That said, large code and small screen size was not much of an issue for me in TI-83+ BASIC, though, except on the CSE because of the horribly slow editor.

Powered by EzPortal