Author Topic: Grey - zContest Entry  (Read 9680 times)

0 Members and 1 Guest are viewing this topic.

Offline Stefan Bauwens

  • Creator of Myst 89 - סטיבן
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1799
  • Rating: +162/-24
  • 68k programmer
    • View Profile
    • Portfolio
Re: Grey - zContest Entry
« Reply #30 on: October 06, 2011, 12:46:25 pm »
Alright, I'm busy with making the sprite move smooth left and right. It was, but I didn't like it so I'm going to change it.
Anyway it's still gonna take a while before you guys are going to see a screenshot. Sorry.


Very proud Ticalc.org POTY winner (2011 68k) with Myst 89!
Very proud TI-Planet.org DBZ winner(2013)

Interview with me

Offline Stefan Bauwens

  • Creator of Myst 89 - סטיבן
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1799
  • Rating: +162/-24
  • 68k programmer
    • View Profile
    • Portfolio
Re: Grey - zContest Entry
« Reply #31 on: October 09, 2011, 11:31:28 am »
I still don't like how I move. See, my blocks are 8*8, but to scroll smooth I actually have to move max. 4 pixels. I must think how to do this properly and make acceleration work with it eventually.


Very proud Ticalc.org POTY winner (2011 68k) with Myst 89!
Very proud TI-Planet.org DBZ winner(2013)

Interview with me

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: Grey - zContest Entry
« Reply #32 on: October 09, 2011, 12:02:06 pm »
Inflate by 256? Or you could just have him move one pixel the first frame, two the next, and so on to four.




Offline Stefan Bauwens

  • Creator of Myst 89 - סטיבן
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1799
  • Rating: +162/-24
  • 68k programmer
    • View Profile
    • Portfolio
Re: Grey - zContest Entry
« Reply #33 on: October 09, 2011, 02:30:22 pm »
Inflate by 256? What's that?


Very proud Ticalc.org POTY winner (2011 68k) with Myst 89!
Very proud TI-Planet.org DBZ winner(2013)

Interview with me

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: Grey - zContest Entry
« Reply #34 on: October 09, 2011, 02:36:13 pm »
It's where you multiply your X- and Y-values by 256, so you can have greater precision in dealing with them. For example, if you draw the sprite with Pt-On(X/256,Y/256,Pic0), you can add 128 to X every frame and it'll look like your sprite is moving "half a pixel" per frame.

Hope that makes sense. I'm writing a tutorial on it as we speak :D

Offline Stefan Bauwens

  • Creator of Myst 89 - סטיבן
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1799
  • Rating: +162/-24
  • 68k programmer
    • View Profile
    • Portfolio
Re: Grey - zContest Entry
« Reply #35 on: October 09, 2011, 02:37:49 pm »
It's where you multiply your X- and Y-values by 256, so you can have greater precision in dealing with them. For example, if you draw the sprite with Pt-On(X/256,Y/256,Pic0), you can add 128 to X every frame and it'll look like your sprite is moving "half a pixel" per frame.

Hope that makes sense. I'm writing a tutorial on it as we speak :D
Thank you. I'll try this tomorrow.


Very proud Ticalc.org POTY winner (2011 68k) with Myst 89!
Very proud TI-Planet.org DBZ winner(2013)

Interview with me

Offline LincolnB

  • Check It Out Now
  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1115
  • Rating: +125/-4
  • By Hackers For Hackers
    • View Profile
Re: Grey - zContest Entry
« Reply #36 on: October 09, 2011, 02:39:47 pm »
Would it useful if I wrote a smooth-scrolling tutorial for Axe?

EDIT: Deep, is your tutorial on smooth-scrolling or inflation?
« Last Edit: October 09, 2011, 02:40:47 pm by buttsfredkin »
Completed Projects:
   >> Spacky Emprise   >> Spacky 2 - Beta   >> Fantastic Sam
   >> An Exercise In Futility   >> GeoCore

My Current Projects:

Projects in Development:
In Medias Res - Contest Entry

Talk to me if you need help with Axe coding.


Spoiler For Bragging Rights:
Not much yet, hopefully this section will grow soon with time (and more contests)



Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: Grey - zContest Entry
« Reply #37 on: October 09, 2011, 02:47:11 pm »
Mine's on smooth movement, so if you're writing about shifting the entire screen, go ahead :)




Offline leafy

  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1554
  • Rating: +475/-97
  • Seizon senryakuuuu!
    • View Profile
    • keff.me
Re: Grey - zContest Entry
« Reply #38 on: October 09, 2011, 03:03:52 pm »
One word of warning - 256 will be too large for a map the size of grey, and unless you use 4-byte positional values you'll get overflow.
In-progress: Graviter (...)

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: Grey - zContest Entry
« Reply #39 on: October 09, 2011, 03:06:45 pm »
Oh, that's a good point. Maybe you could have one variable for position and another whole variable for precision? 16 bits is overkill, but it should be fast.




Offline LincolnB

  • Check It Out Now
  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1115
  • Rating: +125/-4
  • By Hackers For Hackers
    • View Profile
Re: Grey - zContest Entry
« Reply #40 on: October 09, 2011, 06:25:13 pm »
You could have the player's X and Y coordinates inflated by 256, and then for each iteration of the main game loop, divide it by 256 to calculate the offset needed to display the tilemap, so the offset isn't inflated at all, but the player's coordinates are.
Completed Projects:
   >> Spacky Emprise   >> Spacky 2 - Beta   >> Fantastic Sam
   >> An Exercise In Futility   >> GeoCore

My Current Projects:

Projects in Development:
In Medias Res - Contest Entry

Talk to me if you need help with Axe coding.


Spoiler For Bragging Rights:
Not much yet, hopefully this section will grow soon with time (and more contests)



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: Grey - zContest Entry
« Reply #41 on: October 09, 2011, 07:06:11 pm »
What might work is having the large map and the large inflation, then after you divide it by 256 (or whatever the inflation is) you could artificially increase the value, based on its position in the tilemap.  Not sure how practical that would be, tho.

(myself, I haven't inflated by 256, even *64 seems like more precision than you need with such a small screen :P)
Vy'o'us pleorsdti thl'e gjaemue

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: Grey - zContest Entry
« Reply #42 on: October 09, 2011, 11:09:14 pm »
(myself, I haven't inflated by 256, even *64 seems like more precision than you need with such a small screen :P)
The reason everyone inflates by 256 is because *256 and /256 are two of the simplest operations on a Z80 processor. They're several times more optimized than 64.




Offline Stefan Bauwens

  • Creator of Myst 89 - סטיבן
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1799
  • Rating: +162/-24
  • 68k programmer
    • View Profile
    • Portfolio
Re: Grey - zContest Entry
« Reply #43 on: October 10, 2011, 04:23:11 am »
Well thanks guys. I'm planning that my player is on a fixed spot on the screen and that only the map moves. But since I'm just a  beginner to AXE, maybe this isn't the best solution? I wouldn't like no scrolling.


Very proud Ticalc.org POTY winner (2011 68k) with Myst 89!
Very proud TI-Planet.org DBZ winner(2013)

Interview with me

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: Grey - zContest Entry
« Reply #44 on: October 10, 2011, 09:44:10 am »
That shouldn't be too bad -- you just need to decide what the X and Y values mean. They might represent the X and Y coordinates of the top-left corner of the screen in terms of the larger map, in which case the player would be about 44 pixels to the right of that and 28 pixels down, or they might represent the actual position of the player.