Author Topic: Dimension  (Read 6478 times)

0 Members and 1 Guest are viewing this topic.

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: Dimension
« Reply #15 on: February 19, 2011, 04:53:51 am »
I mean for example, you can go through black and light gray, then if you swap layers, you can go through light gray and dark gray, then swapping again lets you go through dark gray and black, and so on. But you could just have it so you can go through white all the time and black remain solid all the time. It would be easier too.

Offline ztrumpet

  • The Rarely Active One
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5712
  • Rating: +364/-4
  • If you see this, send me a PM. Just for fun.
    • View Profile
Re: Dimension
« Reply #16 on: February 19, 2011, 11:39:19 am »
This looks really nice.  I hope it develops into a full-fledged game. ;D

Offline squidgetx

  • Food.
  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1881
  • Rating: +503/-17
  • rawr.
    • View Profile
Re: Dimension
« Reply #17 on: February 19, 2011, 11:41:31 am »
Lol, can't wait to see what this ends up turning into...

Offline Darl181

  • «Yo buddy, you still alive?»
  • CoT Emeritus
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3408
  • Rating: +305/-13
  • VGhlIEdhbWU=
    • View Profile
    • darl181.webuda.com
Re: Dimension
« Reply #18 on: February 19, 2011, 03:15:57 pm »
Yeah, I'm not exactly sure quite yet.  I'm doing this so I know what I'm doing when I attempt smoothscrolling in Tio so I have a "big finish" instead of a big crash.*
And I still can't figure out how to make the physics work.... I might just borrow the system from Jetpack or something...

*and I look at this post after it's posted and notice the overuse of "I" :P

Also, apparently it wasn't clear to some people so read the edit http://ourl.ca/9258
hopefully this clears up any confusion.
« Last Edit: February 19, 2011, 04:17:36 pm by Darl181 »
Vy'o'us pleorsdti thl'e gjaemue

Offline Darl181

  • «Yo buddy, you still alive?»
  • CoT Emeritus
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3408
  • Rating: +305/-13
  • VGhlIEdhbWU=
    • View Profile
    • darl181.webuda.com
Re: Dimension
« Reply #19 on: February 19, 2011, 10:51:44 pm »
Ok, I've pretty much driven myself beyond frustration trying to get this to work.  I fix one error, and another sprouts in its place.  What's wrong with this code ???

