Omnimaga

Calculator Community => TI Calculators => Axe => Topic started by: Eeems on March 20, 2010, 02:29:56 am

Title: [tutorial] Program Flow - Platformer
Post by: Eeems on March 20, 2010, 02:29:56 am
Code is outdated, but the ideas behind it is not
Index
Preface
Program flow can sometimes be one of thetoughest challenges when programming. In Axe it can still be a problem,especially with the buffers.
This is a short guide on how to setup your program so that it is easyto handle and relativly quick.
*Note - this is for AXE programs only, butyou can take some of what you learn and apply it to xLib/Celtic IIIprograms.
Structure
the basic structure I find  Issometimes the hardest to come up with, but a good one for platformergames is as follows:
Initialize sprites and variables
store 'map' or screen to back buffer
repeat getkey(15) and (other checks
all drawing things here, like animations
draw sprites that are constant
dispGraph
recallpic
X axis collision check
X axis movement code
Y axis collision check
Jump check
gravity/jump action
End
return
routines
I will go more in depth tomorrow on each section.
Initializesprites and variables
Sprites and variables are a no brainer.Everybody will have to initialize them at some time, so why not do itright at the start? The easiest way to do it is to store all thecharacter sprites to one location, and all the enemy sprites toanother, and then all the other sprites to yet, another.
[sprite data->Pic1
[sprite data->Pic2
[sprite data->Pic3
This is the usual setup for sprites, and it works quite well. Pic1 willstore all the standard sprite data for the character and can be calledby:
A*8+Pic1
where A is the sprite you want to call starting at 0.
You can also just change the sprite calling to exact numbers, so:
Pic1        sprite 0
Pic1+8       sprite 1
Pic1+16      sprite 2
Pic1+24      sprite 3
    ...etc...

You will then want to initialize the other variables. So there are"real" variables and then pointers. "Real" variables will be easy youjust store the value to it.
0->X
0->Y
10->Z
Storing to pointers is kind of hard compared to that. You can store itin a few different ways. You can just do the standard:
10->{L1
Then there is the harder to use:
[data->GDB1
conj(GDB1,L1,size)
This is a lot harder to use due to how it is stored.
Store 'map' or screen to back buffer
This can be kind of hard, you can eitherdraw it manually or you can just use a map type engine to draw usingsprites.

Map data format:

The data uses run length encoding for compression.  Lets say we had a simple map:
11111000001111
00000222220000
Pretty simple, each number representing a different tile.  With normal storage this would takea 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 makeit 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 ina row, followed by 0-5, or five '0's in a row, and so on.  This is how the data in run length encoding isrepresented.  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 thetilemap.  The digit goes from 0-15, but 0 doesnt make much sense, since that would mean this element doesntdo anything , 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 than1 byte to represent in the code.

Decompressing the Map:

[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 separate elements

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

End //End while
After this code is run, the tile data will be decompressed into L1, as follows
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 at0,0.

Displaying the map:

here is a rudimentary program that should be run right after the previous 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
Also attached is a PEDIT program to create and compress maps into a Hex String into Str1, as well as an Axe program to decompress and display them.  Just put the string data into GDB1
Repeatgetkey(15) and (other checks
This is the core of the program, the<body> tag if you will. All your checks to see if thegame has ended go here in this format:
getkey(15) and (check 0 and (check 1 and(check 2
The easiest way is to make a variable your game end flag, I usually useF, and do all your checks in the loop.
Animations/Sprites
All animation code should be put before thescreen is updated as well as all the sprite code. The most basic onewould be to just display theenemy and the character.
pt-change(X,Y,Pic1
pt-change({L1},{L1+1},Pic2
Updatingthe Screen
Next You want to update the screen and thenprepare if for collision detection.
DispGraph
RecallPic
If you store the map to the back-buffer then you will want to recall itso that you can use pixel-based collision detection.
CollisionCheck
The easiest way to do collision check in apixel-based way is to check one pixel off of the side:
0->Z
0->V
0->S
0->T
For(A,0,7
Z+pxl-test(X-1+A,Y)->Z
V+pxl-test(X+8+A,Y)->V
S+pxl-test(X,Y-1+A)->S
T+pxl-test(X,Y+8+A)->T
End
Zwill return the amount of pixels on on the left of the character, Vreturns on the right, S above, and T below. the way to return where the pixels are would be:
0->Z
0->V
0->S
0->T
For(A,0,7
Z+(8-A*(pxl-test(X-1+A,Y)))->Z
V+(8-A*(pxl-test(X+8+A,Y)))->V
S+(8-A*(pxl-test(X,Y-1+A)))->S
T+(8-A*(pxl-test(X,Y+8+A)))->T
End
This will return 1 if the first pixel tested is on, 2 if the second, 3if the third, etc. This can be good for detecting slopes.
Gravityand Jumping
Now there are many different way's to dogravity, but the easiest way is to apply a constant force in onedirection.
Y+(!collision)->Y
yourcharacter will fall until you a collision is detected, creating theeffect of gravity. Jumping is harder, you have to have a jump variablewhich changes as your jump progresses.
!If J
10*(getkey(4) and (collision))-J
Else
J-1->J
End
Y+(2*(!collision and (J)))->Y
Ifthe ground beneath you is solid, and J is 0 and you are pressing the upkey then 10 will be stored to J. If  J !=0 then it willdecrement.If J !=0 then your character will move up two pixels.  twopixelscompensates for the gravity so in reality you move down one pixel and uptwo, which balaces out to 1 pixel up.
End/Returnand Routines
Thelast part of your code will include and End statement to end the loopand then whatever closing code you want. then you will place all yourroutines due to the fact that it is the logical place to place them :)
Conclusion
In this tutorial I have taught you how toset up your program flow easily for platformer games in AXE. Soremember anything involving animation or sprites should go before thedispGraph command and everything involving movement should be after it.
Title: Re: [tutorial] Program Flow - Platformer
Post by: DJ Omnimaga on March 20, 2010, 02:34:49 am
mhmm that might be useful, because sometimes I have no clue about the best order for my code x.x

Btw can we post here?

And 6000th post for me on the new forums :P
Title: Re: [tutorial] Program Flow - Platformer
Post by: trevmeister66 on March 20, 2010, 03:00:53 am
Very nice start and layout. I'm looking forward to reading more.
Title: Re: [tutorial] Program Flow - Platformer
Post by: Eeems on March 20, 2010, 03:07:07 am
Thanks! Don't worry, any new additions I'll add to the first post.
Title: Re: [tutorial] Program Flow - Platformer
Post by: ztrumpet on March 20, 2010, 02:39:22 pm
That looks great Eeems!  That's the general layout I use too. ;D

Congratz DJ! O0
Title: Re: [tutorial] Program Flow - Platformer
Post by: Eeems on March 20, 2010, 03:46:35 pm
updated the look I'll post more later today.
also thanks ztrumpet :)
EDIT: added new section
Title: Re: [tutorial] Program Flow - Platformer
Post by: Will_W on March 20, 2010, 04:37:46 pm
It's often helpful to make a flowchart.  I use Dia for that.
(http://i863.photobucket.com/albums/ab195/WillW101/ParserDiagram-1.png)
The core of my BASIC parser by the way.
Title: Re: [tutorial] Program Flow - Platformer
Post by: Eeems on March 20, 2010, 04:39:16 pm
True, but this is a good way for people to get started. Also, I have added another section.
Title: Re: [tutorial] Program Flow - Platformer
Post by: Quigibo on March 20, 2010, 04:50:40 pm
You should get used to having the number come before the sprite.

Instead of doing:
Pic1+(A*8

Do this:
A*8+Pic1

It saves 2 bytes in the compiled code since you don't need the parenthesis.  Same thing with lists.  You can even extend it to 3 dimensions.  Say you need to reference an 8x8x8 grid:

Instead of doing this:
L1+(X*64)+(Y*8 )+Z

You can do this:
X*8+Y*8+Z+L1

Notice the multiplication distributes which even further reduces the code since powers of 2 are more optimized when they're smaller.


EDIT:  By the way, the routine for copying memory from one place to another is conj(source,destination,bytes to copy)  So your example would be conj(GDB1,L1,#)
Title: Re: [tutorial] Program Flow - Platformer
Post by: Eeems on March 20, 2010, 04:51:56 pm
Thanks I'll fix that :)
Title: Re: [tutorial] Program Flow - Platformer
Post by: jsj795 on March 20, 2010, 04:54:18 pm
-post deleted due to quigobo's edit-
Title: Re: [tutorial] Program Flow - Platformer
Post by: Eeems on March 20, 2010, 06:02:33 pm
oh right :) thanks Quigobo.
also, adding a few more sections
Title: Re: [tutorial] Program Flow - Platformer
Post by: Gale on March 20, 2010, 06:45:14 pm
that was great!!! exactly what i needed to know for making a platformer under axe!!! i gave you a +1 thumbs up P:, but i wish i could give more!
Title: Re: [tutorial] Program Flow - Platformer
Post by: Eeems on March 20, 2010, 06:51:00 pm
Thanks :) I still have two more sections to add, but they are inconsequential :) hope it helps a lot :) I actually am using this on a project I'm working one, which is what gave me idea to write it.

EDIT: added some cooler styling :P
Title: Re: [tutorial] Program Flow - Platformer
Post by: Gale on March 20, 2010, 07:05:23 pm
i have a question. for the gravity and jumping section, what would you put in (collision)? sorry, i'm kinda new to platformers
Title: Re: [tutorial] Program Flow - Platformer
Post by: Eeems on March 20, 2010, 07:07:33 pm
you would use the collision detection from before, so T would contain the collision.

EDIT: Added the rest of it, hope you like it!
Title: Re: [tutorial] Program Flow - Platformer
Post by: DJ Omnimaga on March 20, 2010, 11:49:46 pm
wow your tutorial is looking more and more nice now :)

I'll be sure to read it a few times once done :)
Title: Re: [tutorial] Program Flow - Platformer
Post by: Eeems on March 21, 2010, 12:24:55 am
Thanks! Well it's pretty much done now, I just need a few routines and then I might write a little more. Also, i'm so glad I am an admin so I can do that with [html] tags, or else it would have never looked the way it does :p I might package a help file if I ever make enough tutorials.
If anybody wants a tutorial on something, suggest it and I might make it.
Title: Re: [tutorial] Program Flow - Platformer
Post by: DJ Omnimaga on March 21, 2010, 12:48:52 am
true, HTML tags can be good sometimes ^^

Title: Re: [tutorial] Program Flow - Platformer
Post by: Eeems on March 21, 2010, 01:15:47 am
Yeah it was very helpful :p
Title: Re: [tutorial] Program Flow - Platformer
Post by: ztrumpet on March 21, 2010, 10:59:00 am
That looks great Eeems!  I can't wait to read it! ;D
Title: Re: [tutorial] Program Flow - Platformer
Post by: Builderboy on March 21, 2010, 11:24:52 am
Hey that looks really nice!  I can whip up some map maker code, but without Decimal numbers data manipulation it might look kind of convoluted/hard to read?  What were you thinking?
Title: Re: [tutorial] Program Flow - Platformer
Post by: Eeems on March 21, 2010, 03:22:18 pm
Thanks!
Well I was kind of thinking just a basic, read from L1 the map data using your data compression method. You can write up a tutorial on how to use it and I'll put it in there. I guess it would be best to put the easiest to understand one in there.
Title: Re: [tutorial] Program Flow - Platformer
Post by: DJ Omnimaga on March 21, 2010, 03:24:45 pm
how many tiles at once in a map can be used by this compression method?
Title: Re: [tutorial] Program Flow - Platformer
Post by: Builderboy on March 21, 2010, 03:37:03 pm
Up to 16 with my current compression method, but you could double it without much loss of compression.  I'll get working on the tutorial real quick like
Title: Re: [tutorial] Program Flow - Platformer
Post by: DJ Omnimaga on March 21, 2010, 03:46:47 pm
Doesn't sound too bad, altough my maps would need to not be too complex (at least, not as complex as Reuben Quest forests x.x)

You should maybe post a tutorial and have Eeems edit the HTML for it
Title: Re: [tutorial] Program Flow - Platformer
Post by: Eeems on March 21, 2010, 04:11:45 pm
Yeah just post the tutorial and I'll edit it to use the HTML and add it to the first post.
Title: Re: [tutorial] Program Flow - Platformer
Post by: DJ Omnimaga on March 21, 2010, 04:15:34 pm
I had thoughts about enabling HTML for staff before but that might mean more risks of accidentally messing up, noticing a post located in the Trash Bin subforum earlier (that I removed) x.x, staff would need to make sure to only use hTML when absolutely needed, like tutorials, and test their stuff first, in case
Title: Re: [tutorial] Program Flow - Platformer
Post by: Eeems on March 21, 2010, 04:23:12 pm
Yeah, I did all my development with komposer and tested it with firefox first. Actually, my system is pretty good for using in any tutorial, you can just change the images/colors to suite your needs. All it uses is a little CSS to define all the <div>'s that I use to seperate the content.
Title: Re: [tutorial] Program Flow - Platformer
Post by: _player1537 on March 21, 2010, 04:36:36 pm
also I noticed:


0->Z
0->V
0->S
0->T
For(A,0,7
Z+(8-A*(pxl-test(X-1+A,Y)))->Z
V+(8-A*(pxl-test(X+8+A,Y)))->Z
S+(8-A*(pxl-test(X,Y-1+A)))->S
T+(8-A*(pxl-test(X,Y+8+A)))->T
End


should one of those lines store to V instead?

(also I couldn't put the code in code brackets because it wouldn't show the bold correctly)
Title: Re: [tutorial] Program Flow - Platformer
Post by: Eeems on March 21, 2010, 06:40:42 pm
oops thanks, the V one should store to V
Title: Re: [tutorial] Program Flow - Platformer
Post by: Gale on March 21, 2010, 06:55:26 pm
oops thanks, the V one should store to V

you made the same mistake in the other part of that section too :P
and thanks again for this awesome guide!
Title: Re: [tutorial] Program Flow - Platformer
Post by: Eeems on March 21, 2010, 06:58:02 pm
lol oops x.x
np :)
Title: Re: [tutorial] Program Flow - Platformer
Post by: Builderboy on March 22, 2010, 10:43:19 pm
Map data format:
The data uses run length encoding for comression.  Lets say we had a simple map:

Code: [Select]
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:

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

Code: [Select]
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.

Decompressing the Map:

Code: [Select]
[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

Code: [Select]
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

Code: [Select]
{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:

Code: [Select]
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



Also attached is a PEDIT program to create and compress maps into a Hex String into Str1, as well as an Axe program to decompress and display them.  Just put the string data into GDB1
Title: Re: [tutorial] Program Flow - Platformer
Post by: Eeems on March 22, 2010, 11:41:05 pm
Edit, thanks. I'll add it in.
Title: Re: [tutorial] Program Flow - Platformer
Post by: Builderboy on March 22, 2010, 11:45:58 pm
Woot, although it would be nice if for the code segments there were line breaks between each line :) it would make it a bit easier to read.
Title: Re: [tutorial] Program Flow - Platformer
Post by: Eeems on March 22, 2010, 11:55:10 pm
Lol, np, already done :p and I know I didn't end the code segment in the right place...but it's so hard to edit that post on my iPod x.x I don't want to go through tat again, I'll fix it tomorrow.
Title: Re: [tutorial] Program Flow - Platformer
Post by: Builderboy on March 22, 2010, 11:56:18 pm
Ah, yeah that would be hell.  It looks good though :) html and all ^^
Title: Re: [tutorial] Program Flow - Platformer
Post by: Eeems on March 23, 2010, 12:06:11 am
It was x.x
thanks :) hmm, I should do a tutorial on how to make that type of HTML :p just some simple css styling of <div> blocks :p
Title: Re: [tutorial] Program Flow - Platformer
Post by: ikemike on March 23, 2010, 06:57:59 pm
Can somebody make a basic platformer using this code? If I had an premade example to work from, it'd help my comprehension of the tutorial.
Title: Re: [tutorial] Program Flow - Platformer
Post by: Eeems on March 23, 2010, 07:03:41 pm
Sure, I'll do that.
Title: Re: [tutorial] Program Flow - Platformer
Post by: DJ Omnimaga on March 23, 2010, 07:27:30 pm
mhmm it might be a good idea to have an example, actually, with maybe a screenshot. Some people are more visual. (like me)
Title: Re: [tutorial] Program Flow - Platformer
Post by: Gale on March 23, 2010, 07:31:34 pm
Sure, I'll do that.
thank you :D i was thinking the exact same thing as DJ and ikemike
Title: Re: [tutorial] Program Flow - Platformer
Post by: Eeems on March 23, 2010, 07:40:25 pm
yeah, I'll get on it :)
Title: Re: [tutorial] Program Flow - Platformer
Post by: jsj795 on March 24, 2010, 03:02:43 pm
Can somebody make a basic platformer using this code? If I had an premade example to work from, it'd help my comprehension of the tutorial.
I'm actually working on BASIC platformer. look at the TLM post. I can also post the movement program, and even attach it if you want
Title: Re: [tutorial] Program Flow - Platformer
Post by: Gale on March 24, 2010, 04:33:21 pm
I'm actually working on BASIC platformer. look at the TLM post. I can also post the movement program, and even attach it if you want
BASIC, or Axe basic?
Title: Re: [tutorial] Program Flow - Platformer
Post by: jsj795 on March 24, 2010, 04:36:55 pm
just BASIC. do you want Axe basic, or BASIC?
Title: Re: [tutorial] Program Flow - Platformer
Post by: Gale on March 24, 2010, 04:38:23 pm
well, this thread IS in the axe parser section, but personally i wouldn't mind a plain basic one. good to build on the platform making skills in basic before i move onto axe probably
Title: Re: [tutorial] Program Flow - Platformer
Post by: jsj795 on March 24, 2010, 04:46:02 pm
Can somebody make a basic platformer using this code? If I had an premade example to work from, it'd help my comprehension of the tutorial.

lol i misunderstood this post... I thought he was asking for BASIC platformer, but it really was the basic platformer game using this CODE... haha oh well, I can post BASIC version in another topic^^
Title: Re: [tutorial] Program Flow - Platformer
Post by: Gale on March 24, 2010, 05:08:22 pm
okay! i can't wait :D the main problem i have comprehending is how implementing AI into games would work. i got movement and everything else mostly down

EDIT: 100th post!!!!!!
Title: Re: [tutorial] Program Flow - Platformer
Post by: DJ Omnimaga on March 24, 2010, 11:11:05 pm
Yeah AI is the difficult part. Zelda DLQ uses very basic AI for enemies. All they do is moving slowly towards you.
Title: Re: [tutorial] Program Flow - Platformer
Post by: Eeems on March 25, 2010, 12:37:52 am
Yeah it can be a problem...I might make a tutorial for how to make AI's when I get the time...I usually just have really simple AI's that just move back and forth. Although I will make one that is an exact copy of the users code just with random numbers instead of keytests.
Title: Re: [tutorial] Program Flow - Platformer
Post by: DJ Omnimaga on March 25, 2010, 11:56:38 pm
at the moment I am thinking about attempting collision detection from list-based maps, so I have more freedom in what kind of tile I can choose (since pxl-test collision detection still has its limitations). I don't think I'll attempt slopes yet, though
Title: Re: [tutorial] Program Flow - Platformer
Post by: Eeems on March 26, 2010, 12:04:40 am
You can have a lot more freedom. I was too lazy to try and code one though :p but this works fine and I can code into a list all my objects.
Title: Re: [tutorial] Program Flow - Platformer
Post by: _player1537 on March 26, 2010, 12:55:46 am
can someone explain the second collision detection section, my logic seems to be failing at it.  to me it seems like it would store 8 to Z if the first pixel tested is true, and since it adds to the number then if the first pixel were on and another one was on, then it would return a different number.  I could just be misinterpreting it, also great tutorial
Title: Re: [tutorial] Program Flow - Platformer
Post by: Eeems on March 26, 2010, 09:18:20 am
Yes that's it. So you can test for specifics. It's how I do ramps. Thanks
Title: Re: [tutorial] Program Flow - Platformer
Post by: meishe91 on July 17, 2010, 06:11:18 pm
Hey Eeems, have you thought about updating the tutorial for the new versions of Axe? I just wasn't sure if there was any syntax or anything that has been outdated.
Title: Re: [tutorial] Program Flow - Platformer
Post by: Eeems on July 17, 2010, 11:42:52 pm
Hmm, I guess I could take a look..although I don't think there was many changes...if you see any please go ahead and let me know.
Title: Re: [tutorial] Program Flow - Platformer
Post by: Deep Toaster on July 18, 2010, 01:39:55 am
The only change that could affect it as far as I can see are the Axe tokens. Not much changed in the commands themselves (which is a good thing :)).
Title: Re: [tutorial] Program Flow - Platformer
Post by: meishe91 on July 18, 2010, 02:53:45 am
Ah ok. I just looked through and saw syntax and wasn't sure how much would have changed is all. Thanks :)
Title: Re: [tutorial] Program Flow - Platformer
Post by: Eeems on July 18, 2010, 04:28:21 pm
Ah ok good :) well..I could do a little fancy coding and let you choose which format you would prefer :)
Title: Re: [tutorial] Program Flow - Platformer
Post by: meishe91 on July 18, 2010, 07:55:26 pm
Haha it's your tutorial, do what you want :P
Title: Re: [tutorial] Program Flow - Platformer
Post by: mrmprog on July 20, 2011, 12:13:00 am
YES! Eeems, I have been making a simple platformer as my first axe game and progress was stalled because my code order was wacky. Your guide explains this perfectly, thank you!
Title: Re: [tutorial] Program Flow - Platformer
Post by: Eeems on July 20, 2011, 12:55:08 am
YES! Eeems, I have been making a simple platformer as my first axe game and progress was stalled because my code order was wacky. Your guide explains this perfectly, thank you!
I'm glad it could help :D Maybe I should make another tutorial about something soon since they are fun to make :)
Title: Re: [tutorial] Program Flow - Platformer
Post by: mrmprog on July 20, 2011, 01:18:31 am
You should make another simple axe tutorial. I could use one :)
Title: Re: [tutorial] Program Flow - Platformer
Post by: Eeems on July 20, 2011, 01:37:27 am
Hmm, this has actually made me pic up axe again :P
I'll see if I see something that I think needs a tutorial :)
Title: Re: [tutorial] Program Flow - Platformer
Post by: ZippyDee on July 20, 2011, 01:43:50 am
Wow, this is actually a pretty great tutorial! I'm gonna try this out! Program flow is something I've always struggled with.
Title: Re: [tutorial] Program Flow - Platformer
Post by: Eeems on July 20, 2011, 02:02:12 am
Wow, this is actually a pretty great tutorial! I'm gonna try this out! Program flow is something I've always struggled with.
Thanks :) I had been making a lot of platform engines when I made that so I was pretty confident in a good method of how to do it :P
I'm usually pretty good at figuring out a good program flow when I have to ( IMHO ), hmm maybe I'll post some more tutorials on the same thing ( program flow ) but for different types of gametypes.
Title: Re: [tutorial] Program Flow - Platformer
Post by: ZippyDee on July 20, 2011, 02:10:00 am
hmm maybe I'll post some more tutorials on the same thing ( program flow ) but for different types of gametypes.
That would be so awesome! I'm not an organized person, so organizing my code and program flow is really the hardest thing for me.
Title: Re: [tutorial] Program Flow - Platformer
Post by: mrmprog on July 20, 2011, 02:49:25 am
hmm maybe I'll post some more tutorials on the same thing ( program flow ) but for different types of gametypes.
That would be so awesome! I'm not an organized person, so organizing my code and program flow is really the hardest thing for me.
Me too. I hate it when collision detection dies because stuff is in the wrong order, or when movement freaks out on you.
Title: Re: [tutorial] Program Flow - Platformer
Post by: Eeems on July 20, 2011, 03:08:14 am
hmm maybe I'll post some more tutorials on the same thing ( program flow ) but for different types of gametypes.
That would be so awesome! I'm not an organized person, so organizing my code and program flow is really the hardest thing for me.
hmm maybe I'll post some more tutorials on the same thing ( program flow ) but for different types of gametypes.
That would be so awesome! I'm not an organized person, so organizing my code and program flow is really the hardest thing for me.
Me too. I hate it when collision detection dies because stuff is in the wrong order, or when movement freaks out on you.
ok I'll try my best to come up with some more soon :)
Title: Re: [tutorial] Program Flow - Platformer
Post by: mrmprog on July 20, 2011, 04:14:50 am
Did someone make an example program for this?