Author Topic: Star Trek 2 player v0.1 alpha  (Read 22037 times)

0 Members and 1 Guest are viewing this topic.

SirCmpwn

  • Guest
Re: Star Trek 2 player v0.1 alpha
« Reply #60 on: March 22, 2010, 02:05:35 pm »
Edit: And what about the Omnicalc Get/Send commands?

Those send/receive via the IO port.  Check out the Omnicalc docs for more info.
« Last Edit: March 22, 2010, 02:05:46 pm by SirCmpwn »

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55942
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Star Trek 2 player v0.1 alpha
« Reply #61 on: March 22, 2010, 02:20:19 pm »
I remember someone (I always forget who) saying that for these two commands, the send command needs to be ran at the exact same time as the other calc runs the get command so it's easy for transfer to fail. To prevent this as much as possible, people generally have both commands executed repeatdely for a certain amount of time (generally it has to be long enough, and the result is very slow game) so eventually the data is sent successfully

Offline ACagliano

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 919
  • Rating: +32/-2
    • View Profile
    • ClrHome Productions
Re: Star Trek 2 player v0.1 alpha
« Reply #62 on: March 22, 2010, 08:29:20 pm »
This project is killing me. It is stressful. I am progressing slowly and all of the intertwining systems that I need to code get more complex and mind-boggling as I go on. But I'm not giving up. I plan on doing this, regardless of the cost to my sanity (or whatever is left of it). Would anyone mind if I do a testing release before the actual alpha release, so I can weed out any runtime errors?

Offline trevmeister66

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1009
  • Rating: +14/-5
    • View Profile
Re: Star Trek 2 player v0.1 alpha
« Reply #63 on: March 22, 2010, 08:45:58 pm »
I would like to test it for you, but I don't have a second calc to test with :/
Projects:    nameless RPG: 1.0%  |  Reverse Snake v1.5: 100%  |  Secret Project: 5%  |  DUNGEON: 70%

My MW2 Blog <-- Please visit :)

Offline ACagliano

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 919
  • Rating: +32/-2
    • View Profile
    • ClrHome Productions
Re: Star Trek 2 player v0.1 alpha
« Reply #64 on: March 22, 2010, 09:04:23 pm »
Well, I'm not saying anyone in particular has to use it. I just plan on releasing a test version first. Whoever has what is needed to test is free to do so. Thanks everyone for your support. I know you guys are looking forward to a good game. I will do my best not to dissapoint.

Offline Hot_Dog

  • CoT Emeritus
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3006
  • Rating: +445/-10
    • View Profile
Re: Star Trek 2 player v0.1 alpha
« Reply #65 on: March 22, 2010, 09:13:22 pm »
I'm looking forward to testing it.  I can't do the maximum since I don't have two calculators, but I plan on running software that can simulate two connected calculators.

Offline ACagliano

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 919
  • Rating: +32/-2
    • View Profile
    • ClrHome Productions
Re: Star Trek 2 player v0.1 alpha
« Reply #66 on: March 22, 2010, 09:14:46 pm »
where do you get that? I'll download it too.

(and does it work on Mac?)

Offline Hot_Dog

  • CoT Emeritus
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3006
  • Rating: +445/-10
    • View Profile
Re: Star Trek 2 player v0.1 alpha
« Reply #67 on: March 22, 2010, 09:25:36 pm »
where do you get that? I'll download it too.

(and does it work on Mac?)

http://wikiti.brandonw.net/index.php?title=Emulators:PindurTI.  I don't think it works on mac, and it's difficult to use, but I've been testing multiplayer with it.  I also heard that wabbitemu can do multiplayer, but I don't know how to do that.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55942
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Star Trek 2 player v0.1 alpha
« Reply #68 on: March 23, 2010, 01:30:22 am »
isn't there a build of Wabbitemu for Mac on Revsoft forum? I think this is pretty much the only 83+ emulator for Mac

Also, I own 3 compatible calcs, altough one is a 83+, one a 83+SE (slightly defect) and the other a TI-Nspire. I wonder if Nspire + 83+SE would work...

 I wish there was a !call BBCode for SMF forums, this is very useful on yAronet forums when you want to notify someone he's wanted in a topic in particular. I think Builderboy used Omnicalc linking routines. Or maybe I am wrong. But I swear someone on Omnimaga recently posted he had some experience with them. Maybe he could help.
« Last Edit: March 23, 2010, 01:33:58 am by DJ Omnimaga »

