Author Topic: Graviter  (Read 163373 times)

0 Members and 1 Guest are viewing this topic.

Offline leafy

  • Project Author
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1554
  • Rating: +475/-97
  • Seizon senryakuuuu!
    • View Profile
    • keff.me
Re: Graviter - Axe
« Reply #30 on: January 09, 2011, 01:41:11 am »
Okay, I completely redid the engine to use a scrolling tilemapper and a 5x5 instead of a 6x6 cube thingy. Also included are a shrink powerup(down?), gravity well (changes the axis of gravity vertical <--> horizontal) and a switch and door system. I'm kinda busy with school so the next update might take a while to optimize and get out.
In-progress: Graviter (...)

Offline Eeems

  • Mr. Dictator
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6265
  • Rating: +318/-36
  • little oof
    • View Profile
    • Eeems
Re: Graviter - Axe
« Reply #31 on: January 09, 2011, 02:06:39 am »
Can't wait to see this :D Sounds like you've put a lot of work into it.
/e

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55941
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Graviter - Axe
« Reply #32 on: January 10, 2011, 01:42:59 am »
Sounds promising! I hope you find time to work on it and post an update with screenshots. ;D

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55941
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Graviter - Axe
« Reply #33 on: January 11, 2011, 08:48:17 pm »
By the way I tried this on calc and this is pretty great actually. :)

Offline leafy

  • Project Author
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1554
  • Rating: +475/-97
  • Seizon senryakuuuu!
    • View Profile
    • keff.me
Re: Graviter - Axe
« Reply #34 on: January 16, 2011, 02:22:03 am »
I need a LOT of help optimizing this code. This code I am now releasing is as optimized as the Calvin cycle. Anyways, if you think you can make any improvements up them here. I need to cut down a lot of space because I am getting dangerously close to the 8000 byte limit.

