π
<-
Chat plein-écran
[^]

Color Switch CE

Assembleur, Axe, C/C++, ICE...

Color Switch CE

Message non lude Flip » 21 Fév 2017, 09:17

Hi everybody,
I've been recently working on a CE port of the classic game color switch, here are some pictures for people who don't know it:
Image
So the project is a little bit different because I had some problems with Ice language (and thats probably why I'm writing this topic :troll: )
Image
The gif is slow and a little buged because of Cemu, so If you want to test the program yourself on your calc, here is a download link:
https://drive.google.com/open?id=0BwcXw ... TBTR2U1NTQ
I'm writing this topic in english because it's Ice compiled, so PT_ may help me, and I want to avoid him translating all the message on google trad :troll: :troll: .
So here you have the code:

Code: Tout sélectionner
SWITCHC

dét(0

0-425→U
40→I→R
80→F
1→S
50-100→V
250-500→Y
5→G
V+300→W

MAIN MENU
dét(5,0
dét(21,254
dét(18,"COLOR SWITCH 1.2 BETA VERSION",0,0
dét(18,"PLEASE DO NOT DISTRIBUTE",0,10
Lbl WAITFORKEY
getKey→K
If K≠0
Goto 01
End
Goto WAITFORKEY

MAINLOOP
Lbl 01
For(θ,0,10

getKey→K

dét(2,0

U+G→U
V+G→V
Y+G→Y
G-1→G
V+300→W

dét(9,1
dét(10
dét(76

dét(2,255
dét(34,150,U,10

dét(2,F
dét(34,150,Y,55
I→F
dét(2,I
dét(34,150,V,55

dét(2,0
dét(34,150,V,50
dét(34,150,Y,50
dét(2,R
dét(34,150,140,10


dét(2,225
dét(36,0,W,320,3

dét(21,120
dét(18,"STAGE: ",240,S

dét(19,290,0
dét(15,S,3

dét(19,0,0
dét(15,C,2

dét(10
dét(11,0


If Y-300≤300
0-425→U
0-50→V
0-300→Y
5→G
S+1→S
If R<255
R+40→R
Else
40→R
End
Goto JUMP
End

Lbl JUMP

If W≤150
Goto GAMEOVER
End

If Y+50<145 et Y+50>125 et F≠R
Goto GAMEOVER
End

If Y-50<145 et Y-50>125 et F≠R
Goto GAMEOVER
End

If V+50<145 et V+50>125 et I≠R
Goto GAMEOVER
End

If V-50<145 et V-50>125 et I≠R
Goto GAMEOVER
End

If K≠0
Goto KEY
End

End

C IS THE COUNTER BETWEEN COLOR CHANGES
If C=2
If I<200
I+40→I
Goto 01
End
If I≥200
40→I
0→C
Goto 01
End
End

C+1→C
Goto 01

IF A KEY IS PRESSED
Lbl KEY

If K=15
Goto END
End

If K=54
10→G
If C=2
If I≥200
40→I
0→C
Goto 01
End
If I<200
I+40→I
0→C
Goto 01
End
End
C+1→C
Goto 01
End
Goto 01

Lbl GAMEOVER

dét(9,0
140→Q

dét(74,3,3
dét(21,254
dét(18,"GAME OVER",50,80

Pause

Lbl END
dét(1

Sory, the  is a little "i" on the calc
If someone could help me with optimising the speed, I'd be grateful.
Image

Universalis, un de mes meilleurs programmes TI 83 PCE

Avancement du projet Color Switch:
100%

feature en cours:
embellissement du gameplay
N'hésitez pas à télécharger, ça fait toujours plaisir ;) : archives_voir.php?id=873936
Avatar de l’utilisateur
FlipProgrammeur
Niveau 10: GR (Guide de Référence)
Niveau 10: GR (Guide de Référence)
Prochain niv.: 81.9%
 
Messages: 77
Images: 0
Inscription: 03 Nov 2015, 10:57
Localisation: Toulouse, France
Genre: Homme
Calculatrice(s):
MyCalcs profile
Classe: PCSI 1ere année
Facebook: profile.php?id=100010687478140

Re: Color Switch CE

Message non lude PT_ » 21 Fév 2017, 10:58

Awesome! :D
I want to give you some general tips, to speed it up ;)
First of all, why do you have "det(9,1)" in the main loop? You don't need that, just put it in the header somewhere.
Next, you have somewhere "det(10):det(11,0)", which causes (I think) the main lag, you can remove the det(11,0) (it would still work fine).
Also, so you some code with Lbl WAITFORKEY, why not putting a Pause there? :P
My next point is that you have about 6 times the FillCircle routine, but this is routine is pretty slow, just because it's a clipped circle, although I'm not sure how you can solve it :(
Last, but not least, here is my more optimized code, NOT TESTED AT ALL!!! :P
Code: Tout sélectionner
[i]SWITCH
det(0
1->S+4->G
40->I->R*2->F
0-50->V+300->W
0-250->Y
0-425->U

[i]MAINMENU
det(5,0
det(21,254
det(18,"COLOR SWITCH 1.2 BETA VERSION",0,0
det(18,"PLEASE DO NOT DISTRIBUTE",0,10

Repeat getKey
End

[i]MAINLOOP
Lbl 01
For(theta,0,10
   getKey->K
   If not(K-15
      Goto END
   End
   If not(K-54
      10->G
      If not(C-2
         If I>=1000
            40->I
            0->C
         Else
            I+40->I
            0->C
         End
      Else
         C+1->C
      End
      Goto 01
   End
   If K
      Goto 01
   End
   det(2,0
   U+G->U
   V+G->V
   Y+G->Y
   G-1->G
   V+300->V
   
   det(9,1
   det(10
   det(76
   det(2,255
   det(34,150,U,10
   det(2,F
   det(34,150,Y,55
   I->F
   det(2,I
   det(34,150,V,55
   
   det(2,0
   det(34,150,V,50
   det(34,150,Y,50
   det(2,R
   det(34,150,140,10
   
   det(2,255
   det(36,0,W,320,3
   
   det(21,120
   det(18,"STAGE: ",240,S
   
   det(19,290,0
   det(15,S,3
   
   det(19,0,0
   det(15,C,2
   
   det(10
   
   If Y<=600
      0-425->U
      0-50->V
      0-300->Y
      5->G
      S+1->S
      If R<255
         R+40->R
      Else
         40->R
      End
   End
   If W<=150
      Goto GAMEOVER
   End
   If Y+50<145 and Y+50>125 and F!=R
      Goto GAMEOVER
   End
   If Y-50<145 and Y-50>125 and F!=R
      Goto GAMEOVER
   End
   If V+50<145 and V+50>125 and I!=R
      Goto GAMEOVER
   End
   If V-50<145 and V-50>125 and I!=R
      Goto GAMEOVER
   End
End

[i]C IS THE COUNTER BETWEEN COLOR CHANGES
If not(C-2
   If I<200
      I+40->I
   Else
      40->I
      0->C
   End
Else
   C+1->C
End
Goto 01

Lbl GAMEOVER
det(9,0
det(74,3,3
det(21,254
det(18,"GAME OVER",50,80
Pause
Lbl END
det(1
Age of CEmpires I - In progress!
40%
Avatar de l’utilisateur
PT_Programmeur
Niveau 13: CU (Calculateur Universel)
Niveau 13: CU (Calculateur Universel)
Prochain niv.: 57.2%
 
Messages: 259
Inscription: 09 Fév 2016, 23:06
Genre: Homme
Calculatrice(s):
MyCalcs profile

Re: Color Switch CE

Message non lude Flip » 21 Fév 2017, 14:57

Thank you very much, I'll do that. Gona test it this evening.
PS: I'm going to change the circles into sprites and I need to rotate the circle sprite. Is it possible right now with the Ice commands ? Again, thanks for your help :D
Image

Universalis, un de mes meilleurs programmes TI 83 PCE

Avancement du projet Color Switch:
100%

feature en cours:
embellissement du gameplay
N'hésitez pas à télécharger, ça fait toujours plaisir ;) : archives_voir.php?id=873936
Avatar de l’utilisateur
FlipProgrammeur
Niveau 10: GR (Guide de Référence)
Niveau 10: GR (Guide de Référence)
Prochain niv.: 81.9%
 
Messages: 77
Images: 0
Inscription: 03 Nov 2015, 10:57
Localisation: Toulouse, France
Genre: Homme
Calculatrice(s):
MyCalcs profile
Classe: PCSI 1ere année
Facebook: profile.php?id=100010687478140

Re: Color Switch CE

Message non lude PT_ » 21 Fév 2017, 15:54

Flip a écrit:Thank you very much, I'll do that. Gona test it this evening.
PS: I'm going to change the circles into sprites and I need to rotate the circle sprite. Is it possible right now with the Ice commands ? Again, thanks for your help :D

No, sadly not, but that is not possible either with the C libs ;)
Age of CEmpires I - In progress!
40%
Avatar de l’utilisateur
PT_Programmeur
Niveau 13: CU (Calculateur Universel)
Niveau 13: CU (Calculateur Universel)
Prochain niv.: 57.2%
 
Messages: 259
Inscription: 09 Fév 2016, 23:06
Genre: Homme
Calculatrice(s):
MyCalcs profile

Re: Color Switch CE

Message non lude MateoConLechuga » 22 Fév 2017, 09:32

Looks very nice! Also you can to do rotations easily in C PT_ :P Anywho, I would just like to point out that you probably have a super outdated version of CEmu, it works perfectly fine for me; shown below:

Image

Keep up the good work!
Avatar de l’utilisateur
MateoConLechugaVIP++
Niveau 8: ER (Espèce Rare: nerd)
Niveau 8: ER (Espèce Rare: nerd)
Prochain niv.: 60.5%
 
Messages: 50
Inscription: 12 Oct 2015, 21:56
Genre: Homme
Calculatrice(s):
MyCalcs profile
GitHub: mateoconlechuga

Re: Color Switch CE

Message non lude Flip » 22 Fév 2017, 10:31

Yeah, I've seen it after posting, sorry Mateo :troll: , it was my fault, and as we now know that rotating is possible, could you ad this command PT_?
Image

Universalis, un de mes meilleurs programmes TI 83 PCE

Avancement du projet Color Switch:
100%

feature en cours:
embellissement du gameplay
N'hésitez pas à télécharger, ça fait toujours plaisir ;) : archives_voir.php?id=873936
Avatar de l’utilisateur
FlipProgrammeur
Niveau 10: GR (Guide de Référence)
Niveau 10: GR (Guide de Référence)
Prochain niv.: 81.9%
 
Messages: 77
Images: 0
Inscription: 03 Nov 2015, 10:57
Localisation: Toulouse, France
Genre: Homme
Calculatrice(s):
MyCalcs profile
Classe: PCSI 1ere année
Facebook: profile.php?id=100010687478140

Re: Color Switch CE

Message non lude PT_ » 22 Fév 2017, 11:25

I thought you mean rotations like 10 degrees, 496 degrees etc, which is not possible ;) And flipping/rotating sprites will be possible after pointers has been added (whenever that will be)
Age of CEmpires I - In progress!
40%
Avatar de l’utilisateur
PT_Programmeur
Niveau 13: CU (Calculateur Universel)
Niveau 13: CU (Calculateur Universel)
Prochain niv.: 57.2%
 
Messages: 259
Inscription: 09 Fév 2016, 23:06
Genre: Homme
Calculatrice(s):
MyCalcs profile

Re: Color Switch CE

Message non lude Flip » 12 Mar 2017, 18:41

Hey guys, I've have recently been very busy with school work, and I've restarted working on the color Switch game. So, actually, I need sprites , a lot of sprites :troll: :p , because I don't know if you've seen but the game isn't very pretty, so I'll try to make an intro, or an animated menu, and to make the score and the "game over" animation look better. Now If you're actually intrested in helping me with finding good sprites and in giving me good ideas for the death animation, you can MP me.
Image

Universalis, un de mes meilleurs programmes TI 83 PCE

Avancement du projet Color Switch:
100%

feature en cours:
embellissement du gameplay
N'hésitez pas à télécharger, ça fait toujours plaisir ;) : archives_voir.php?id=873936
Avatar de l’utilisateur
FlipProgrammeur
Niveau 10: GR (Guide de Référence)
Niveau 10: GR (Guide de Référence)
Prochain niv.: 81.9%
 
Messages: 77
Images: 0
Inscription: 03 Nov 2015, 10:57
Localisation: Toulouse, France
Genre: Homme
Calculatrice(s):
MyCalcs profile
Classe: PCSI 1ere année
Facebook: profile.php?id=100010687478140

Re: Color Switch CE

Message non lude Flip » 17 Mar 2017, 18:29

Version 1.9 finally uploaded ! :D :D Hope you will enjoy it !
If you see some bugs, please mp me or report it on this topic.
Dowload link: archives_voir.php?id=873936
A screenshot:
Image
Image

Universalis, un de mes meilleurs programmes TI 83 PCE

Avancement du projet Color Switch:
100%

feature en cours:
embellissement du gameplay
N'hésitez pas à télécharger, ça fait toujours plaisir ;) : archives_voir.php?id=873936
Avatar de l’utilisateur
FlipProgrammeur
Niveau 10: GR (Guide de Référence)
Niveau 10: GR (Guide de Référence)
Prochain niv.: 81.9%
 
Messages: 77
Images: 0
Inscription: 03 Nov 2015, 10:57
Localisation: Toulouse, France
Genre: Homme
Calculatrice(s):
MyCalcs profile
Classe: PCSI 1ere année
Facebook: profile.php?id=100010687478140


Retourner vers Langages alternatifs

Qui est en ligne

Utilisateurs parcourant ce forum: Aucun utilisateur enregistré et 15 invités

-
Rechercher
-
Social TI-Planet
-
Sujets à la une
Comparaisons des meilleurs prix pour acheter sa calculatrice !
Aidez la communauté à documenter les révisions matérielles en listant vos calculatrices graphiques !
Phi NumWorks jailbreak
123
-
Faire un don / Premium
Pour plus de concours, de lots, de tests, nous aider à payer le serveur et les domaines...
Faire un don
Découvrez les avantages d'un compte donateur !
JoinRejoignez the donors and/or premium!les donateurs et/ou premium !


Partenaires et pub
Notre partenaire Jarrety Calculatrices à acheter chez Calcuso
-
Stats.
1400 utilisateurs:
>1360 invités
>36 membres
>4 robots
Record simultané (sur 6 mois):
6892 utilisateurs (le 07/06/2017)
-
Autres sites intéressants
Texas Instruments Education
Global | France
 (English / Français)
Banque de programmes TI
ticalc.org
 (English)
La communauté TI-82
tout82.free.fr
 (Français)