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

0 Members and 1 Guest are viewing this topic.

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: Grey - zContest Entry
« Reply #60 on: October 14, 2011, 02:33:37 pm »
Hayleia, what do you mean with graph function. This? :
Code: [Select]
Pt-On((12*8)-A,(J*8)+R,GetCalc("appvGreyMap",{(J*15)+12+Y+GDB1}*8+Pic2)Also which kind of  appvar? I'm not so used to the 83+. A GDB?

Appvars tutorial by FinaleTI
I learnt everything here, so it should explain better than me. Give him a lot of +1s.
By graph function I mean Y-Var (Y0-Y9)

? the problem with my method is that you need another program to create the appvar.
Or you give that prog with the game so we can create it, or you directly give the appvar with the game. But if you have the appvar creator in the game then you have the map in the game so my method is useless -.-°
? the advantage of my method is that if the map never changes, it "stays in archive" (well, it is copied to RAM but it doesn't increase the size of the game).

Spoiler For the interesting part of the tutorial:
If you simply want to read data from an archived appvar, then you could copy it to a file.

GetCalc("appvAPPVAR",File)

Where File is the token for a Y-Var (Y0-Y9).

Once the appvar is copied to a file, you can read from it like a pointer.

GetCalc("appvAPPVAR",Y0)
{Y0}?A
« Last Edit: October 14, 2011, 02:39:09 pm by Hayleia »
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

click here to know where you got your last +1s

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 #61 on: October 14, 2011, 02:48:30 pm »
Well, since my map will be so huge that it's bigger than 32k I'll have to have a file archived already that I'll add with the game.
But what kind of file?


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

Interview with me

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: Grey - zContest Entry
« Reply #62 on: October 14, 2011, 02:59:41 pm »
bigger than 32k
??? If it is bigger than 32k, you can't create it (it won't fit in your RAM). But you can split into 2 appvars ;).

But what kind of file?
An appvar is a .8xv file that contains only data.
The appvar creator should look like this (it is an example that I got from my Pokemon):

Spoiler For Spoiler:
.GETTYPE
[050000]→GDB1
[000000]
[060400]
[030A00]
[020A00]
[060000]
[0A0000]
[080200]
[070800]
[010A00]
[030807]
[020A00]
[090000]
[060500]
[040A00]
[060500]
[000000]
[070000]
[020600]
[080304]
.60 bytes of Data

.create the appvar
GetCalc("appvPokeType",60)->A

.fill it with the data
For(r1,0,59)
{GDB1+r1}→{A+r1}
End
But you'll not name your appvar PokeType -.-°
Then, at the beginning of the game you do
GetCalc("appvGreyMap",Y0) (you can name your appvar otherly, and use Y1 as well ;))
Then you access your map with the pointer Y0, so the first byte of your map is at {Y0}
« Last Edit: October 14, 2011, 03:01:21 pm by Hayleia »
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

click here to know where you got your last +1s

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 #63 on: October 15, 2011, 06:46:19 am »
bigger than 32k
??? If it is bigger than 32k, you can't create it (it won't fit in your RAM). But you can split into 2 appvars ;).

But what kind of file?
An appvar is a .8xv file that contains only data.
The appvar creator should look like this (it is an example that I got from my Pokemon):

Spoiler For Spoiler:
.GETTYPE
[050000]→GDB1
[000000]
[060400]
[030A00]
[020A00]
[060000]
[0A0000]
[080200]
[070800]
[010A00]
[030807]
[020A00]
[090000]
[060500]
[040A00]
[060500]
[000000]
[070000]
[020600]
[080304]
.60 bytes of Data

.create the appvar
GetCalc("appvPokeType",60)->A

.fill it with the data
For(r1,0,59)
{GDB1+r1}→{A+r1}
End
But you'll not name your appvar PokeType -.-°
Then, at the beginning of the game you do
GetCalc("appvGreyMap",Y0) (you can name your appvar otherly, and use Y1 as well ;))
Then you access your map with the pointer Y0, so the first byte of your map is at {Y0}
How do you edit such a file? Trough the computer or do you let an axe program create it?


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

Interview with me

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: Grey - zContest Entry
« Reply #64 on: October 15, 2011, 07:12:43 am »
How do you edit such a file? Trough the computer or do you let an axe program create it?
With an Axe prog. In the spoiler of my previous post, I gave you an example of how to create an appvar filled with data.
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

click here to know where you got your last +1s

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 #65 on: October 15, 2011, 08:45:03 am »
How do you edit such a file? Trough the computer or do you let an axe program create it?
With an Axe prog. In the spoiler of my previous post, I gave you an example of how to create an appvar filled with data.
Yes, but when I run an axe prog it must be unarchived right? And my map is so big...
Maybe I should do it like this:
First send maphalf1 to your calc. This runs and creates the appvar and archives it. Then you delete maphalf1.
Then You sent maphalf2 to your calc and do the same.
Then I sent Grey itself to the calc?


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

