Join us on Discord!
You can help CodeWalrus stay online by donating here.

[TI-84+CSE] Nagoji 4x3 CSE [Hybrid Basic]

Started by Unicorn, July 22, 2015, 10:47:36 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

alexgt

That is fine It will probably help with the speed :)
  • Calculators owned: Ti-84+, Ti-Nspire, Hp Prime, Broken HP Prime, HP 48SX

Unicorn

Well, I've added a menu to the title screen, and a block of random colors travelling along the bottom of th screen.
  • Calculators owned: I own all of them: PICKACHUP TI 84+ CSE TI 83+ SE TI something something ??? ??? ??? ??? ???
  • Consoles, mobile devices and vintage computers owned: PICKACHUP ??? ??? ??? ??? ???



??? ??? ??? ??? ???

alexgt

Yeah I really need to get a playable version for you so you know the mechanics and everything. Also this will probably have to be a clone not a port so you can speed it up :)
  • Calculators owned: Ti-84+, Ti-Nspire, Hp Prime, Broken HP Prime, HP 48SX

Unicorn

Here's a screenshot of what I have going so far:

This is slow with a rand(16 command to a faster rand(1 command.


This is with out any delay: The delay before drawing does not happen on calc.




What color do you think the menu text should be? 
  • Calculators owned: I own all of them: PICKACHUP TI 84+ CSE TI 83+ SE TI something something ??? ??? ??? ??? ???
  • Consoles, mobile devices and vintage computers owned: PICKACHUP ??? ??? ??? ??? ???



??? ??? ??? ??? ???

alexgt

Cool, you can download it and try it out so you can see all the obstiacals :)
  • Calculators owned: Ti-84+, Ti-Nspire, Hp Prime, Broken HP Prime, HP 48SX

Unicorn

is that kind of how the blocks move? I don't think I can send an app to this connectivity kit version BTW. But on sunday, I will be able to, as my computadora will be back :)
  • Calculators owned: I own all of them: PICKACHUP TI 84+ CSE TI 83+ SE TI something something ??? ??? ??? ??? ???
  • Consoles, mobile devices and vintage computers owned: PICKACHUP ??? ??? ??? ??? ???



??? ??? ??? ??? ???

alexgt

I would wait until sunday because I don't have much tome today :(
  • Calculators owned: Ti-84+, Ti-Nspire, Hp Prime, Broken HP Prime, HP 48SX

Unicorn

#22
Question: How can I get this code to make the moving rectangle stay the same color and size? I have it change every time, but it needs to stay the same.

EDIT: Fixed it up!



real(0,1,1
real(8,1,0
real(0,3,4,0,0
Repeat getKey
A-40->A
If C=3
real(7,9,A,40,40,40,D,0
real(7,9,A,80,40,40,D,0
rand(B
If C=3
real(7,9,A,40,40,40,0,0
real(7,9,A,80,40,40,0,0
If not(A:Then
160->A
B-1->B
randInt(1,255->D
randInt(1,5->C
End
If not(B
16->B
End
  • Calculators owned: I own all of them: PICKACHUP TI 84+ CSE TI 83+ SE TI something something ??? ??? ??? ??? ???
  • Consoles, mobile devices and vintage computers owned: PICKACHUP ??? ??? ??? ??? ???



??? ??? ??? ??? ???

Snektron

Hey, isnt there a asm bcall on the CSE to shift the display a few rows? can't you use that with this or does xlib not have a binding for it?
  • Calculators owned: TI-84+
Legends say if you spam more than DJ Omnimaga, you will become a walrus...


Unicorn

#24
Quote from: Cumred_Snektron on July 25, 2015, 11:33:18 AM
Hey, isnt there a asm bcall on the CSE to shift the display a few rows? can't you use that with this or does xlib not have a binding for it?
It does, but it looks like I won't need it! I may need to switch buffers when changing the screen color because it is kinda slow. Or not, becasue of the confusing :)

Player squares are working, and I have a screenshot! There is no movement yet :\



Current code:


real(0,1,1
real(8,1,0
Lbl H
real(0,3,4,0,0
"Nagoji:
real(6,0,23,5,66,36,0
"4x3
real(6,0,83,5,16,36,0
"CSE
real(6,0,113,5,224,36,0
16->B:1->C:160->A
Repeat max(Ans={45,92,93,94,82
"1.Play 2.Help
real(6,0,27,17,5,61,0
"3.Info 4.Quit
real(6,0,27,25,5,61,0
A-40->A
real(7,9,A,40+40(C=1),40,40+40(C=2),D
rand(B
real(7,9,A,40+40(C=1),40,40+40(C=2),0
If not(A:Then
160->A
B-1->B
randInt(1,255->D
randInt(1,2->C
End
If not(B
16->B
getKey
End

Ans->K
DelVar G

If K=45
Goto X

If K=92:Then
real(0,3,4,0,0
16->B:1->E:40->J:40->L:80->M:255->N
DelVar FDelVar HDelVar IRepeat K=15
Repeat K=15
real(2,0->K
H+1->H
A-40->A
real(7,9,I,J,L,M,N,0
real(7,9,A,0+40(C=2),40,80+40(C=3),D
rand(B
real(7,9,A,0+40(C=2),40,80+40(C=3),F
If not(A:Then
160->A
B-E->B
If H>=100:Then
randInt(0,255->F
real(0,3,4,F,0
End
If H>=28:Then
randInt(1,255->D
randInt(1,255->N
End
randInt(1,3->C
End
If not(B:Then
1->B
DelVar E
End
If F=D
randInt(0,255->D
End
End
If K=93:Then
real(0,3,4,0,0
"How to play=Up arrow to jump=Down arrow to slide=Right arrow to SMASH!==The point of the =game is to get=through as many=obstacles as=possible,=traversing through=multiple levels of=different=difficulties and=themes.
real(6,0,0,5,255,61,0
Repeat getKey
End
1->G
End
If K=94:Then
real(0,3,4,0,0
"This game was first=envisioned by alexgt=for The Codewalr.us=4x3 Contest. It was=made for the HP=Prime, and now, the=TI-84+ CSE by=Unicorn.
real(6,0,0,5,255,61,0
Repeat getKey
End
1->G
End
If G
Goto H
Lbl X
real(0,1,1
real(0,3,4,255,1
real(0,3,4,255,0
Stop
  • Calculators owned: I own all of them: PICKACHUP TI 84+ CSE TI 83+ SE TI something something ??? ??? ??? ??? ???
  • Consoles, mobile devices and vintage computers owned: PICKACHUP ??? ??? ??? ??? ???



??? ??? ??? ??? ???

Unicorn

bump

Just want to say that player squares have been implemented, but not movable! I'm close to getting them movable, but it seems like my getkey isn't working right... :/ Anyways, I now have an interactive menu, courtesy of mr womp womp on cemetech :)
  • Calculators owned: I own all of them: PICKACHUP TI 84+ CSE TI 83+ SE TI something something ??? ??? ??? ??? ???
  • Consoles, mobile devices and vintage computers owned: PICKACHUP ??? ??? ??? ??? ???



??? ??? ??? ??? ???

alexgt

Awesome! it looks like it works pretty well, here are level attributes:
- 1 z80 colors pretty boring
- 2 player and backroung is z80 while obsticals have all random RGB values
- 3 player turns random colors of red
- 4 player turns different colors of green
- 5 player turns different colors of blue
- 6 player is all crazy colors (random RGB) and obsticals are random blue hues
- 7 obsticals are random green colors
- 8 obsticals are different red colors
- 9 the obsticals are random red and green colors (blue is 0)
- 10 EVERYTHING is spammy and crazy and ipsadfuhgphnfdoinaodfugpdurg (the player is random RGB colors and the obsticals are and the background is(if it is hard to do teh backround make something really distarcating that makes it hard for the player (like a walrii O.o)))

Also the speed is incremented based on the level so the algorithm is like this DelayAmount(some hard coded integer)-(LEVEL*25(or something that would work well))->DELAYVAR and then decrease the  DELAYVAR by one until it reaches 0 then move the obstical (that is how I coded it but you can do what works just wanted to explain some of the code ;))
  • Calculators owned: Ti-84+, Ti-Nspire, Hp Prime, Broken HP Prime, HP 48SX

Unicorn

#27
Thanks for that, and I just need to install the firmware update to my connectivity kit!

EDIT:  And if you want to mess around with untested code: https://usercontent.irccloud-cdn.com/file/jo0RmCUE/NAGOJI.8xp :P
  • Calculators owned: I own all of them: PICKACHUP TI 84+ CSE TI 83+ SE TI something something ??? ??? ??? ??? ???
  • Consoles, mobile devices and vintage computers owned: PICKACHUP ??? ??? ??? ??? ???



??? ??? ??? ??? ???

Dream of Omnimaga

Looks good so far. I didn't have time to check the code yet, though. Also I think the title screen text should be white.
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

Unicorn

#29
Ok, I'll take that into account. I also have to do one thing with the code making get key work right with ought a rand delay, and then I will post very updated code. So that code is kinda outdated ;)


Edit: current code, that should work, when running, notice the delay when pressing clear to exit the game because of the rand call.

But be wary the spaces,

real(0,1,1
real(8,1,0
Lbl H
real(0,3,4,0
"Nagoji:
real(6,0,23,5,6,36
"4x3
real(6,0,83,5,16,36
"CSE
real(6,0,113,5,224,36
160->A
"Play Help/Info Quit 
real(6,0,43,17,5,47
1->Q:1->R:Repeat max(K={21,105,45
">
real(6,0,40R-5,9+8Q,15
real(6,0,40R-6,9+8Q,10
Repeat K
A-40->A
real(7,9,A,40+40(C=1),40,40+40(C=2),D
real(7,9,A,40+40(C=1),40,40+40(C=2),0
If not(A:Then
160->A
B-1->B
randInt(1,255->D
randInt(1,2->C
End
If not(B
16->B
getKey->K
End
">
If max(K={25,34:Then
real(6,0,40R-5,9+8Q,0
real(6,0,40R-6,9+8Q,0
End
Q+(K=34)-(K=25->Q
Q-2(Q=3)+2not(Q->Q
If max(K={24,26
">
real(6,0,40R-5,9+8Q,0
real(6,0,40R-6,9+8Q,0
R+(K=26)-(K=24)->R
R-2(R=3)+2not(R->R
End
DelVar GIf K=45
Goto X
If R=1 and Q=1:Then
real(0,3,4,0
16->B:1->E
DelVar FDelVar HRepeat K=15
real(2,0->K
H+1->H
A-40->A
real(7,9,A,0+40(C=2),40,80+40(C=3),D
rand(B
real(7,9,A,0+40(C=2),40,80+40(C=3),F
If not(A:Then
160->A
B-E->B
If H>=100:Then
randInt(0,255->F
real(0,3,4,F
End
If H>=28
randInt(1,255->D
randInt(1,3->C
End
If not(B:Then
1->B
DelVar E
End
If F=D
randInt(0,255->D
End
End
If R=2 and Q=1:Then
real(0,3,4,0
"How to play=Up arrow to jump=Down arrow to slide=Right arrow to SMASH!==The point of the =game is to get=through as many=obstacles as=possible,=traversing through=multiple levels of=different=difficulties and=themes.
real(6,0,0,5,255,61
Repeat getKey
End
1->G
End
If R=1 and Q=2:Then
real(0,3,4,0
"This game was first=envisioned by alexgt=for The Codewalr.us=4x3 Contest. It was=made for the HP=Prime, and now, the=TI-84+ CSE by=Unicorn.
real(6,0,0,5,255,61
Repeat getKey
End
1->G
End
If G
Goto H
Lbl X
real(0,1,1
real(0,3,4,255,1
real(0,3,4,255
Return
  • Calculators owned: I own all of them: PICKACHUP TI 84+ CSE TI 83+ SE TI something something ??? ??? ??? ??? ???
  • Consoles, mobile devices and vintage computers owned: PICKACHUP ??? ??? ??? ??? ???



??? ??? ??? ??? ???

Powered by EzPortal