Author Topic: Gravity Guy  (Read 29284 times)

0 Members and 2 Guests are viewing this topic.

Offline Freyaday

  • The One And Only Serial Time Killing Catboy-Capoeirista-Ballerino
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1970
  • Rating: +128/-15
  • I put on my robe and pixel hat...
    • View Profile
Re: Gravity Guy
« Reply #30 on: September 19, 2011, 11:01:36 am »
Wow. That looks epic.
* Freyaday needs to work on making his programs prettier.
In other news, Frey continues kicking unprecedented levels of ass.
Proud member of LF#N--Lolis For #9678B6 Names


I'm a performer at heart; I stole it last week.
My Artwork!

Offline LincolnB

  • Check It Out Now
  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1115
  • Rating: +125/-4
  • By Hackers For Hackers
    • View Profile
Re: Gravity Guy
« Reply #31 on: September 19, 2011, 08:12:26 pm »
Squidgetx, you or leafiness should totally write some kind of tutorial or thread on how to make l33t calculator graphics and animations.
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 Freyaday

  • The One And Only Serial Time Killing Catboy-Capoeirista-Ballerino
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1970
  • Rating: +128/-15
  • I put on my robe and pixel hat...
    • View Profile
Re: Gravity Guy
« Reply #32 on: September 20, 2011, 12:39:30 am »
Yes, plz!
Like, design tips or something, and also Open The Damn Menu Factor* (coined by a Disney DVD menu designer, not I)

*OTDMF puts an upper limit on your transitions. It doesn't matter how epic the transition is if it takes half a minute.
In other news, Frey continues kicking unprecedented levels of ass.
Proud member of LF#N--Lolis For #9678B6 Names


I'm a performer at heart; I stole it last week.
My Artwork!

Offline squidgetx

  • Food.
  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1881
  • Rating: +503/-17
  • rawr.
    • View Profile
Re: Gravity Guy
« Reply #33 on: September 21, 2011, 10:36:07 pm »
Done. I may make changes to it later.

I gotta finish up these levels and get a release out soon :* maybe this weekend after I finish up a couple of essays...

Offline squidgetx

  • Food.
  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1881
  • Rating: +503/-17
  • rawr.
    • View Profile
Re: Gravity Guy
« Reply #34 on: September 25, 2011, 02:18:46 pm »
Almost ready for a release. I opted out of the powerup thing since the game is too easy with it on ;)

I'm going to try and compress some of the data so I can get some more levels, but idk how...I'll look at Iambian's pucrunch axiom and/or write my own RLE routines...

Offline LincolnB

  • Check It Out Now
  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1115
  • Rating: +125/-4
  • By Hackers For Hackers
    • View Profile
Re: Gravity Guy
« Reply #35 on: September 25, 2011, 07:02:35 pm »
I am excited to play this game.
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 squidgetx

  • Food.
  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1881
  • Rating: +503/-17
  • rawr.
    • View Profile
Re: Gravity Guy
« Reply #36 on: September 26, 2011, 05:20:11 pm »
I am excited to play this game.
I still need to edit some of the levels, but I'm really almost done.

Question to you guys: would you rather have this game be like
1) Psyche: built in default levels with custom suuport (file size ~9k)
2)Heald's Super Mario: no built in levels custom support (file size ~4k + 5k levelpack)
3)Levels built in no custom support

And, I need help with compression. I have no idea how to practically write an oncalc RLE routine (how do you know how big the output file is?) and I don't know how to program on a computer LOL


Offline ztrumpet

  • The Rarely Active One
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5712
  • Rating: +364/-4
  • If you see this, send me a PM. Just for fun.
    • View Profile
Re: Gravity Guy
« Reply #37 on: September 26, 2011, 05:33:39 pm »
Question to you guys: would you rather have this game be like
1) Psyche: built in default levels with custom suuport (file size ~9k)
2)Heald's Super Mario: no built in levels custom support (file size ~4k + 5k levelpack)
3)Levels built in no custom support
Way 1 all the way. :D

Offline LincolnB

  • Check It Out Now
  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1115
  • Rating: +125/-4
  • By Hackers For Hackers
    • View Profile
Re: Gravity Guy
« Reply #38 on: September 27, 2011, 10:08:01 am »
Definitely the first one.

Also, BuilderBoy wrote a good tutorial on RLE, here it is:


Map data format:
The data uses run length encoding for comression.  Lets say we had a simple map:

11111000001111
00000222220000

Pretty simple, each number representing a different tile.  With normal storage this would take
a single byte per tile.  Or we could represent the data in a different way:

150514052504

Seems much smaller, but what does it mean?  lets insert some imaginary commas and dashes to make
it easier:

1-5,0-5,1-4,0-5,2-5,0-4