Interview with me

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: Grey - zContest Entry
« Reply #66 on: October 15, 2011, 09:14:30 am »
Yes, but when I run an axe prog it must be unarchived right? And my map is so big...
Maybe I should do it like this:
First send maphalf1 to your calc. This runs and creates the appvar and archives it. Then you delete maphalf1.
Then You sent maphalf2 to your calc and do the same.
Then I sent Grey itself to the calc?
Or you run maphalf1 on Wabbit, then delete it and run mapahlf2 then delete it, and extract the two appvars from Wabbit.
Then, when you release the game, you give us the game and the two appvars and say in the readme that we must archive it ;)
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

click here to know where you got your last +1s

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 #67 on: October 15, 2011, 10:27:18 am »
Aha! Thank you! I'll do it like that I think.


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 #68 on: October 18, 2011, 03:02:05 am »
Okey I scroll at 1 pixel left and right, but I think it goes too slow because drawing the whole screen EVERY frame is just slow.
* Stefan Bauwens wonders if everybody draws the whole srceen every frame?


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

Interview with me

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: Grey - zContest Entry
« Reply #69 on: October 18, 2011, 03:50:02 am »
Usually if you got a tilemap, you just draw the needed row/column of tiles. I do not know how to do that, though. Redrawing the entire screen every frame is indeed slow. Just redrawing one col/row if you got complex physics might be tricky, though, although I doubt in Grey you need to fall down/move at speeds higher than 8 pixels per frame.

Offline Wellen

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 118
  • Rating: +7/-2
    • View Profile
Re: Grey - zContest Entry
« Reply #70 on: October 18, 2011, 06:17:38 am »
Oooh great ! That's the problem I have with Lost : my maps get bigger and bigger and the game also slower because I draw the entire map every frame...

I'm currently searching for a way to draw just the rows and columns I need (so 8*12), the most tricky part is to calculate the position of the top-left corner, compared with the pointer of the map...
For the row-position : simple :
Code: [Select]
Y(incremented or decremented with getkeys 1 and 4) * (the number of columns of the entire map)->BFor the column-position : a little bit harder, I think something like
Code: [Select]
(number of columns) - X(incremented or decremented with getkeys 2 and 3)->A
and finally the location compared with the pointer could be this

Code: [Select]
{B+A+GDB0}
But I'm not sure at all, I haven't tried this on my calc yet, but you can ;)

« Last Edit: October 18, 2011, 06:24:54 am by Wellen »
-/...././/--./.-/--/.
I'm french, so please feel free to correct my bad english, it'd help me a lot ;)
Spoiler For Feat. Loulou54:
Spoiler For Projects:
Spoiler For Axe:
Ti-Lock : Lock your calc before turning it off               [XXXXXXXX--] 80%
Spoiler For Ti-Basic:
Spoiler For Soko-Ti, a sokoban game in Ti-Basic:

Spoiler For Memory:

Downloads here.

Offline Yeong

  • Not a bridge
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3739
  • Rating: +278/-12
  • Survivor of Apocalypse
    • View Profile
Re: Grey - zContest Entry
« Reply #71 on: October 18, 2011, 06:20:45 am »
What do you mean by drawing the whole map? Do you mean by drawing entire tilemap data instead of only displaying 12x8 portion of the map?
Sig wipe!

Offline Wellen

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 118
  • Rating: +7/-2
    • View Profile
Re: Grey - zContest Entry
« Reply #72 on: October 18, 2011, 06:26:14 am »
What do you mean by drawing the whole map? Do you mean by drawing entire tilemap data instead of only displaying 12x8 portion of the map?
I think so, and that's what I was doing, too ^^
-/...././/--./.-/--/.
I'm french, so please feel free to correct my bad english, it'd help me a lot ;)
Spoiler For Feat. Loulou54:
Spoiler For Projects:
Spoiler For Axe:
Ti-Lock : Lock your calc before turning it off               [XXXXXXXX--] 80%
Spoiler For Ti-Basic:
Spoiler For Soko-Ti, a sokoban game in Ti-Basic:

Spoiler For Memory:

Downloads here.

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 #73 on: October 18, 2011, 06:34:40 am »
What do you mean by drawing the whole map? Do you mean by drawing entire tilemap data instead of only displaying 12x8 portion of the map?
I mean drawing the part of the map visible on the screen(something like 13*8). But I'll see if I can use 'horizontal' and 'vertical'.


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 #74 on: October 19, 2011, 09:56:39 am »
I just display the 13*9 portion of the screen (not 12*8 for various reasons relating to smooth scrolling) every frame, and it works fine. There are different things you can do to optimize for aggressive speed at the expense of size, found here: http://ourl.ca/8520
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)