Author Topic: random stuffs  (Read 8136 times)

0 Members and 1 Guest are viewing this topic.

Offline shmibs

  • しらす丼
  • Administrator
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2132
  • Rating: +281/-3
  • try to be ok, ok?
    • View Profile
    • shmibbles.me
random stuffs
« on: August 02, 2010, 06:07:02 pm »
just a few things i've made while bored this summer and wanted input on:
(oh, and if anyone's interested i can post source code/s)

first: 4level grayscale in axe using interrupts


second: a tilemapping method which could potentially reduce map sizes considerably

this routine checks the tiles around each tile that's being drawn and draws a different sprite accordingly. this could potentially be very useful because it would make maps much easier to read. i.e.:
normally, sprite data for a house would have to be stored like this:
[000000
[012230
[045560
[000000
using this method, though, it would look like this:
[000000
[011110
[011110
[000000
making things much simpler. furthermore, if you're using the half-byte compression method(i forget who's idea that was, but im sure you all know) then you could boost 16 tiles at your disposal to 192! alternatively you could use the first 6 bits for tile storage(boosting your total number of tiles to 768, i believe :o) and save the last two bits to indicate if that tile is a warp point or if it triggers some event, etc.(taking away the need for a second data structure for this data) of course, this mapping method is a bit slower than others, but it's still fast enough for a zelda-esque mapping system, or even a low action scroller like FF or pkmn  ;D!

third: the beginnings of my pokemon overworld walking routine with animated steps and the ability to turn in place(you guys are probably very familiar with this type of thing, but can have the code if you want nonetheless)

due to a bug in wabbitemu part of the wall seems to be missing  :P

fourth:a cute little gray drawing 'screensaver'

a free cookie for the first person to guess how i managed that without using the backbuffer ;D
« Last Edit: August 07, 2010, 01:34:37 pm by shmibs »

Offline meishe91

  • Super Ninja
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2946
  • Rating: +115/-11
    • View Profile
    • DeviantArt
Re: random stuffs
« Reply #1 on: August 02, 2010, 06:19:20 pm »
Wow, those are really cool! I would love to see the source code :) Would like to see if I can understand it. Great job though :)
Spoiler For Spoiler:



For the 51st time, that is not my card! (Magic Joke)

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: random stuffs
« Reply #2 on: August 02, 2010, 06:30:12 pm »
Those are all really neat!  The second one reminds me a bit of my PortalX tilemapping engine :) I do a similar thing where the tilemapper dynamically generates the correct tiles based on the surrounding tiles.  The 4Greyscale tilemapper looks really nice, and as well as the walking engine, although i cant quite figure out how the screensaver would work without the back buffer... Perhaps you are shifting the screen around in a circle every couple frames?

Offline meishe91

  • Super Ninja
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2946
  • Rating: +115/-11
    • View Profile
    • DeviantArt
Re: random stuffs
« Reply #3 on: August 02, 2010, 06:33:11 pm »
That's kinda what I thought at first too, or at least in some kind of shape :P
Spoiler For Spoiler:



For the 51st time, that is not my card! (Magic Joke)

Offline shmibs

  • しらす丼
  • Administrator
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2132
  • Rating: +281/-3
  • try to be ok, ok?
    • View Profile
    • shmibbles.me
Re: random stuffs
« Reply #4 on: August 02, 2010, 06:45:46 pm »
/\/\bingo/\/\ ;D
it draws to the backbuffer and then displays shifted up, down, left, and right in sequence
here's the same thing sans gray

this system actually looks pretty good on still frame pics: dithering displays as midlevel gray, resulting in psuedo 3 layer

as for the 4level that just draws two different sprites on the buffer and back buffer and then alternates between them without any of quigibo's fancy pants algorithms
Code: [Select]
:.A
:ClrDraw:DispGraph:Full:DiagnosticOff
:[5FEB7DAFF5BED7FAAF7DEB5FFAD7BEF57E83858B95ABD57EFF83878F9FBFFFFFBD7EEFD7EBF7EBFF7EFFF7EBD7EFD7FF→Pic1
:[54C025A401BC032A2A03A425803DC054→Pic2
:[7EFFFFFFFFFFFF7E→Pic3
:ClrDraw
:[01010101010101010100000000000001010000000000000101000000000000010100000000000001010000000000000101000000000000010101010101010101→Str1
:conj(Str1,L5,64:2→{rand^64+L5}:"FREQ:→Str9:0→F→C+8→A→B:Repeat getKey(54):Text(0,0,Str9:Text(20,0,F►Dec
:Pause 50:F+(2*(getKey(3))*(F<6))-(2*(getKey(2))*(F>0))→F:End
:FnInt(A,F
:FnOn :Repeat getKey(15)
:If getKey(3):A+1→AStop:End
:If getKey(2):A-1→AStop:End
:If getKey(1):B+1→BStop:End
:If getKey(4):B-1→BStop:End
:End
:FnOff :LnReg
:Return
:Lbl A
:C+1→C
:ClrDraw:For(M,0,7:For(L,0,7
:Pt-On(8*L,8*M,{8*M+L+L5}*16+(8*(C=2))+Pic1
:End:End
:Pt-On(A,B,Pic3:Pt-Change(A,B,(C=2)*8+Pic2
:DispGraph:If C=3:0→CEnd


the other one is fairly simple to make; it was the idea that i really liked

and the walking engine:
Code: [Select]
:.A
:DiagnosticOff:Full:‾1→X+1→Y→B+1→D+19→S→T
:[3C7EFFFFFF7F7EFC3C7EFFFFFFFE7E3F3C7EFFFFFFFF7EFF3C7EFFFFFFFF7EFF003C7E003A1A2058003C7E005C58041A003C423C5A5A005A003C7E0000001842→Pic2
:[FC7E1C00000000003F7E380000000000FF7E660000000000FF7E660000000000FE7C3800000000007FFE6C00000000007F7E6000000000007F7E600000000000FE7F3600000000007F3E1C0000000000FE7E060000000000FE7E060000000000400C000000000000023000000000000042240000000000005A000000000000000430000000000000026400000000000002200000000000001A000000000000004026000000000000200C00000000000040040000000000005800000000000000→Pic3
:[00000000000000000050200A04A04A04208C123A4C6A308400030F3BEBABABABFF7EBDDBE7DBBD7E00C0F0FCFFFFFFFFABABABABABABABAB7EBDDBE7DBBD7EFFFFFFFFFFFFFFFFFFABABACB0E020302A00FF708999A9700000FFEE113355EE00FFFF3F0F07040C5420202020302A3D1F7EB9C5CDD5BB8381EE113355EE0055FF040404040CB45CF83C42C3BFA7A7A77E→Pic1
:[0101010101010101010101010101010101010101→GDB1
:[0101010101010101010101010101010101010101
:[0101010101010101010101010101010101010101
:[0101010111111111111111111111111101010101
:[0101010111010101010101010101011101010101
:[0101010111010100000000000001011101010101
:[0101010111010000000000000000011101010101
:[0101010111000000000000000000001101010101
:[0101010111000202030404050202001101010101
:[0101010111000202060707080202001101010101
:[0101010111000202090A0B0C0202001101010101
:[01010101110002020D0E0F100202001101010101
:[0101010111000000000000000000001101010101
:[0101010111000000000000000000001101010101
:[0101010111111111111111111111111101010101
:[0101010101010101010101010101010101010101
:[0101010101010101010101010101010101010101
:[0101010101010101010101010101010101010101
:Repeat 0
:For(L,0,12:For(M,0,9
:{M+Y*S+L+X+GDB1}→A
:Pt-Off(8*L-4,8*M-4,8*A+Pic1
:End:End
:Pt-On(44,25,D-1*8+Pic2
:Pt-Change(44,25,D*8+24+Pic2
:Pt-On(44,33,32*B+(D-1*8)+Pic3
:Pt-Change(44,33,32*B+(D-1*8)+96+Pic3
:DispGraph
:For(L,0,6000
:If getKey(15):Goto Q:End:0→C
:If getKey(3):1→D→CEnd
:If getKey(2):2→D→CEnd
:If getKey(1):3→D→CEnd
:If getKey(4):4→D→CEnd
:End
:If getKey(3) and (D=1)
:If {Y+4*S+X+7+GDB1}<3
:X+1→XEnd:End
:If getKey(2) and (D=2)
:If {Y+4*S+X+5+GDB1}<3
:X-1→XEnd:End
:If getKey(1) and (D=3)
:If {Y+5*S+X+6+GDB1}<3
:1+Y→YEnd:End
:If getKey(4) and (D=4)
:If {Y+3*S+X+6+GDB1}<3
:Y-1→YEnd:End
:If C
:(B<2)+1→B
:Else:0→BEnd
:End
:Lbl Q
im pretty clueless when it comes to axe optimization and i made this a while ago, so tell me if you see anything obvious

EDIT: 50POSTS! IMOFFTOTHEARCADENAO!
« Last Edit: August 02, 2010, 07:24:34 pm by shmibs »

Offline meishe91

  • Super Ninja
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2946
  • Rating: +115/-11
    • View Profile
    • DeviantArt
Re: random stuffs
« Reply #5 on: August 02, 2010, 07:03:20 pm »
Did you mean to say it draws to the back-buffer? Because I thought you said it doesn't use the back-buffer ???
Spoiler For Spoiler:



For the 51st time, that is not my card! (Magic Joke)

Offline shmibs

  • しらす丼
  • Administrator
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2132
  • Rating: +281/-3
  • try to be ok, ok?
    • View Profile
    • shmibbles.me
Re: random stuffs
« Reply #6 on: August 02, 2010, 07:05:30 pm »
nice catch there, thanks =D
it draws to the buffer and then shifts
EDIT: ok, it looks like i tricked myself here... that specific screenshot is from a prog which DOES draw to the backbuffer  ::)
i made one afterwards which did not(and because of that couldnt draw on the outside rim of pixels) specifically to see if people could guess and then posted the wrong one...
also, i dont think i've posted a single thing today without going back and editing it afterwards :P
« Last Edit: August 02, 2010, 07:46:55 pm by shmibs »

Offline FinaleTI

  • Believe in the pony that believes in you!
  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1830
  • Rating: +121/-2
  • Believe in the pony that believes in you!
    • View Profile
    • dmuckerman.tumblr.com
Re: random stuffs
« Reply #7 on: August 02, 2010, 07:12:25 pm »
Nice! I would love the source for the 4-level grey, it would be extremely helpful for Pokemon TI.
The mapping engine is pretty awesome too! I might have to reference that code for a future project I have in mind. Gotta finish Nostalgia first, of course.


Spoiler For Projects:

My projects haven't been worked on in a while, so they're all on hiatus for the time being. I do hope to eventually return to them in some form or another...

Spoiler For Pokemon TI:
Axe port of Pokemon Red/Blue to the 83+/84+ family. On hold.

Spoiler For Nostalgia:
My big personal project, an original RPG about dimensional travel and a few heroes tasked with saving the world.
Coding-wise, on hold, but I am re-working the story.

Spoiler For Finale's Super Insane Tunnel Pack of Doom:
I will be combining Blur and Collision Course into a single gamepack. On hold.

Spoiler For Nostalgia Origins: Sky's Story:
Prequel to Nostalgia. On hold, especially while the story is re-worked.

Offline Raylin

  • Godslayer
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1392
  • Rating: +83/-25
  • I am a certifiable squirrel ninja.
    • View Profile
    • Ray M. Perry
Re: random stuffs
« Reply #8 on: August 02, 2010, 08:00:38 pm »
What version of Axe are you using for the animation and are you using PT-Mask()?
Bug me about my book.

Sarah: TI-83 Plus Silver Edition [OS 1.19]
Cassie: TI-86 [OS 1.XX]
Elizabeth: TI-81 [OS 1.XX]
Jehuty: TI-83 Plus Silver Edition [OS 1.19]
Tesla: CASIO Prizm







Offline shmibs

  • しらす丼
  • Administrator
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2132
  • Rating: +281/-3
  • try to be ok, ok?
    • View Profile
    • shmibbles.me
Re: random stuffs
« Reply #9 on: August 02, 2010, 08:01:53 pm »
.4 and no
EDIT:HAHA, i posted without having to go back and edit it... wait... DAMNIT =D
« Last Edit: August 02, 2010, 08:02:43 pm by shmibs »

Offline Raylin

  • Godslayer
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1392
  • Rating: +83/-25
  • I am a certifiable squirrel ninja.
    • View Profile
    • Ray M. Perry
Re: random stuffs
« Reply #10 on: August 02, 2010, 08:02:40 pm »
Oh. Okay then. Just wondering.
Really nice grayscale though.
Bug me about my book.

Sarah: TI-83 Plus Silver Edition [OS 1.19]
Cassie: TI-86 [OS 1.XX]
Elizabeth: TI-81 [OS 1.XX]
Jehuty: TI-83 Plus Silver Edition [OS 1.19]
Tesla: CASIO Prizm







Offline Hot_Dog

  • CoT Emeritus
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3006
  • Rating: +445/-10
    • View Profile
Re: random stuffs
« Reply #11 on: August 02, 2010, 08:34:52 pm »
Those are sweet

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: random stuffs
« Reply #12 on: August 06, 2010, 11:19:54 pm »
Wow that's AMAZING! Nice job on that!

Also I especially like this:

Quote
I've been thinking about writing a tilemapper in Axe that works with individual bits, either with the upcoming bit reading command or by copying portions of the map data to L3/back-buffer and pxl-testing them. It would pxl-test each side of each tile and draw the appropriate wall or floor tile in the middle. Illusiat 12, Mana Force 2, Illusiat 2004 and ROL series actually use some primitive form of what I am talking about. In their case, when drawing a wall, it checks if the map tile below is a floor then draws a different wall tile than the rest of the walls.

Offline nemo

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1203
  • Rating: +95/-11
    • View Profile
Re: random stuffs
« Reply #13 on: August 06, 2010, 11:32:03 pm »
that tilemapping program looks really cool. can you post the source code for that?


Offline FinaleTI

  • Believe in the pony that believes in you!
  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1830
  • Rating: +121/-2
  • Believe in the pony that believes in you!
    • View Profile
    • dmuckerman.tumblr.com
Re: random stuffs
« Reply #14 on: August 06, 2010, 11:49:59 pm »
Wow that's AMAZING! Nice job on that!

Also I especially like this:

Quote
I've been thinking about writing a tilemapper in Axe that works with individual bits, either with the upcoming bit reading command or by copying portions of the map data to L3/back-buffer and pxl-testing them. It would pxl-test each side of each tile and draw the appropriate wall or floor tile in the middle. Illusiat 12, Mana Force 2, Illusiat 2004 and ROL series actually use some primitive form of what I am talking about. In their case, when drawing a wall, it checks if the map tile below is a floor then draws a different wall tile than the rest of the walls.

Like what I did for Nostalgia?


Spoiler For Projects:

My projects haven't been worked on in a while, so they're all on hiatus for the time being. I do hope to eventually return to them in some form or another...

Spoiler For Pokemon TI:
Axe port of Pokemon Red/Blue to the 83+/84+ family. On hold.

Spoiler For Nostalgia:
My big personal project, an original RPG about dimensional travel and a few heroes tasked with saving the world.
Coding-wise, on hold, but I am re-working the story.

Spoiler For Finale's Super Insane Tunnel Pack of Doom:
I will be combining Blur and Collision Course into a single gamepack. On hold.

Spoiler For Nostalgia Origins: Sky's Story:
Prequel to Nostalgia. On hold, especially while the story is re-worked.