Offline ACagliano

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 919
  • Rating: +32/-2
    • View Profile
    • ClrHome Productions
Re: Star Trek 2 player v0.1 alpha
« Reply #69 on: March 23, 2010, 08:32:05 pm »
Here is the text of the Star Trek game thus far. Only the initial splash screen and the powering of systems is accounted for. Any comments, suggestions, insults, ect?


Code: [Select]
::"STAR TREK 2P a
:ClrHome
:FnOff
:ClrDraw
:AxesOff
:GridOff
:0→Xmin:94→Xmax
:0→Ymin:62→Ymax
:Text(‾1,0,20,"STAR TREK"
:Text(‾1,10,0,"The Great Battle"
:StorePic 0
:ClrDraw
:{38,41,39,41,40,41,51,41,52,41,53,41,38,40,39,40,40,40,51,40,52,40,53,40,38,39,39,39,40,39,51,39,52,39,53,39,38,38,39,38,40,38,51,38,52,38,53,38,38,37,39,37,40,37,51,37,52,37,53,37,38,36,39,36,40,36,51,36,52,36,53,36,38,35,39,35,40,35,51,35,52,35,53,35,38,34,39,34,40,34,51,34,52,34,53,34,38,33,39,33,40,33,51,33,52,33,53,33,38,32,39,32,40,32,51,32,52,32,53,32,39,31,40,31,51,31,52,31,39,30,40,30,45,30,51,30,52,30,39,29,40,29,42,29,43,29,44,29,45,29,46,29,47,29,48,29,51,29,52,29,40,28,41,28,42,28,43,28,44,28,45,28,46,28,47,28,48,28,49,28,50,28,51,28,39,27,40,27,41,27,42,27,43,27,44,27,45,27,46,27,47,27,48,27,49,27,50,27,51,27,52,27,38,26,39,26,40,26,41,26,50,26,51,26,52,26,53,26,38,25,39,25,40,25,43,25,44,25,45,25,46,25,47,25,48,25,51,25,52,25,53,25,38,24,39,24,40,24,42,24,43,24,44,24,45,24,46,24,47,24,48,24,49,24,51,24,52,24,53,24,38,23,39,23,40,23,42,23,43,23,44,23,47,23,48,23,49,23,51,23,52,23,53,23,38,22,39,22,40,22,42,22,43,22,48,22,49,22,51,22,52,22,53,22,38,21,39,21,40,21,42,21,43,21,48,21,49,21,51,21,52,21,53,21,38,20,39,20,40,20,42,20,43,20,44,20,47,20,48,20,49,20,51,20,52,20,53,20,38,19,39,19,40,19,42,19,43,19,44,19,45,19,46,19,47,19,48,19,49,19,51,19,52,19,53,19,38,18,39,18,40,18,43,18,44,18,45,18,46,18,47,18,48,18,51,18,52,18,53,18,38,17,39,17,40,17,41,17,50,17,51,17,52,17,53,17,39,16,40,16,41,16,42,16,43,16,44,16,45,16,46,16,47,16,48,16,49,16,50,16,51,16,52,16,40,15,41,15,42,15,43,15,44,15,45,15,46,15,47,15,48,15,49,15,50,15,51,15,41,14,42,14,43,14,44,14,45,14,46,14,47,14,48,14,49,14,50,14}→∟XT
:For(Z,1,dim(∟XT),2)
:∟XT(Z→X
:∟XT(Z+1→Y
:Pt-On(X,Y
:End
:DelVar ∟XT
:StorePic 1
:RecallPic 0
:DelVar Pic0
:For(θ,0,1000
:End
:Line(45,21,26,61
:For(θ,0,150:End
:Line(45,21,26,61,0
:RecallPic 1
:DelVar Pic1
:Text(‾1,0,0,"                                   "
:Text(‾1,0,0,"Designed"
:Line(45,21,71,59
:For(θ,0,150:End
:Line(45,21,71,59,0
:RecallPic 1
:Text(‾1,0,60,"                        "
:Text(‾1,0,70,"by"
:Line(45,21,22,49
:For(θ,0,150:End
:Line(45,21,22,49,0
:RecallPic 1
:Text(‾1,10,0,"                       "
:Text(‾1,10,0,"Anthony"
:Line(45,21,69,49
:For(θ,0,150:End
:Line(45,21,69,49,0
:RecallPic 1
:Text(‾1,10,45,"                 "
:Text(‾1,10,45,"Cagliano"
:For(θ,0,1000:End
:Line(45,21,26,61
:For(θ,0,150:End
:Line(45,21,26,61,0
:RecallPic 1
:Text(‾1,0,0,"                     "
:Text(‾1,0,5,"Blast"
:Line(45,21,71,59
:For(θ,0,150:End
:Line(45,21,71,59,0
:RecallPic 1
:Text(‾1,0,50,"                               "
:Text(‾1,0,45,"Programs"
:Line(45,21,41,49
:For(θ,0,150:End
:Line(45,21,41,49,0
:RecallPic 1
:Text(‾1,10,0,"                                                     "
:Text(‾1,10,10,"Incorporated"
:For(θ,0,1000:End
:Line(60,‾4,40,25
:For(θ,0,150:End
:Line(60,‾4,40,25,0
:Line(60,‾4,52,18
:For(θ,0,150:End
:Line(60,‾4,52,18,0
:Line(20,‾2,46,24
:For(θ,0,150:End
:Line(20,‾2,46,24,0
:For(C,1,15,3
:Circle(45,21,C,{i})
:End
:Text(‾1,52,0,"Press any key"
:0→G
:While not(G
:getKey→G
:End
:ClrDraw
:
:20→dim(∟YSHIP
:∟YSHIP(19)+200→∟YSHIP(19)
:2→dim(∟STREC
:
:If ∟YSHIP(1)=0:Then
:1→∟YSHIP(1)
:200→∟YSHIP(2):FSHIELD
:200→∟YSHIP(3):RSHIELD
:200→∟YSHIP(4):POWER
:50→∟YSHIP(5):GENERATOR
:100→∟YSHIP(6):TRANSPORTER
:100→∟YSHIP(7):REPAIR
:100→∟YSHIP(8):WARPDRIVE
:100→∟YSHIP(9):IMPULSEDRIVE
:100→∟YSHIP(10):PHASERS
:100→∟YSHIP(11):PHOTONS
:100→∟YSHIP(12):LIFESUPPORT
:0→∟YSHIP(13):SHIELDSRAISED
:0→∟YSHIP(14):WEAPONSARMED
:0→∟YSHIP(15):TIME
:0→∟YSHIP(16):SHIPX
:0→∟YSHIP(17):SHIPY
:0→∟YSHIP(18):FIRING
:0→∟YSHIP(19):REPAIRPOINTS
:100→∟YSHIP(20):SENSORS
:0→∟STREC(1):WINS
:0→∟STREC(2):LOSSES
:End
:While ∟YSHIP(12)>0
:∟YSHIP(12)-1→∟YSHIP(12)
:If ∟YSHIP(4)>0
:Then
:∟YSHIP(4)-1→∟YSHIP(4)
:∟YSHIP(12)+1→∟YSHIP(12)
:End
:If ∟YSHIP(6)>0
:Then
:∟YSHIP(6)-1→∟YSHIP(6)
:If ∟YSHIP(4)>0
:Then
:∟YSHIP(4)-1→∟YSHIP(4)
:∟YSHIP(6)+1→∟YSHIP(6)
:End
:End
:If ∟YSHIP(7)>0
:Then
:∟YSHIP(7)-1→∟YSHIP(7)
:If ∟YSHIP(4)>0
:Then
:∟YSHIP(4)-1→∟YSHIP(4)
:∟YSHIP(7)+1→∟YSHIP(7)
:End
:End
:If ∟YSHIP(8)>0
:Then
:∟YSHIP(8)-1→∟YSHIP(8)
:If ∟YSHIP(4)>0
:Then
:∟YSHIP(4)-1→∟YSHIP(4)
:∟YSHIP(8)+1→∟YSHIP(8)
:End
:End
:If ∟YSHIP(9)>0
:Then
:∟YSHIP(9)-1→∟YSHIP(9)
:If ∟YSHIP(4)>0
:Then
:∟YSHIP(4)-1→∟YSHIP(4)
:∟YSHIP(9)+1→∟YSHIP(9)
:End
:End
:If ∟YSHIP(10)>0
:Then
:∟YSHIP(10)-1→∟YSHIP(10)
:If ∟YSHIP(4)>0
:Then
:∟YSHIP(4)-1→∟YSHIP(4)
:∟YSHIP(10)+1→∟YSHIP(10)
:End
:End
:If ∟YSHIP(11)>0
:Then
:∟YSHIP(11)-1→∟YSHIP(11)
:If ∟YSHIP(4)>0
:Then
:∟YSHIP(4)-1→∟YSHIP(4)
:∟YSHIP(11)+1→∟YSHIP(11)
:End
:End
:If ∟YSHIP(20)>0
:Then
:∟YSHIP(20)-1→∟YSHIP(20)
:If ∟YSHIP(4)>0
:Then
:∟YSHIP(4)-1→∟YSHIP(4)
:∟YSHIP(20)+1→∟YSHIP(20)
:End
:End
:200-∟YSHIP(4)→R
:If R≤∟YSHIP(5)
:200→∟YSHIP(4)
:If R>∟YSHIP(5)
:∟YSHIP(4)+∟YSHIP(5)→∟YSHIP(4)
:End

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55942
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Star Trek 2 player v0.1 alpha
« Reply #70 on: March 23, 2010, 08:55:44 pm »
Can this be copied and converted to 8xp in SourceCoder? Cuz I did, saved in 8xp then loaded in Wabbitemu and got an ERR:UNDEFINED on one of the Recallpic1 command

Offline ACagliano

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 919
  • Rating: +32/-2
    • View Profile
    • ClrHome Productions
Re: Star Trek 2 player v0.1 alpha
« Reply #71 on: March 23, 2010, 09:04:53 pm »
I've got a better idea, actually. Stand by.

Offline ACagliano

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 919
  • Rating: +32/-2
    • View Profile
    • ClrHome Productions
Re: Star Trek 2 player v0.1 alpha
« Reply #72 on: March 23, 2010, 09:08:07 pm »

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55942
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Star Trek 2 player v0.1 alpha
« Reply #73 on: March 23, 2010, 09:26:46 pm »
I still get ERR:UNDEFINED on that one :(

it either misses Pic1 or something :/

SirCmpwn

  • Guest
Re: Star Trek 2 player v0.1 alpha
« Reply #74 on: March 23, 2010, 09:28:20 pm »
I just optimized the hell out of your code (hanged lines in bold):
Spoiler For Spoiler:
::"STAR TREK 2P a
:ClrHome
:FnOff
:ClrDraw
:AxesOff
:GridOff
:0→Xmin:94→Xmax
:0→Ymin:62→Ymax
:Text(‾1,0,20,"STAR TREK
:Text(‾1,10,0,"The Great Battle
:StorePic 0
:ClrDraw
:{38,41,...,50,14→∟XT
:For(Z,1,dim(∟XT),2
:∟XT(Z→X
:∟XT(Z+1→Y
:Pt-On(X,Y
:End
:DelVar ∟XT
:StorePic 1
:RecallPic 0
:DelVar Pic0
:For(θ,0,1000
:End
:Line(45,21,26,61
:For(θ,0,150:End
:Line(45,21,26,61,0
:RecallPic 1
:DelVar Pic1
:Text(‾1,0,0,"                                   
:Text(‾1,0,0,"Designed
:Line(45,21,71,59
:For(θ,0,150:End
:Line(45,21,71,59,0
:RecallPic 1
:Text(‾1,0,60,"                       
:Text(‾1,0,70,"by
:Line(45,21,22,49
:For(θ,0,150:End
:Line(45,21,22,49,0
:RecallPic 1
:Text(‾1,10,0,"                       
:Text(‾1,10,0,"Anthony
:Line(45,21,69,49
:For(θ,0,150:End
:Line(45,21,69,49,0
:RecallPic 1
:Text(‾1,10,45,"                 
:Text(‾1,10,45,"Cagliano
:For(θ,0,1000:End
:Line(45,21,26,61
:For(θ,0,150:End
:Line(45,21,26,61,0
:RecallPic 1
:Text(‾1,0,0,"                     
:Text(‾1,0,5,"Blast
:Line(45,21,71,59
:For(θ,0,150:End
:Line(45,21,71,59,0
:RecallPic 1
:Text(‾1,0,50,"                               
:Text(‾1,0,45,"Programs
:Line(45,21,41,49
:For(θ,0,150:End
:Line(45,21,41,49,0
:RecallPic 1
:Text(‾1,10,0,"                                                     
:Text(‾1,10,10,"Incorporated
:For(θ,0,1000:End
:Line(60,‾4,40,25
:For(θ,0,150:End
:Line(60,‾4,40,25,0
:Line(60,‾4,52,18
:For(θ,0,150:End
:Line(60,‾4,52,18,0
:Line(20,‾2,46,24
:For(θ,0,150:End
:Line(20,‾2,46,24,0
:For(C,1,15,3
:Circle(45,21,C,{i
:End
:Text(‾1,52,0,"Press any key
:0→G
:While not(G
:getKey→G
:End
:ClrDraw
Line removed
:20→dim(∟YSHIP
[/b]:200+∟YSHIP(19→∟YSHIP(19
:2→dim(∟STREC
Line removed
:If not(∟YSHIP(1:Then
:1→∟YSHIP(1
:200→∟YSHIP(2
:FSHIELD
:200→∟YSHIP(3
:RSHIELD
:200→∟YSHIP(4
:POWER
:50→∟YSHIP(5
:GENERATOR
:100→∟YSHIP(6
:TRANSPORTER
:100→∟YSHIP(7
:REPAIR
:100→∟YSHIP(8
:WARPDRIVE
:100→∟YSHIP(9
:IMPULSEDRIVE
:100→∟YSHIP(10
:PHASERS
:100→∟YSHIP(11
:PHOTONS
:100→∟YSHIP(12
:LIFESUPPORT
:0→∟YSHIP(13
:SHIELDSRAISED
:0→∟YSHIP(14
:WEAPONSARMED
:0→∟YSHIP(15
:TIME
:0→∟YSHIP(16
:SHIPX
:0→∟YSHIP(17
:SHIPY
:0→∟YSHIP(18
:FIRING
:0→∟YSHIP(19
:REPAIRPOINTS
:100→∟YSHIP(20
:SENSORS
:0→∟STREC(1
:WINS
:0→∟STREC(2
:LOSSES

:End
:While ∟YSHIP(12
:∟YSHIP(12)-1→∟YSHIP(12
:If ∟YSHIP(4
:Then
:∟YSHIP(4)-1→∟YSHIP(4
:1+∟YSHIP(12→∟YSHIP(12
:End
:If ∟YSHIP(6
:Then
:∟YSHIP(6)-1→∟YSHIP(6
:If ∟YSHIP(4
:Then
:∟YSHIP(4)-1→∟YSHIP(4
:1+∟YSHIP(6→∟YSHIP(6
:End
:End
:If ∟YSHIP(7
:Then
:∟YSHIP(7)-1→∟YSHIP(7
:If ∟YSHIP(4
:Then
:∟YSHIP(4)-1→∟YSHIP(4
:1+∟YSHIP(7→∟YSHIP(7
:End
:End
:If ∟YSHIP(8
:Then
:∟YSHIP(8 )-1→∟YSHIP(8
:If ∟YSHIP(4
:Then
:∟YSHIP(4)-1→∟YSHIP(4
:1+∟YSHIP(8→∟YSHIP(8
:End
:End
:If ∟YSHIP(9
:Then
:∟YSHIP(9)-1→∟YSHIP(9
:If ∟YSHIP(4
:Then
:∟YSHIP(4)-1→∟YSHIP(4
:1+∟YSHIP(9→∟YSHIP(9
:End
:End
:If ∟YSHIP(10
:Then
:∟YSHIP(10)-1→∟YSHIP(10
:If ∟YSHIP(4
:Then
:∟YSHIP(4)-1→∟YSHIP(4
:1+∟YSHIP(10→∟YSHIP(10
:End
:End
:If ∟YSHIP(11
:Then
:∟YSHIP(11)-1→∟YSHIP(11
:If ∟YSHIP(4
:Then
:∟YSHIP(4)-1→∟YSHIP(4
:1+∟YSHIP(11→∟YSHIP(11
:End
:End
:If ∟YSHIP(20
:Then
:∟YSHIP(20)-1→∟YSHIP(20
:If ∟YSHIP(4
:Then
:∟YSHIP(4)-1→∟YSHIP(4
:1+∟YSHIP(20→∟YSHIP(20
:End
:End
:200-∟YSHIP(4→R
:If R≤∟YSHIP(5
:200→∟YSHIP(4
:If R>∟YSHIP(5
:∟YSHIP(4)+∟YSHIP(5→∟YSHIP(4

:End
The key to really good optimization is in the simple things, especially with lists.  For example:
L1(2)+1->L1(2)
Can be changed to:
1+L1(2->L1(2
Thus saving two bytes.  Also, anything over zero evaulates to true in a conditional, so:
If A>0
Can always be optimized to
If A
And
If A<0
can always be optimized to
If not(A

Ask me if you have questions!