This program is attached at the first post.
Code: (SDMNSN) [Select]
:.DMENSION
:DiagnosticOff
:[0000000000000000]→Pic1
:[FFFFFFFFFFFFFFFF]
:[FC84B4B484FC0000]→Pic2
:0→D→I→J
:4→N+1→O
:rand→E
:E/256→J
:E-(J*256)→I
:ClrDraw
:ClrDrawr
:For(Y,0,7
:Y*8→T
:For(X,0,11
:X*8→S
:Pt-Off(S,T,{E+D}^3/2*8+Pic1
:Pt-Off(S,T,{E+D+32768}^3/2*8+Pic1)r
:D+1→D
:End
:End
:0→D→W
:Repeat getKey(15)
:If getKey(48)
:E+32768→E
:Normal
:While getKey(48):DispGraphrr:End
:Full
:End
:If getKey(3)
:Z-2→Z
:End
:If getKey(2)
:Z+2→Z
:End
:Z-(Z>>6)+(Z<<‾6)→Z
:If getKey(54) and (D)
:6→θ
:End
:W+1→W
:!If W-2
:0→W
:Z-(Z>>0)+(Z<<0)→Z
:θ+1→θ
:End
:O+θ→O
:If O>>0
:J-1→J
:O-8→O
:End
:If O<<‾7
:J+1→J
:End
:N+Z→N
:If N>>0
:N-8→N
:I-1→I
:End
:If N<<‾7
:N+8→N
:I+1→I
:End
:
:.they're unoptimized, at least temporarily, for readability
:.top left
:29-O/8+J*256+(45-N/8+I)+E→P
:
:.top right
:29-O/8+J*256+(51-N/8+I)+E→Q
:
:.bottom left
:35-O/8+J*256+(45-N/8+I)+E→U
:
:.bottom right
:35-O/8+J*256+(51-N/8+I)+E→V
:
:.look at letter locations of PQUV and FGKL on keypad
:
:.if block pointed to is "on" or "off"
:P^3/2→F
:Q^3/2→G
:U^3*2→K
:V^3/2→L
:
:If F or (G)
:O-(θ<<‾2)→O
:‾θ→θ
:End
:If K or (L)
:If θ<<2 and (θ>>‾2)
:0→θ+1→D
:‾5→O
:Else
:‾θ//2→θ
:O+1→O
:End
:Else
:0→D
:End
:If G or (L)
:N-(Z>>2)→N
:‾Z//2→Z
:End
:If F or (K)
:N+(Z<<‾2)→N
:‾Z//2→Z
:End
:ClrDraw
:ClrDrawr
:For(B,0,8
:B*8+O→T
:For(A,0,12
:A*8+N→S
:Pt-Off(S,T,{J*256+I+(B*256+A)+E}^3/2*8+Pic1
:Pt-Off(S,T,{J*256+I+(B*256+A)+E+32768}^3/2*8+Pic1)r
:End
:End
:Pt-Change(45,29,Pic2
:Pt-Change(45,29,Pic2)r
:Normal
:DispGraphrr
:Full
:End

I'm going to keep trying to figure this out, but at this rate...
« Last Edit: February 20, 2011, 03:11:10 am by Darl181 »
Vy'o'us pleorsdti thl'e gjaemue

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: Dimension
« Reply #20 on: February 23, 2011, 01:21:47 am »
Sorry to hear about the bugs, maybe you can also ask in the Axe section if no one sees this?

Also are the files attached to the first post updated since my last reply?

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Dimension
« Reply #21 on: February 23, 2011, 01:23:58 am »
Hmmm so what is this code supposed to do?  And what is the problem with it?  What are some of the variables and what do they mean?  Which sections of code do what?

Offline Darl181

  • «Yo buddy, you still alive?»
  • CoT Emeritus
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3408
  • Rating: +305/-13
  • VGhlIEdhbWU=
    • View Profile
    • darl181.webuda.com
Re: Dimension
« Reply #22 on: February 23, 2011, 01:30:37 am »
About the bugs, I might have to.  I don't put too much weight on this, though...it's kind of a side project.  Though, the sooner it's finished the better I guess :P

And the files in the first post haven't been updated, mainly b/c I have no idea what's wrong with this...catch 22 I guess.

I'm thinking it's just the physics system not detecting if it's on the ground, but I'm not sure.  If/when I decide I can't figure this out, I'll ask about it in the axe thread.  I prefer to learn things by myself if possible, that was how I figured out tilemapping (TWHG).

@Builder look at the screenie you'll see what's wrong. :P
« Last Edit: February 23, 2011, 01:31:44 am by Darl181 »
Vy'o'us pleorsdti thl'e gjaemue

Offline Darl181

  • «Yo buddy, you still alive?»
  • CoT Emeritus
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3408
  • Rating: +305/-13
  • VGhlIEdhbWU=
    • View Profile
    • darl181.webuda.com
Re: Dimension
« Reply #23 on: February 24, 2011, 02:43:57 pm »
Ok, it's working slightly better now, I just have to figure out why it's going left on its own:P
Code: [Select]
:.DMENSION
:Full
:DiagnosticOff
:[0000000000000000]→Pic1
:[FFFFFFFFFFFFFFFF]
:[FC84B4B484FC0000]→Pic2
:0→D→I→J→Z→θ
:‾4→N+1→O
:rand→E
:E/12→J
:E-(J*12)→I
:ClrDraw
:ClrDrawr
:0→D→Q
:Repeat getKey(15)
:If getKey(48)
:E+32768→E
:Normal
:While getKey(48):DispGraphrr:End
:Full
:End
:
:If getKey(47)
:ClrHome
:Disp "Z",Z►Dec,i,"θ",θ►Dec
:While getKey(47):Pause 10:End:Repeat getKey(47):End
:End
:
:0→V
:If pxl-Test(46,35)+pxl-Test(51,35)
:0→θ+1→V
:O-(O^8)+1→O
:End
:Q+1→Q
:!If -6
:→Q
:!If V
:θ-1→θ
:End
:End
:!If θ-6:5→θ:End
:!If θ+6:‾5→θ:End
:If V
:-1→θ
:If getKey(54)
:-1→W→V+2→θ
:End
:End
:If θ<256
:For(A,0,θ
:ReturnIf getKey(15)
:If pxl-Test(46,29)+pxl-Test(51,29)
:O+(O^8)→O
:0→θ
:End
:End
:End
:
:If getKey(2)
:If pxl-Test(46,30)+pxl-Test(46,35)
:Else
:N+1→N
:End
:End
:If getKey(3)
:If pxl-Test(51,30)+pxl-Test(51,35)
:Else
:N-1→N
:End
:End
:O+θ→O
:
:If O>>0
:J-1→J
:O-8→O
:End
:If O<<‾7
:J+1→J
:O+8→O
:End
:If N>>0
:N-8→N
:I-1→I
:End
:If N<<‾7
:N+8→N
:I+1→I
:End
:ClrDraw
:ClrDrawr
:0→H
:For(B,0,8
:B*8+O→T
:For(A,0,12
:A*8+N→S
:Pt-Off(S,T,{J*12+I+E+H}^3/2*8+Pic1
:Pt-Off(S,T,{J*12+I+E+H+32768}^3/2*8+Pic1)r
:H+1→H
:End
:End
:Pt-Change(45,29,Pic2
:Pt-Change(45,29,Pic2)r
:Normal
:DispGraphrr
:Full
:End
(yay, I remembered to not put it in a spoiler this time w00t)

While falling down, it jumps to the left for some reason.
You might also notice that i switched to pixel testing, I kind of ran out of patience in that aspect...

btw yes, in the screenie there's only one layer showing.  It reads properly, that's just an empty part of the RAM.
« Last Edit: February 24, 2011, 02:49:10 pm by Darl181 »
Vy'o'us pleorsdti thl'e gjaemue

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: Dimension
« Reply #24 on: February 25, 2011, 10:08:06 pm »
Hmm weird, something's definitively overwriting the horizontal directional variable there or is wrong with horizontal direction/acceleration code. X.x

Offline Darl181

  • «Yo buddy, you still alive?»
  • CoT Emeritus
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3408
  • Rating: +305/-13
  • VGhlIEdhbWU=
    • View Profile
    • darl181.webuda.com
Re: Dimension
« Reply #25 on: February 26, 2011, 12:52:09 am »
Just noticed something in the code as I was going through it...
Code: [Select]
:If N>>0
:N-8→N
:I-1→I
:End
:If N<<-7
:N+8→N
:I+1→I
:End
This, I think, is the source of the problem, b/c I made the blocks into comments and it worked somewhat properly, just messing up the physics system horribly.  That doesn't explain why it happens so often though...
I'm working on it.

After I get this working enough, I can safely use the concepts in Tio (after I get the editor working :P)...so close...
Vy'o'us pleorsdti thl'e gjaemue

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: Dimension
« Reply #26 on: February 28, 2011, 03:36:54 pm »
I see. Good luck! X.x
* DJ_O hopes a new version comes out soon :D

Offline Darl181

  • «Yo buddy, you still alive?»
  • CoT Emeritus
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3408
  • Rating: +305/-13
  • VGhlIEdhbWU=
    • View Profile
    • darl181.webuda.com
Re: Dimension
« Reply #27 on: March 01, 2011, 02:47:48 pm »
If you want a buggy, potentially unsafe version then sure :P
I'm kind of flipping between this and Tio, and Tio is kind of the larger project, so...
What's kind of confusing about this is trying to come out with a width that won't make the program bug, b/c it reads from the RAM, which is, so to speak, infinite because it just loops.  256 didn't work, 12 bugged, so did 24.  This is actually kind of interesting, confusing, and frustrating at the same time  ???
Vy'o'us pleorsdti thl'e gjaemue

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: Dimension
« Reply #28 on: March 03, 2011, 04:56:58 am »
Lol ok, I hope you get it fixed soon. Remember you can ask in the Axe forum for help if you need any.