Author Topic: YAMGT  (Read 87360 times)

0 Members and 1 Guest are viewing this topic.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55942
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Tio
« Reply #225 on: February 14, 2011, 12:13:12 am »
Well when there aren't any relevant thread you can create a new one I guess.
Now active at https://discord.gg/cuZcfcF (CodeWalrus server)

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: Tio
« Reply #226 on: February 14, 2011, 12:21:53 am »
Which board would work better, other calc discussion and news or calc programming and support?
Vy'o'us pleorsdti thl'e gjaemue

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55942
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Tio
« Reply #227 on: February 14, 2011, 12:22:18 am »
support.
Now active at https://discord.gg/cuZcfcF (CodeWalrus server)

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: Tio
« Reply #228 on: February 14, 2011, 12:22:33 am »
kk will do
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: Tio
« Reply #229 on: February 14, 2011, 02:32:41 pm »
Tio 5.
Added:
major optimizations (thanks go to squidgetx ;D)
conveyor belt tiles
water tiles
level editor GUI change.  Now, press alpha to select tiles.
bottom row is editable
included is a format fixer to add the bottom row to the appvar

important: STIO5E is needed to compile as well as STIO5.
TIOLVLFX is source code.

Weird...it'll only accept up to three attachments :P
Screenshots in the next post.
« Last Edit: February 14, 2011, 02:34:23 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: Tio
« Reply #230 on: February 14, 2011, 02:33:41 pm »
Screenies.
Attachments above.
« Last Edit: February 14, 2011, 06:27:22 pm by Darl181 »
Vy'o'us pleorsdti thl'e gjaemue

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: Tio
« Reply #231 on: February 14, 2011, 04:24:59 pm »
Quote
Added:
major optimizations (thanks go to squidgetx )
conveyor belt tiles
water tiles
level editor GUI change.  Now, press alpha to select tiles.
bottom row is editable
included is a format fixer to add the bottom row to the appvar

Nice, the bottom row is editable ;D The Editor changes such as wrapping and not deleting the same type of blocks, did you do that too?

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: Tio
« Reply #232 on: February 14, 2011, 04:39:54 pm »
The wrapping is out, but the deleting thing I haven't gotten to yet :P
I'll make a seperate source for STIO6E which has it disabled.
Also, I've added a new thing since.   Instead of having to select the block type every time, you can put the selector over the tile, press a button, and it selects that tile type.  Much faster ;D
Also, probably not neseccary to say, but there was a sprite change.  The bouncy tiles.  I've since changed it again :P because it looked too much like the enemy tiles.

EDIT: I'm trying to do something like this now, but the conditions are different.
http://ourl.ca/7535/141835
Now, I'm going for two digits, and they'd just be appvars.
Do I have this right?
Code: [Select]
"appvTIOLVL00"?Str1
L+48?{Str1+7}
.L is level #
GetCalc(Str1)->D
.D is pointer
« Last Edit: February 14, 2011, 09:39:08 pm by Darl181 »
Vy'o'us pleorsdti thl'e gjaemue

SirCmpwn

  • Guest
Re: Tio
« Reply #233 on: February 14, 2011, 09:35:31 pm »
Text wrapping or word wrapping?  Cause I have a word wrapping routine lying around somewhere...

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: Tio
« Reply #234 on: February 14, 2011, 09:38:13 pm »
The idea is to change the contents of the string to point to a different appvar.
Also, is there a way to do this with two digits?
That or letters...when Axe references an appvar, it's case-sensitive right?  If so, I could enable up to 62 levels. uppercase letters(26)+lowercase letters(26)+numerals(10)=62

Okay, it looks like I'm doing the one-char designation.  Before, I haven't been able to get string editing working.  Hopefully this time it's different...
Actually...see poll which will be up in a bit is up now
« Last Edit: February 14, 2011, 11:32:03 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: Tio
« Reply #235 on: February 15, 2011, 01:55:48 am »
Squidgetx, I was wondering how you have this handling collision detection.  It looks like what it does is it takes a pixel in the sprite (actually, two of them, F and G being the pointers) and checks what square it's in somehow.  How is this done?
I plan on tackling smoothscrolling this week, and I can tell already that it's going to get pretty complex :P

Another thing that kind of confused me was how it detects a respawn point.  It's an If block containing InData( but the hex is only 6 chars long...
« Last Edit: February 15, 2011, 02:00:06 am by Darl181 »
Vy'o'us pleorsdti thl'e gjaemue

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55942
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Tio
« Reply #236 on: February 15, 2011, 04:43:46 am »
Tio 5.
Added:
major optimizations (thanks go to squidgetx ;D)
conveyor belt tiles
water tiles
level editor GUI change.  Now, press alpha to select tiles.
bottom row is editable
included is a format fixer to add the bottom row to the appvar

important: STIO5E is needed to compile as well as STIO5.
TIOLVLFX is source code.

Weird...it'll only accept up to three attachments :P
Screenshots in the next post.
Strange, the forum is setup to accept 10 ???. Your computer definitively have lots of issues. X.x

Also that looks nice Darl above. I like the animated tiles. However, could you explain what are the plain grey ones?
Now active at https://discord.gg/cuZcfcF (CodeWalrus server)