Now you may or may not be able to see how the data is represented.  The first segment is 1-5, or 5 '1's in
a row, followed by 0-5, or five '0's in a row, and so on.  This is how the data in run length encoding is
represented.  And to further the compression (or confusion), each #-# segment is packed into a single byte.
Instead of two hex digits to represent a number from 0-255, we will have 2 hex digits, each from 0-15,
representing the two numbers of each #-# element.

The first Hex digit 0 to 15 is the tile number.  The second hex digit is the number of tiles to add to the
tilemap.  The digit goes from 0-15, but 0 doesnt make much sense, since that would mean this element doesnt
do anything :P, so we will add one to this after we decompress it so that it has a range of 1 to 16. 

There is a small disadvantage that if you have empty spaces of 17 or more in a row, it will take more than
1 byte to represent in the code.





[Data]->GDB1         //map data to GDB1
[tileData]->Pic1      //tile data for tilemap

0->N            //element index for map data
0->I            //map index for storing tile data

While I>=96         //until we have stored all tiles
{GBD+N}->A         //Take the first element of the map data
N+1->N            //Increment the map index
A^16->B            //spit the map element into it
A/16->A               two seperate elements

For(F,0,B         //fill the map from current position I to I+B
A->{L1+I}         //could be optimised with Fill but i couldnt get it
I+1->I            //working :/
End

End            //End while


After this code is run, the tile data will be decompressed into L1, as folows

0  1  2  3  4  5  6
7  8  9  10 11 12 13...

ect, it will be in a straigt line, but you will have to access it using your own routine.  Something like this

{Y*W+X+L1}

where W is the width in tiles of your map.  X and Y would be the tile coordinates starting at the top left at
0,0.


Displaying the map:

here is a rudimentary program that should be run right after the pervious decompressing program:

For(X,0,11      //loop through the entire screen coordinates with tiles of 8x8
For(Y,0,7
{Y*12+X+L1}->A      //retrieve the correct tile from the data in L1
Pt-On(X*8,Y*8,A*8+Pic1   //draw the sprite to the screen
End
End


...hope he doesn't mind my posting it here.
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 aeTIos

  • Nonbinary computing specialist
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3915
  • Rating: +184/-32
    • View Profile
    • wank.party
Re: Gravity Guy
« Reply #39 on: September 27, 2011, 11:42:32 am »
Epic game.
Also I'm for external levels only.
« Last Edit: September 27, 2011, 11:43:18 am by aeTIos »
I'm not a nerd but I pretend:

Offline squidgetx

  • Food.
  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1881
  • Rating: +503/-17
  • rawr.
    • View Profile
Re: Gravity Guy
« Reply #40 on: September 27, 2011, 03:28:40 pm »
buttfredkin: I already know what RLE is, I just can't think of a practical way to make an on-calc compressor. Namely, how do you know how large the output is going to be? I think I'm going to have to do something rather inefficient: make the output file 1024 bytes (the size of an uncompressed map) and then keep track of the file size as the data is compressed...and then use memkit or write my own routine to change the final size of the file.

Once the data is compressed I imagine the engine+compressed levels will only be around 6 or 7k of data :P

Ashbad

  • Guest
Re: Gravity Guy
« Reply #41 on: September 27, 2011, 04:11:02 pm »
... Namely, how do you know how large the output is going to be? ...

... Perhaps just make a two pass system, the first pass to evaluate the data for the output size, the second for compression?  Isn't that kind of the standard approach?

Offline leafy

  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1554
  • Rating: +475/-97
  • Seizon senryakuuuu!
    • View Profile
    • keff.me
Re: Gravity Guy
« Reply #42 on: September 27, 2011, 06:03:32 pm »
I think its feasible - everytime you compress a block it turns inyo a byte, so just increment a counter as you go along.
In-progress: Graviter (...)

Offline LincolnB

  • Check It Out Now
  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1115
  • Rating: +125/-4
  • By Hackers For Hackers
    • View Profile
Re: Gravity Guy
« Reply #43 on: September 27, 2011, 06:39:41 pm »
buttfredkin: I already know what RLE is, I just can't think of a practical way to make an on-calc compressor. Namely, how do you know how large the output is going to be? I think I'm going to have to do something rather inefficient: make the output file 1024 bytes (the size of an uncompressed map) and then keep track of the file size as the data is compressed...and then use memkit or write my own routine to change the final size of the file.

Once the data is compressed I imagine the engine+compressed levels will only be around 6 or 7k of data :P

My bad. All I read was RLE Compression, and I thought, oh, BuilderBoy knows how to do that. :)

... Namely, how do you know how large the output is going to be? ...

... Perhaps just make a two pass system, the first pass to evaluate the data for the output size, the second for compression?  Isn't that kind of the standard approach?

I'm with Ashbad here. That sounds like the right approach to me.
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 Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Gravity Guy
« Reply #44 on: September 27, 2011, 06:49:49 pm »
Alternatively, you could compress the data into a free buffer like L1, and then afterwards, create your appvar to the right size and copy it in.  Still kinda a 2 pass system, but a different type ^^.