House Creator
Moderator: MaxCoderz Staff
-
- Calc King
- Posts: 2195
- Joined: Sun 27 Mar, 2005 4:06 am
- Location: sleeping
- Contact:
- dysfunction
- Calc Master
- Posts: 1454
- Joined: Wed 22 Dec, 2004 3:07 am
- Location: Through the Aura
-
- Calc King
- Posts: 2195
- Joined: Sun 27 Mar, 2005 4:06 am
- Location: sleeping
- Contact:
- Dragonwarrior333
- Regular Member
- Posts: 121
- Joined: Sat 19 Mar, 2005 1:59 pm
Here is the code for the intro its horrible and the secret gets spoiled but here it is:
Intro
:ClrDraw:0N
:0Xmin
:94Xmax
:0Ymin
:62YMax
:AxesOff
:Horizontal(0
:Horizontal(62
:Vertical 0
:Vertical 94
:For(A,0,30
:Line(30,A,60,A
:End
:For(A,1,15
:Line(40,A,50,A,0
:End
:0X
:For(A,25,37
:Line(20+X,A,70-X,A
:X+2X
:End
:For(X,1,40
:Text(1,X," HOUSE CREATOR"
:End
:For(X,1,60
:Text(8,X," BY:"
:End
:For(X,1,40
:Text(15,X," Dwarrior333"
:End
:Repeat Ans
:getKey
:End
:If Ans=62
:Then
:Repeat Ans
:getKey
:End
:If Ans=72
:Then
:Repeat Ans
:getKey
:End
:If Ans=52
:Then
:1N:1A
:Disp "SECRET FOUND!"
:Pause
:Goto 1
:End
:End
:End
:1A
:Lbl 1
:For(X,62,40,-1
:Line(1,X,30,X
:If X61
:Line(1,X+1,29,X+1,0
:End
:If A=1
:Then
:Text(3,10,"New"
:Text(13,10,"Load"
:End
:If A=2
:Then
:Text(3,10,"Floor"
:Text(13,10,"Rug"
:End
:3X
:While 1
:Text(X,3,"-"
:getKey
:If Ans=25 or Ans=34
:Text(X,2,"
:If Ans=25
:X-10X
:If Ans=34
:X+10X
:If X0
:13X
:If X23
:3X
:If Ans=21 and X=3 and A=1
:Then
:2A
:Goto 1
:End
:If Ans=21 and X=13 and A=1
:Then
:prgmOPT
:End
:If Ans=21 and X=13 and A=2
:Then
:10F
:{16,24}dim([A]:Fill F,[A]
:prgmOPT
:End
:If Ans=21 and X=3 and A=2
:Then
:0F
:{16,24}dim([A]:Fill F,[A]
:prgmOPT
:End
:End
Here is the main Program OPT:
:AxesOff
:ClrDraw
:1P
:FnOff
:0X:0Y
:0S:0T
:24W:16H
:Lbl M
:{2:Asm(prgmXLIB
:{4,S,T,W,H,1:Asm(prgmXLIB
:{3,X,Y,P,1:Asm(prgmXLIB
:Lbl K
:getKeyK
:If K=0:Goto K
:If K=11 and N
:P
:If K=12 and N
:ZP
:If K=13 and N
:VP
:If K=14 and N
:UP
:If K=15 and N
:nP
:If K=25
:Then
:If Y=0 and T0
:Then
:If [A]((Y/8)+T,(X/8)+S+1)F:Y+8Y
:If T>0:T-1T
:Goto M
:End
:If Y0
:Y-8Y
:Goto M
:End
:If K=34
:Then
:If Y=56
:Then
:If [A]((Y/8)+T+2,(X/8)+S+1)F:Y-8Y
:If T+8T
:Goto M
:End
:If Y56
:Y+8Y
:Goto M
:End
:If K=24
:Then
:If X=0 and S0
:Then
:If [A]((Y/8)+T+1,(X/8)+S)F:X+8X
:If S>0:S-1S
:Goto M
:End
:If X0
:X-8X
:Goto M
:End
:If K=26
:Then
:If X=88
:Then
:If [A]((Y/8)+T+1,(X/8)+S+2)F:X-8X
:If S+12S
:Goto M
:End
:X+8X
:Goto M
:End
:If K=45
:Then
:{1:Asm(prgmXLIB
:Disp
:Stop
:End
:If K=31
:Then
:{X,Y}L1
:prgmOPIC
:L1(1)X
:L1(2)Y
:Goto M
:End
:If K=21
:Then
:If P1
:P[A]((Y/8)+(T+1),(X/8)+(S+1))
:Goto M
:End
:If K=23 and P=1:Then
:F[A]((Y/8)+(T+1),(X/8)+(S+1))
:Goto M
:End
And here is the sprite chooser OPIC:
:0C:0D:7E
:7G
:Lbl 1
:If C<0:56C
:If D<0:88D
:If C>56:0C
:If D>88:0D
:If C>48:6G
:If D>87:6E
:If C<48:7G
:If D<87:7E
:ClrDraw
:3X
:RecallPic 0
:real(20,0,32,24,8,8,D,C
:C/8*12+(D/8)P
:While 1
:getKey
:If Ans=24
:Then
:D-8D
:Goto 1
:End
:If Ans=25
:Then
:C-8C
:Goto 1
:End
:If Ans=26
:Then
:D+8D
:Goto 1
:End
:If Ans=34
:Then
:C+8C
:Goto 1
:End
:If Ans=45
:Return
:If Ans=21
:Return
:If Ans=11
:P
:If Ans=12
:PZ
:If Ans=13
:PV
:If Ans=14
:PU
:If Ans=15
:Pn
The site dosnt give the -> symbol so if there is two vars next to eachother then it probably meas "->" (store) and the theta isnt ther so if there is just a random var then it probably is store theta. I no its confusing
I wrote this a while ago and my BASIC has improved but i just hate optimizing code :)
Intro
:ClrDraw:0N
:0Xmin
:94Xmax
:0Ymin
:62YMax
:AxesOff
:Horizontal(0
:Horizontal(62
:Vertical 0
:Vertical 94
:For(A,0,30
:Line(30,A,60,A
:End
:For(A,1,15
:Line(40,A,50,A,0
:End
:0X
:For(A,25,37
:Line(20+X,A,70-X,A
:X+2X
:End
:For(X,1,40
:Text(1,X," HOUSE CREATOR"
:End
:For(X,1,60
:Text(8,X," BY:"
:End
:For(X,1,40
:Text(15,X," Dwarrior333"
:End
:Repeat Ans
:getKey
:End
:If Ans=62
:Then
:Repeat Ans
:getKey
:End
:If Ans=72
:Then
:Repeat Ans
:getKey
:End
:If Ans=52
:Then
:1N:1A
:Disp "SECRET FOUND!"
:Pause
:Goto 1
:End
:End
:End
:1A
:Lbl 1
:For(X,62,40,-1
:Line(1,X,30,X
:If X61
:Line(1,X+1,29,X+1,0
:End
:If A=1
:Then
:Text(3,10,"New"
:Text(13,10,"Load"
:End
:If A=2
:Then
:Text(3,10,"Floor"
:Text(13,10,"Rug"
:End
:3X
:While 1
:Text(X,3,"-"
:getKey
:If Ans=25 or Ans=34
:Text(X,2,"
:If Ans=25
:X-10X
:If Ans=34
:X+10X
:If X0
:13X
:If X23
:3X
:If Ans=21 and X=3 and A=1
:Then
:2A
:Goto 1
:End
:If Ans=21 and X=13 and A=1
:Then
:prgmOPT
:End
:If Ans=21 and X=13 and A=2
:Then
:10F
:{16,24}dim([A]:Fill F,[A]
:prgmOPT
:End
:If Ans=21 and X=3 and A=2
:Then
:0F
:{16,24}dim([A]:Fill F,[A]
:prgmOPT
:End
:End
Here is the main Program OPT:
:AxesOff
:ClrDraw
:1P
:FnOff
:0X:0Y
:0S:0T
:24W:16H
:Lbl M
:{2:Asm(prgmXLIB
:{4,S,T,W,H,1:Asm(prgmXLIB
:{3,X,Y,P,1:Asm(prgmXLIB
:Lbl K
:getKeyK
:If K=0:Goto K
:If K=11 and N
:P
:If K=12 and N
:ZP
:If K=13 and N
:VP
:If K=14 and N
:UP
:If K=15 and N
:nP
:If K=25
:Then
:If Y=0 and T0
:Then
:If [A]((Y/8)+T,(X/8)+S+1)F:Y+8Y
:If T>0:T-1T
:Goto M
:End
:If Y0
:Y-8Y
:Goto M
:End
:If K=34
:Then
:If Y=56
:Then
:If [A]((Y/8)+T+2,(X/8)+S+1)F:Y-8Y
:If T+8T
:Goto M
:End
:If Y56
:Y+8Y
:Goto M
:End
:If K=24
:Then
:If X=0 and S0
:Then
:If [A]((Y/8)+T+1,(X/8)+S)F:X+8X
:If S>0:S-1S
:Goto M
:End
:If X0
:X-8X
:Goto M
:End
:If K=26
:Then
:If X=88
:Then
:If [A]((Y/8)+T+1,(X/8)+S+2)F:X-8X
:If S+12S
:Goto M
:End
:X+8X
:Goto M
:End
:If K=45
:Then
:{1:Asm(prgmXLIB
:Disp
:Stop
:End
:If K=31
:Then
:{X,Y}L1
:prgmOPIC
:L1(1)X
:L1(2)Y
:Goto M
:End
:If K=21
:Then
:If P1
:P[A]((Y/8)+(T+1),(X/8)+(S+1))
:Goto M
:End
:If K=23 and P=1:Then
:F[A]((Y/8)+(T+1),(X/8)+(S+1))
:Goto M
:End
And here is the sprite chooser OPIC:
:0C:0D:7E
:7G
:Lbl 1
:If C<0:56C
:If D<0:88D
:If C>56:0C
:If D>88:0D
:If C>48:6G
:If D>87:6E
:If C<48:7G
:If D<87:7E
:ClrDraw
:3X
:RecallPic 0
:real(20,0,32,24,8,8,D,C
:C/8*12+(D/8)P
:While 1
:getKey
:If Ans=24
:Then
:D-8D
:Goto 1
:End
:If Ans=25
:Then
:C-8C
:Goto 1
:End
:If Ans=26
:Then
:D+8D
:Goto 1
:End
:If Ans=34
:Then
:C+8C
:Goto 1
:End
:If Ans=45
:Return
:If Ans=21
:Return
:If Ans=11
:P
:If Ans=12
:PZ
:If Ans=13
:PV
:If Ans=14
:PU
:If Ans=15
:Pn
The site dosnt give the -> symbol so if there is two vars next to eachother then it probably meas "->" (store) and the theta isnt ther so if there is just a random var then it probably is store theta. I no its confusing
I wrote this a while ago and my BASIC has improved but i just hate optimizing code :)
Ok first off there is a online program which will do the code for you here. And then there is A LOT of memory leaks in there, ie when you have a goto in a if statement or loop (like If A=1:Then:1->S:Goto 1:End) that would give one memory leak. Also using so many gotos in there isn't a good thing, you might want to restructor your code. If you use the program above and post the code I will help on optimizations, but atm I am a little busy/its hard to work with no -> and stuff like that .
- Dragonwarrior333
- Regular Member
- Posts: 121
- Joined: Sat 19 Mar, 2005 1:59 pm
Thats what I was talking about and it's what I used before, but here is the bbc code of the IntroI was thinking of using Kerm's "file decoder thingy" Rolling Eyes to see my code because I hate to look at code on calc to see if I can optimize it more.
Here is the main program:BASIC Code wrote::ClrDraw:0N
:0Xmin
:94Xmax
:0Ymin
:62YMax
:AxesOff
:Horizontal(0
:Horizontal(62
:Vertical 0
:Vertical 94
:For(A,0,30
:Line(30,A,60,A
:End
:For(A,1,15
:Line(40,A,50,A,0
:End
:0X
:For(A,25,37
:Line(20+X,A,70-X,A
:X+2X
:End
:For(X,1,40
:Text(1,X," HOUSE CREATOR"
:End
:For(X,1,60
:Text(8,X," BY:"
:End
:For(X,1,40
:Text(15,X," Dwarrior333"
:End
:Repeat Ans
:getKey
:End
:If Ans=62
:Then
:Repeat Ans
:getKey
:End
:If Ans=72
:Then
:Repeat Ans
:getKey
:End
:If Ans=52
:Then
:1N:1A
:Disp "SECRET FOUND!"
:Pause
:Goto 1
:End
:End
:End
:1A
:Lbl 1
:For(X,62,40,(-)1
:Line(1,X,30,X
:If X61
:Line(1,X+1,29,X+1,0
:End
:If A=1
:Then
:Text(3,10,"New"
:Text(13,10,"Load"
:End
:If A=2
:Then
:Text(3,10,"Floor"
:Text(13,10,"Rug"
:End
:3X
:While 1
:Text(X,3,"-"
:getKey
:If Ans=25 or Ans=34
:Text(X,2,"
:If Ans=25
:X-10X
:If Ans=34
:X+10X
:If X0
:13X
:If X23
:3X
:If Ans=21 and X=3 and A=1
:Then
:2A
:Goto 1
:End
:If Ans=21 and X=13 and A=1
:Then
:prgmOPT
:End
:If Ans=21 and X=13 and A=2
:Then
:10F
:{16,24}dim([A]:Fill F,[A]
:prgmOPT
:End
:If Ans=21 and X=3 and A=2
:Then
:0F
:{16,24}dim([A]:Fill F,[A]
:prgmOPT
:End
:End
Generated by SourceCoder, © 2005 Cemetech
Here is the Picture:BASIC Code wrote::AxesOff
:ClrDraw
:1P
:FnOff
:0X:0Y
:0S:0T
:24W:16H
:Lbl M
:{2:Asm(prgmXLIB
:{4,S,T,W,H,1:Asm(prgmXLIB
:{3,X,Y,P,1:Asm(prgmXLIB
:Lbl K
:getKeyK
:If K=0:Goto K
:If K=11 and N
:P
:If K=12 and N
:ZP
:If K=13 and N
:VP
:If K=14 and N
:UP
:If K=15 and N
:nP
:If K=25
:Then
:If Y=0 and T0
:Then
:If [A]((Y/8)+T,(X/8)+S+1)F:Y+8Y
:If T>0:T-1T
:Goto M
:End
:If Y0
:Y-8Y
:Goto M
:End
:If K=34
:Then
:If Y=56
:Then
:If [A]((Y/8)+T+2,(X/8)+S+1)F:Y-8Y
:If T+8<H:T+1T
:Goto M
:End
:If Y56
:Y+8Y
:Goto M
:End
:If K=24
:Then
:If X=0 and S0
:Then
:If [A]((Y/8)+T+1,(X/8)+S)F:X+8X
:If S>0:S-1S
:Goto M
:End
:If X0
:X-8X
:Goto M
:End
:If K=26
:Then
:If X=88
:Then
:If [A]((Y/8)+T+1,(X/8)+S+2)F:X-8X
:If S+12<W:S+1S
:Goto M
:End
:X+8X
:Goto M
:End
:If K=45
:Then
:{1:Asm(prgmXLIB
:Disp
:Stop
:End
:If K=31
:Then
:{X,Y}L[size=0]1[/size]
:prgmOPIC
:L[size=0]1[/size](1)X
:L[size=0]1[/size](2)Y
:Goto M
:End
:If K=21
:Then
:If P1
:P[A]((Y/8)+(T+1),(X/8)+(S+1))
:Goto M
:End
:If K=23 and P=1:Then
:F[A]((Y/8)+(T+1),(X/8)+(S+1))
:Goto M
:End
:
Generated by SourceCoder, © 2005 Cemetech
Sorry before I didn't click on BBC.BASIC Code wrote::0C:0D:7E
:7G
:Lbl 1
:If C<0:56C
:If D<0:88D
:If C>56:0C
:If D>88:0D
:If C>48:6G
:If D>87:6E
:If C<48:7G
:If D<87:7E
:ClrDraw
:3X
:RecallPic 0
:real(20,0,32,24,8,8,D,C
:C/8*12+(D/8)P
:While 1
:getKey
:If Ans=24
:Then
:D-8D
:Goto 1
:End
:If Ans=25
:Then
:C-8C
:Goto 1
:End
:If Ans=26
:Then
:D+8D
:Goto 1
:End
:If Ans=34
:Then
:C+8C
:Goto 1
:End
:If Ans=45
:Return
:If Ans=21
:Return
:If Ans=11
:P
:If Ans=12
:PZ
:If Ans=13
:PV
:If Ans=14
:PU
:If Ans=15
:Pn
Generated by SourceCoder, © 2005 Cemetech
I know there are memory leaks but I didn't know about them before so I made alot of mistakes. :(
- Dragonwarrior333
- Regular Member
- Posts: 121
- Joined: Sat 19 Mar, 2005 1:59 pm
Sorry for the double post in advance but my previous post was very long and I did not want to make it any longer
I might not continue with this project on account of that the version of X lib out and that the one I used is outdated and that there are BASIC tile mappers running faster lol
I have been working on some other projects and i might post a few scrennies up because I am bored and don't want to start another thread.
I might not continue with this project on account of that the version of X lib out and that the one I used is outdated and that there are BASIC tile mappers running faster lol
I have been working on some other projects and i might post a few scrennies up because I am bored and don't want to start another thread.