Offline squidgetx

  • Food.
  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1881
  • Rating: +503/-17
  • rawr.
    • View Profile
Re: Tio
« Reply #237 on: February 15, 2011, 07:15:37 am »
The plain grey ones kill you instantly :D. The thing that's really cool about them is that they actually aren't grey, they're really a 2 frame animated checkerboard tile! That's really a pretty cool way to do it, Darl, props. Also, when I post it tells me that the max number of attachments is 50 :o

Anyway. Yeah, so if you look at the code, it's basically an optimized version of
Code: [Select]
Y/4*24+(X/4)+L1->G
Y/4*24+(X+3/4)+L1->F
Basically what it does, is it reduces your pixel coordinates to tile coordinates (the divide by 4). The Y value is multiplied by 24 because that's how wide the map is (It's now treated as a simple array). I use two values to check which tile the left and right side of the character is in. And now you can add or subtract from F and G to get different tiles; eg {F+24} is like adding one row's worth, and hence one tile down.

inData is a smaller way of doing If var=something or (var=something else) I believe the line reads If inData({F}+1,[040600])? So since both values 3 and 5 are respawn points, it checks if the current tile is either 3 or 5. But the data needs to be zero-terminated, which is why I added the +1 there. (and then scaled up the appropriate values)
« Last Edit: February 15, 2011, 07:16:50 am by squidgetx »

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: Tio
« Reply #238 on: February 15, 2011, 10:27:40 am »
So that's pretty much the same as If {F}+1=3 or ({F}+1=5) ?

And about the attachments, I was using geekboy's proxy at the time, I'm pretty sure that might have had something to do with it :P

Btw, I kind of failed at my smoothscrolling attempts last night :(  It kept on pushing out random junk, and I can't seem to get the pointers right...
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: Tio
« Reply #239 on: February 15, 2011, 02:30:02 pm »
Okay, i got it somewhat better...but it still doesn't work quite right :P
This uses the [old] tio lvl for data.
Code: (attached below) [Select]
:.DTILEMPR
:[F0F0F0F000000000]→Pic0N
:[A0A0505000000000]→Pic1J
:[6040206000000000]→Pic1S
:[6040604000000000]→Pic1F
:[9000009000000000]→Pic1R
:[A050A05000000000]→Pic1D
:[000C030000000000]→Pic1W
:DiagnosticOff
:"vTIOLVL"→Str1
:GetCalc(Str1)→P
:Return!If P
:conj(P,L1,384
:0→N→O→I→J-1→E
:.I and J are coordinates of top left corner
:.N and O are tile offsets
:
:ClrDraw
:.draw init image
:For(Y,0,15
:Y*4→T
:For(X,0,23
:X*4→S
:E+1→E
:sub(DRW
:End
:End
:DispGraph
:Repeat getKey(15)
:Repeat getKey(0):End
:If getKey(54)
:ClrHome
:.display stuff
:Disp "random info",i,"I",I►Dec," J",J►Dec,i,"N",N►Dec," O",O►Dec
:While getKey(54):Pause 10:End
:End
:
:If getKey(1) xor (getKey(4))
:.vert movement
:O+getKey(4)-getKey(1)→O
:If O>>3:J-1→J:O-4→O:End
:If O<<0:J+1→J:O+4→O:End
:If getKey(4)
:.up
:Vertical +
:For(A,0,23
:A*4-N→S
:0-O→T
:J*24+I+A→E
:sub(DRW
:End
:End
:If getKey(1)
:.down
:Vertical -
:For(A,0,23
:A*4-N→S
:64-O→T
:J*24+I+A+360→E
:sub(DRW
:End
:End
:End
:
:If getKey(2) xor (getKey(3))
:.horiz movement
:N+getKey(2)-getKey(3)→N
:If N>>3:I-1→I:N-4→N:End
:If N<<0:I+1→I:N+4→N:End
:If getKey(2)
:.left
:Horizontal +
:For(A,0,15
:0-N→S
:A*4-O→T
:J*24+I+(A*24)→E
:sub(DRW
:End
:End
:
:If getKey(3)
:.right
:Horizontal -
:For(A,0,15
:96-N→S
:A*4-O→T
:J*24+I+(A+1*24)→E
:sub(DRW
:End
:End
:
:End
:DispGraph
:End
:
:
:Lbl DRW
:Pt-On(S,T,Pic0N
:Pt-Change(S,T,Pic0N
:.pt-on stuff
:!If {L1+E}-1
:Pt-On(S,T,Pic0N
:Else!If {L1+E}-2
:Pt-On(S,T,Pic1J
:Else!If {L1+E}-3
:Pt-On(S,T,Pic1S
:Else!If {L1+E}-4
:Pt-On(S,T,Pic1F
:Else!If {L1+E}-5
:Pt-On(S,T,Pic1R
:Else!If {L1+E}-6
:Pt-On(S,T,Pic1D
:Else!If {L1+E}-7
:Pt-On(S,T,Pic1W
:End
:.Return

btw I got string editing working, see poll
EDIT 8xp removed, see next page
« Last Edit: February 15, 2011, 07:01:07 pm by Darl181 »
Vy'o'us pleorsdti thl'e gjaemue