I'm trusting you guys with the source code because it is hilariously unoptimized and you probably can't get anything off it anyways. And it only has 5 levels (I'm still working on the engine, but now I can make a level in about two hours.

EDIT: I've converted the programs to text you can view here.

The conversion is slightly off, so
¾List( = Data(
ü = -->

Spoiler For GRAVTILE:
..
.DYNAMIC
.door
.VERT
[88F800F888000000F8000000F80000000000000000000000üPic6
.HORIZ
[D8505050D800000088888888880000000000000000000000]
.EXPLODE
[0000001818000000000018242418000000443824462C5000897E3CE6677EDA89984B2A40D3025A9851100001810004910000000000000000]üPic0
.GOAL
.horiz
[33CC0000000000009966000000000000CC330000000000006699000000000000]üPic10
.vert
[8080404080804040408080404080804040408080404080808040408080404080]üPic15
.BUTTON-------
.DOOR---
.DOWN
[F888F80000000000F8F8000000000000üPic5
.LEFT
[E0A0A0A0E00000006060606060000000
.RIGHT
[E0A0A0A0E0000000C0C0C0C0C0000000
.UP
[F888F8000000000000F8F80000000000]
.GRAV---
.DOWN
[7050F8000000000070F8000000000000üPic4
.LEFT
[80E0A0E0800000004060606040000000
.RIGHT
[20E0A0E02000000040C0C0C040000000
.UP
[F85070000000000000F8700000000000]
.STATIC
[0000000000000000üPic2
.DOOR---------
.VERT
[8888F88888000000
.HORIZ
[F8202020F8000000
.SPIKES-------
.down
[5050202000000000
.up
[0020205050000000
.left
[0018601800000000
.right
[00C030C000000000
.PLATFORMS----
.horiz
.5*5
[F8F8F8F8F8000000
.5*3
[F8F8F80000000000
[0000F8F8F8000000
.vert
.3*5
[E0E0E0E0E0000000
[3838383838000000
.SHRINK
[8888888888000000
[F8000000F8000000
.GRAV
[D8F850F8D8000000

Spoiler For GRAVLEV:
..
[DFDFDF578FDFFFFF]üPic3
Lbl NEW
Lbl LVL
ref(0,0,96,2)
ref(0,0,3,64)
ref(0,62,96,2)
ref(93,0,3,64)
If L=0
¾List(0)üR
¾List(0)üQ
[000000000000000000üD
[000000000000000000
[000000000000000000
[777777777777777000
[000000000000000000
[000000000000000000
[000000000000000000
[000777777777777777
[000000000000000000
[000000000000000000
[000000000000000000
[777777777777777777
5üX
5üY
93üZ
49üÁ
2üN
ElseIf L=1
¾List(0)üR
¾List(0)üQ
[000000000000000000üD
[000000000000000000
[000000000000000000
[770000000000000000
[770000000000000000
[770077000000000000
[770077000000000000
[770077007700000000
[770077007700000000
[770077007700770000
[770077007700770000
[774477447744774477
5üX
5üY
84üZ
57üÁ
4üN
ElseIf L=2
¾List(0)üR
¾List(0)üQ
[333377777777777777üD
[000000000000000000
[000000000000000000
[000777777777777000
[000700000007007000
[000700000007007000
[000000070000007000
[000000070000007000
[777777777777777000
[000000000000000000
[000000000000000000
[777777777777774444
5üX
50üY
64üZ
20üÁ
1üN
ElseIf L=3
¾List(0)üR
¾List(0)üQ
[333733333333333333üD
[000700000000000000
[000777770000000777
[000000000000000000
[000000000000000000
[000000000000000000
[000777000077700000
[000007444444444400
[000007777777777700
[777007000033000000
[000007000000000000
[000007440000004400
8üX
52üY
1üN
33üZ
45üÁ
ElseIf L=4
¾List(2,15,26,4,,3,1,71,26,3,1,1)üR
¾List(0)üQ
[777773333333333777üD
[000000000000000007
[000000000000000007
[770074444444444007
[770077777777778007
[777777777777770007
[600000000000000007
[600000000000000007
[600000000000000007
[600777777777777777
[600000000000000777
[700000000000000777
5üX
7üY
78üZ
53üÁ
2üN
ElseIf L=5
¾List(3,37,22,2,1,1,45,26,4,3,1,41,38,3,3,1)üR
¾List(0)üQ
[000000000000573377üD
[000000000000570077
[007777770000570077
[000000070000570077
[000000070007570037
[444470077777570007
[777770077777770047
[000000070000070077
[009999979900070005
[007777333300070005
[000000000000000077
[000000000000000077
15üX
4üY
88üZ
26üÁ
2üN
End
sub(MAP)

Spoiler For AGRAV:
.GRAVITER
ClrDraw
ClrDrawõ
prgmGRAVTILE
Full
Diagnos
Fix 5
Fix 3
0üL
prgmGRAVLEV
0üTüUüW
1üDüGüF
6üS
For(I,2,S)
ref(S-I/2+X,S-I/2+Y,I,I)
rref(S-I/2+X+1,S-I/2+Y+1,I-2,I-2)
sub(GO)
DispGra
Pause 300
sub(GF)
End
Repeat getKey(15)
If (W=1)
ClrDraw
ClrDrawõ
0üW
L+1üL
Goto NEW
End
sub(GO)
ref(X,Y,S,S)
rref(X,Y,S,S)
If getKey(54) and (G=0)
If (F=1)
4üF
ElseIf F=4
1üF
ElseIf F=2
3üF
ElseIf F=3
2üF
End
1üG
0üT
End
If (F=1) or (F=4)
X-getKey(2)+getKey(3)üX
Else
Y-getKey(4)+getKey(1)üY
End
sub(OFF)
sub(SID)
!If E
!If G
1üG
0üT
End
End
If G
T+1üT
T/4üV
sub(GRV)
End
ref(X,Y,S,S)
rref(X+1,Y+1,S-2,S-2)
DispGra
sub(SPK)
sub(BTN)
sub(END)
sub(GF)
Pause 20
End
Fix 2
ClrDraw
ClrHome
Return

.SUBROUTINES
.GOALON
Lbl GO
U+1üU
If (N=1) or (N=4)
Pt-On(Z,Á,8*((U/6)^4)+Pic10)
Else
Pt-On(Z,Á,8*((U/6)^4)+Pic15)
End
Return

.GOALOFF
Lbl GF
If (N=1) or (N=4)
Pt-ChanZ,Á,8*((U/6)^4)+Pic10)
Else
Pt-ChanZ,Á,8*((U/6)^4)+Pic15)
End
Return

.MAPGEN
Lbl MAP
For(I,0,11)
For(J,0,8)
{I*9+J+D}üA
Pt-On(J*10+3,I*5+2,A/16*8+Pic2)
Pt-On(J*10+8,I*5+2,A^16*8+Pic2)
If A/16=4
Pxl-On(J*10+5,I*5+3)õ
ElseIf A/16=3
Pxl-On(J*10+5,I*5+5)õ
ElseIf A/16=5
Pxl-On(J*10+4,I*5+5)õ
ElseIf A/16=6
Pxl-On(J*10+6,I*5+4)õ
End
If A^16=4
Pxl-On(J*10+10,I*5+3)õ
ElseIf A^16=3
Pxl-On(J*10+10,I*5+5)õ
ElseIf A^16=5
Pxl-On(J*10+7,I*5+5)õ
ElseIf A^16=6
Pxl-On(J*10+13,I*5+4)õ
End
End
End
For(I,1,{R})
I-1*5+1üJ
1ü{R+J+4}
If ({R+J+2}=1) or ({R+J+2}=4)
ref({R+J},{R+J+1},5,3)
rref({R+J},{R+J+1},5,3)
Else
ref({R+J},{R+J+1},3,5)
rref({R+J},{R+J+1},3,5)
End
Pt-On({R+J},{R+J+1},{R+J+2}-1*16+Pic4)
End

If (N=1) or (N=4)
ref(Z,Á,8,2)
rref(Z,Á,8,2)
Else
ref(Z,Á,2,8)
rref(Z,Á,2,8)
End
DispGra
Return

.BUTTONPRESS
Lbl BTN
For(I,1,{R})
I-1*5+1üJ
If (({R+J+2}=1) and ({R+J}-S+1÷X) and ({R+J}+5ùX) and ({R+J+1}+3=Y)) or (({R+J+2}=4) and ({R+J}-S+1÷X) and ({R+J}+5ùX) and ({R+J+1}-S=Y)) or (({R+J+2}=2) and ({R+J}-S=X) and ({R+J+1}-S+1÷Y) and ({R+J+1}+5ùY)) or (({R+J+2}=3) and ({R+J}+3=X) and ({R+J+1}-S+1÷Y) and ({R+J+1}+5ùY)) and {R+J+4}
0ü{R+(J+4)}
{R+J+3}üF
1üG
Pt-Chan{R+J},{R+J+1},{R+J+2}-1*16+Pic4)
Pt-On({R+J},{R+J+1},{R+J+2}-1*2+1*8+Pic4)
End
End
Return

.SPIKETEST
Lbl SPK
For(I,0,S-1)
If ((F=1) and pxl-TesX+I,Y+S)õ) or ((F=2) and pxl-TesX-1,Y+I)õ) or ((F=3) and pxl-TesX+S,Y+I)õ) or ((F=4) and pxl-TesX+I,Y-1)õ)
Goto DTH
End
End
Return

.DEATH
Lbl DTH
DispGra
rref(X,Y,S,S)
For(I,0,6)
sub(GO)
Pt-On(X-1,Y-1,8*I+Pic0)
DispGra
Pause 150
Pt-ChanX-1,Y-1,8*I+Pic0)
sub(GF)
End
ClrDraw
Goto LVL
Return

.ENDGAME
Lbl END
If ((N=1) and (X+1ùZ) and (X+S-9÷Z) and (Y-2=Á)) or ((N=2) and (X+S=Z) and (Y+1ùÁ) and (Y+S-9÷Á)) or ((N=3) and (X-2=Z) and (Y+1ùÁ) and (Y+S-9÷Á)) or ((N=4) and (X+1ùZ) and (X+S-9÷Z) and (Y+S=Á))
For(I,0,S-2)
sub(GO)
If (N=1)
ref(X,Y,S,S-I)
rref(X+1,Y,S-2,S-I-1)
DispGra
ref(X,Y,S,S-I)
rref(X,Y,S,S-I)
ElseIf (N=2)
ref(X+I,Y,S-I,S)
rref(X+I+1,Y+1,S-I-2,S-2)
DispGra
ref(X+I,Y,S-I,S)
rref(X+I,Y,S-I,S)
ElseIf (N=3)
ref(X,Y-I,S,S-I)
rref(X,Y+1,S-1,S-I-2)
DispGra
ref(X,Y-I,S,S-I)
rref(X,Y+1,S-1,S-I-2)
ElseIf (N=4)
ref(X,Y+I,S,S-I)
rref(X+1,Y+I+1,S-2,S-I-1)
DispGra
ref(X,Y+I,S,S-I)
rref(X,Y+I,S,S-I)
End
Pause 300
sub(GF)
End
1üW
End
Return

.OFFEDGE
Lbl OFF
0üE
For(I,0,S-1)
If F=1
pxl-TesX+I,Y+S)+EüE
ElseIf F=2
pxl-TesX-1,Y+I)+EüE
ElseIf F=3
pxl-TesX+S,Y+I)+EüE
ElseIf F=4
pxl-TesX+I,Y-1)+EüE
End
End
Return

.SIDEHIT
Lbl SID
For(I,0,S-1)
If (F=1) or (F=4)
If pxl-TesX+S-1,Y+I)
X-1üX
End
If pxl-TesX,Y+I)
X+1üX
End
Else
If pxl-TesX+I,Y)
Y+1üY
End
If pxl-TesX+I,Y+S-1)
Y-1üY
End
End
End
Return

.GRAVTEST
Lbl GRV
If V
For(I,1,V)
For(J,0,S-1)
If F=1
If pxl-TesX+J,Y+I+S-1)
Y+I-1üY
0üVüG
Return
End
End
If F=2
If pxl-TesX-I-1,Y+J)
X-IüX
0üVüG
Return
End
End
If F=3
If pxl-TesX+I+S-1,Y+J)
X+I-1üX
0üVüG
Return
End
End
If F=4
If pxl-TesX+J,Y-I-1)
Y-IüY
0üVüG
Return
End
End
End
End
End
If F=4
Y-VüY
ElseIf F=1
Y+VüY
ElseIf F=2
X-VüX
ElseIf F=3
X+VüX
End
Return
« Last Edit: January 16, 2011, 02:27:48 am by leafiness0 »
In-progress: Graviter (...)

Offline Happybobjr

  • James Oldiges
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2325
  • Rating: +128/-20
  • Howdy :)
    • View Profile
Re: Graviter - Axe
« Reply #35 on: January 16, 2011, 09:54:16 am »
it can be optimised quite a bit.

Could u copy that to word.
ctrl F
find & replace
ü  to ->
3/4 list to Data
pxl-Tes  to pxl-Test(

and so on.
It would make it easier for everyone.
School: East Central High School
 
Axe: 1.0.0
TI-84 +SE  ||| OS: 2.53 MP (patched) ||| Version: "M"
TI-Nspire    |||  Lent out, and never returned
____________________________________________________________

Offline leafy

  • Project Author
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1554
  • Rating: +475/-97
  • Seizon senryakuuuu!
    • View Profile
    • keff.me
Re: Graviter - Axe
« Reply #36 on: January 16, 2011, 10:14:57 pm »
Sorry I couldn't post them until now - I had a concert at Davies symphony hall.
Anyways, here they are.
In-progress: Graviter (...)

Offline Happybobjr

  • James Oldiges
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2325
  • Rating: +128/-20
  • Howdy :)
    • View Profile
Re: Graviter - Axe
« Reply #37 on: January 16, 2011, 10:30:12 pm »
working on it.
School: East Central High School
 
Axe: 1.0.0
TI-84 +SE  ||| OS: 2.53 MP (patched) ||| Version: "M"
TI-Nspire    |||  Lent out, and never returned
____________________________________________________________

Offline leafy

  • Project Author
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1554
  • Rating: +475/-97
  • Seizon senryakuuuu!
    • View Profile
    • keff.me
Re: Graviter - Axe
« Reply #38 on: January 16, 2011, 10:32:37 pm »
kk thankee velly much
In-progress: Graviter (...)

Offline Happybobjr

  • James Oldiges
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2325
  • Rating: +128/-20
  • Howdy :)
    • View Profile
Re: Graviter - Axe
« Reply #39 on: January 17, 2011, 12:57:56 am »
kk thankee velly much

r u wanting opt for speed or size?
School: East Central High School
 
Axe: 1.0.0
TI-84 +SE  ||| OS: 2.53 MP (patched) ||| Version: "M"
TI-Nspire    |||  Lent out, and never returned
____________________________________________________________

Offline leafy

  • Project Author
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1554
  • Rating: +475/-97
  • Seizon senryakuuuu!
    • View Profile
    • keff.me
Re: Graviter - Axe
« Reply #40 on: January 17, 2011, 01:33:57 am »
If I were to choose between speed and size, I would go for speed first. Make sure it's playable and stuff.
Thanks for taking the time to help me :D I appreciates.

EDIT: I hope to keep it well under 8000 bytes though.
« Last Edit: January 17, 2011, 01:36:59 am by leafiness0 »
In-progress: Graviter (...)

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55941
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Graviter - Axe
« Reply #41 on: January 18, 2011, 03:21:25 pm »
Good luck guys! Also feel free to ask in the Axe sub-forum if you need more help, since you might get a faster response.

Offline leafy

  • Project Author
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1554
  • Rating: +475/-97
  • Seizon senryakuuuu!
    • View Profile
    • keff.me
Re: Graviter - Axe
« Reply #42 on: January 18, 2011, 09:40:08 pm »
Hey happybobjr...I was just wondering what progress you made. Not being pushy or anything, I'm just curious.
In-progress: Graviter (...)

Offline Happybobjr

  • James Oldiges
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2325
  • Rating: +128/-20
  • Howdy :)
    • View Profile
Re: Graviter - Axe
« Reply #43 on: January 18, 2011, 09:52:51 pm »
Hey happybobjr...I was just wondering what progress you made. Not being pushy or anything, I'm just curious.

sorry, I can't be on my laptop on Monday, Wednesday, and Friday.  And I am extremely swamped with homework.



Here is what i have so far on my first scan,
« Last Edit: January 18, 2011, 09:53:28 pm by happybobjr »
School: East Central High School
 
Axe: 1.0.0
TI-84 +SE  ||| OS: 2.53 MP (patched) ||| Version: "M"
TI-Nspire    |||  Lent out, and never returned
____________________________________________________________

Offline Happybobjr

  • James Oldiges
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2325
  • Rating: +128/-20
  • Howdy :)
    • View Profile
Re: Graviter - Axe
« Reply #44 on: January 20, 2011, 06:00:54 pm »
Not much more but here...


Remember, you know your code best.  Only you can make optimizations by rewriting your engines.
School: East Central High School
 
Axe: 1.0.0
TI-84 +SE  ||| OS: 2.53 MP (patched) ||| Version: "M"
TI-Nspire    |||  Lent out, and never returned
____________________________________________________________