Day 2. See "progress.txt".

This commit is contained in:
KikooDX 2020-07-27 18:47:56 +02:00
parent e6ccf1e440
commit 4e6313d29f
5 changed files with 164 additions and 0 deletions

101
'SUN.txt Executable file
View File

@ -0,0 +1,101 @@
'ProgramMode:RUN
Prog "~SGEN"
15->N
100->M
11->X
4->Y
X->O
Y->P~Q
1->L
1->D
0->S
{38,27,28,37->List6
"ABCDEFGHIJKLMNOPQRSTUVWXYZ#"->Str 4
"AH"->Str 9
Prog "~SLOD"
Prog "~SSCR"
1->E
{3,E->Dim Mat A
Do
'DRAW
X+21Y-22
Str 9->Str 8
Str 1->Str 9
For 1->A To E
Mat A[1,A=>Mat A[2,A]-22+21*Mat A[3,A->B
Mat A[1,A=>StrLeft(Str 9,B)+StrMid("_#E59B__#E5E8__#E5E9__#E5EA__#E5EB_",Mat A[1,A],1)+StrRight(Str 9,146-B->Str 9
Next
If StrCmp(Str 8,Str 9
Then For 0->A To 6
StrMid(Str 9,21A+1,21->Str 7
StrCmp(Str 7,StrMid(Str 8,21A+1,21))=>Locate 1,A+1,Str 7
Next
IfEnd
Locate O,Q,StrMid(Str 9,O+21Q-21,1)
Locate X,Y,"@"
'DEATH
D->L
L=>L-StrSrc(StrMid(Str 1,Ans+1,1),"_#E6A0_")->L
Isz S
Do
Getkey->G
LpWhile Not G
'PLAYER
X->O
Y->P~Q
G=List6[1=>Dsz X
G=List6[3=>Dsz Y
G=List6[2=>Isz X
G=List6[4=>Isz Y
G=48=>Prog "~SBIND"
'TRANSITION
1->A
XY And X<>22 And Y<>8=>StrSrc(Str 4,StrMid(Str 1,X+21Y-21,1))=>Goto Y
Goto N
Lbl Y
O->X
P->Y
Lbl N
If X=0
Then Dsz M
21->X
Prog "~SLOD"
Prog "~SSCR"
IfEnd
If Y=0
Then Dsz N
7->Y
Prog "~SLOD"
Prog "~SSCR"
IfEnd
If X=22
Then Isz M
1->X
Prog "~SLOD"
Prog "~SSCR"
IfEnd
If Y=8
Then Isz N
1->Y
Prog "~SLOD"
Prog "~SSCR"
IfEnd
'ENTITIES
For 1->A To E
Mat A[1,A
MOD(S,2->P
If PAns=1
Then X>Mat A[2,A=>1+Mat A[2,A->Mat A[2,A
X<Mat A[2,A=>-1+Mat A[2,A->Mat A[2,A
Y>Mat A[3,A=>1+Mat A[3,A->Mat A[3,A
Y<Mat A[3,A=>-1+Mat A[3,A->Mat A[3,A
X=Mat A[2,A=>Y=Mat A[3,A=>0->D
IfEnd
If Ans>=2 And Ans<=5
Then Mat A[2,A]-22-(Ans=2)+(Ans=3)+21(-(Ans=4)+(Ans=5)+Mat A[3,A->B
StrLeft(Str 1,B)+StrMid(" _#E6A0_",P+1,1)+StrRight(Str 1,146-B->Str 1
IfEnd
Next
LpWhile L
ClrText
Locate 7,4,"YOU DIED"

15
progress.txt Executable file
View File

@ -0,0 +1,15 @@
Jour 1 :
* Début du projet.
* Double buffering.
* Joueur et entités.
Jour 2 :
* Le projet devient Sunrise, séquelle de Noon.
* Terminé les entités.
* Collisions joueur/mur et joueur/entités.
* Evénement de mort.
* Menu avec changement des touches.
* Système de loading, 14436 octets pour stocker 120x40 écrans (plutôt efficace :3).
* Changement d'écran lorsque le joueur touche un bord.
* Génération de map simple.
* Le joueur est dessiné directement sur l'écran pour gagner des performances.

30
~SBIND.txt Executable file
View File

@ -0,0 +1,30 @@
'ProgramMode:RUN
"Keybinds"->Str 5
Do
5->A
ClrText
Menu Str 5,"_#E5E8_ Left",1,"_#E5E9_ Right",2,"_#E5EA_ Up",3,"_#E5EB_ Down",4,"Continue",0,"Exit Game",X
Lbl 1
Dsz A
Lbl 2
Dsz A
Lbl 3
Dsz A
Lbl 4
Dsz A
""->Str 9
Locate 2,4,"Press new key for"
Locate 20,4,StrMid("_#E5E8__#E5E9__#E5EA__#E5EB_",A,1)
While Getkey
WhileEnd
Do
Getkey->G
LpWhile Not G
G->List6[A
"AssignedChar!"->Str 5
LpWhile 1
Lbl 0
""->Str 9
Return
Lbl X
Stop

14
~SGEN.txt Executable file
View File

@ -0,0 +1,14 @@
'ProgramMode:RUN
{30,40->Dim Mat B
Locate 4,1,"//600"
For 1->C To 600
Locate 1,1,C
RanInt#(1,120->M
RanInt#(1,40->N
Int ((M-1)/4)+1->A
Mat B[A,N->B
316^(MOD(M-1,4))
Int (MOD(B,Ans*316)/Ans
Not Ans=>(316^(MOD(M-1,4)))*RanInt#(1,2)+Mat B[A,N->Mat B[A,N
Ans=>Dsz C
Next

4
~SSCR.txt Executable file
View File

@ -0,0 +1,4 @@
'ProgramMode:RUN
Ans=0=>". ."->Str 1
Ans=1=>"1 1"->Str 1
Ans=2=>"2 2"->Str 1