Author Topic: YAMGT  (Read 87350 times)

0 Members and 1 Guest are viewing this topic.

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 #270 on: February 26, 2011, 01:01:16 am »
AFAIK what's happening is I messed up the equations somehow and it's writing to the wrong spot in RAM.  This explains the corrupted y-vars that are created every time I created a level.
What I had tried to do was come up with formulas to draw a border around the level, since I can't rely on the screen boundaries to limit the level anymore.
Code: (Axe Source) [Select]
:...
:i and j are the top left corner of the map
:h is height
:m is width
:p in the appvar pointer
:vars count from zero
:...
:GetCalc(Str1,H+1*(M+1))→P
:For(A,0,H
:
:.1 is a solid block
:1→{P+A}
:1→{H+1*M+P+A}
:End
:For(A,0,M
:1→{M+1*A+P}
:1→{M+1*A+P+M}
:End
:
:.pre-define start and finish to avoid crashes--how ironic :P
:3→{M+1*P+1}
:4→{M+1*P+2
:End
:While getKey(54):Pause 10:End
:End
« Last Edit: February 26, 2011, 01:09:30 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: Tio
« Reply #271 on: February 26, 2011, 02:53:59 pm »
I was working on these last night, and it's not storing through random parts of the RAM anymore, but it still doesn't seem correct, as if it's drawing it up/down instead of left/right.  I also tried to view the level made by the current version in version 6 (the most recent uploaded) and the border's all screwed up, completely cut up and going through the middle of the screen.
The corners count from 1 now, btw.

This is going to take a while, seeing as it's been like a week and the border's still not working :P
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 #272 on: February 28, 2011, 02:40:21 pm »
It's working better, at least not flooding the RAM.
If this equation-refusing-to-work stuff keeps going on I'm just going to drop the border junk altogether until i have everything else done.  Call the ability to run through the RAM at random an easter egg ;)
Code: [Select]
:H*M→R
:GetCalc(Str1,R+2)→P
:H→{P}
:M→{P+1}
:P+2→P
:0→{P}
:Fill(P,R
:
:For(A,0,M-1
:
:.TOP
:1→{P+A}
:
:.BOTTOM
:1→{M-1*H+1+P+A}
:
:End
:For(A,0,H-1
:
:.LEFT
:1→{A*M+P}
:
:.RIGHT
:1→{A*M+P+M-1}
:
:End

IIRC, H (H is for Height) and M (think of an upside-down W for Width, I guess) count from 1 now.
Btw if you're curious why on earth I'm using H and M of all the vars, I was running out of letters to use and they happen to be close to another.  Better than something like D and G, anyway.
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 #273 on: March 02, 2011, 06:40:50 pm »
Sorry to hear you still have troubles getitng it to work. I hope you get it fixed soon :/
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 #274 on: March 02, 2011, 09:54:45 pm »
Thanks
What I'm focusing on is making the editor display the level right.
And ensuring it edits the level instead of the VAT.

What's strange is the scrolling from every direction displays different things.  I'd scroll a few lines off screen and when I scroll them back on it's different.
Even the initial display is wrong...and the editing doesn't work with any way it displays :P

Progress is being made, though.  There's just a ton of it to be made.
What I might do is make it so the user could select a section of it and that part of the level shows instead of bothering with scrolling around.  IDK at this point...
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 #275 on: March 03, 2011, 11:34:47 pm »
Yeah it seems like it displays stuff from a different location than intended when scrolling.
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 #276 on: March 04, 2011, 02:29:56 am »
Indeed.  I'll need to look at some other source to get ideas of how to do this properly, because whatever I try doesn't work :P
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 #277 on: March 15, 2011, 08:00:37 pm »
Ok, I've kind of lost patience putting in smoothscrolling, so I've dropped that idea for now.  Plenty of dynamic levels can be made in 384 tiles anyway.

I've been brainstorming tile ideas, and so far I have, and may or may not add:
One-way tiles (definitely)
Door/key
wall switches  (I guess like in cubes?)
Teleporters/portals
land mines?
drop-away/disappearing tiles
breakable, like if you jump on it x number of times it disappears

I'm open to more ideas.  Hopefully I can get this project back on track and some actual progress going.
Vy'o'us pleorsdti thl'e gjaemue

Ashbad

  • Guest
Re: Tio
« Reply #278 on: March 15, 2011, 08:11:21 pm »
how about moving tiles? (or actually, moving objects you can stand on :), not necessarily tiles)

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 #279 on: March 15, 2011, 08:17:34 pm »
I was thinking about that, I know it can be done but it seems it would be pretty complex.  The way the tiles are read isn't pixel-test but reading from a pointer, so I'm not sure how feasible it would be to detect something moving size-wise and speed-wise. Maybe if it were 4-pixel increments it could edit the list it's temporarily copied to, but I'm not sure if it would really be worth it except to move really fast across the screen :P
Vy'o'us pleorsdti thl'e gjaemue

Offline leafy

  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1554
  • Rating: +475/-97
  • Seizon senryakuuuu!
    • View Profile
    • keff.me
Re: Tio
« Reply #280 on: March 15, 2011, 08:22:27 pm »
Yeah, I had the same problem too, since none of my games use pixel detection.
I was thinking make a delay between when each one disappears and the next one appears to give moving room, and slow it down a bit.
In-progress: Graviter (...)

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 #281 on: March 15, 2011, 08:26:25 pm »
Yeah, or I could do it in two aspects, both mem reading and pixel detection, but I don't want to slow it down too much.

EDIT: I've fixed the random-junk-above-the-screen bug.  Now, it temporarily inserts 11 rows of emptiness above the map. (the max jump height is 10 blocks using a boost tile, and there's another row JIC)

EDIT2: Portals/teleporters/whatever you want to call them are in.  I'm debugging as of now, FSR it's only working one way :P

EDIT3: Got them working now, just had to separate into different numbers...not the most efficient way, but oh well.  More foolproof at least.
The problem was (I think) was the numbers were kind of messed up b/c of the blank 11 rows above, trying to figure out where the +264 goes and such :P
There are some detection problems tho, but it works for the most part.
« Last Edit: March 18, 2011, 10:41:08 am by Darl181 »
Vy'o'us pleorsdti thl'e gjaemue

Offline leafy

  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1554
  • Rating: +475/-97
  • Seizon senryakuuuu!
    • View Profile
    • keff.me
Re: Tio
« Reply #282 on: March 17, 2011, 01:59:56 am »
Are you using tile-based teleporters?
In-progress: Graviter (...)

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 #283 on: March 17, 2011, 02:06:38 am »
Yes.  There's a tile 1 and a tile 2 for every pair, so it's more foolproof (and feasible).
Next up is one-way tiles, which should be easy.  All I really have to do is add the tiles and edit a few If statements :P
Down tiles could be a bit tricky, tho b/c of the gravity system possibly conflicting with the one-pixel-at-a-time movement.
« Last Edit: March 18, 2011, 02:38:26 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: Tio
« Reply #284 on: March 18, 2011, 02:10:31 am »
Fixed the portals, they now work seamlessly.
Added one-way tiles completely, currently debugging wall switches.
Idk how to describe them, I guess the closest comparison are the tiles which looks like + signs in cubes, but not really the same

Now I just need to come up with some sort of 4*4 sprite meaning "invisible wall" :P

EDIT: just noticed, the # of tiles is kind of staying the same as the date...there's 17 tile types now (not counting zero) and it's the 17th as of now here.  So I guess by the end of the month I'm really going to need a more intuitive tile-selecting GUI with ~30 tile types :P

Keep the tile ideas coming , it's getting simpler to add them ;)

EDIT2:
Switches are working now, user can choose whether they default to on or off.
Also, the prog ran over the 8811 limit last night, so as of now the game and level editor have been split apart into separate programs.
Next: tiles that disappear a bit after you walk on top of them.  If I get that done fast enough, than door/key after that.
« Last Edit: March 18, 2011, 10:39:41 am by Darl181 »
Vy'o'us pleorsdti thl'e gjaemue