0 Members and 1 Guest are viewing this topic.
.AXE .This is the header, it describes the program's title. periods denote comments in axe.[0101010101->GDB1 .GDB1 points to the beginning of the hex data.[0101000101 .GDB1+5 would retrieve the first byte of this line, because it is 5 bytes after the start of the data.[0100020001[0101000101[0101010101[0000000000000000]->Pic1 .this is 8 bytes defining an 8 pixel by 8 pixel white square, which Pic1 points to.[FFFFFFFFFFFFFFFF] . this is an 8x8 black square.[3C7EFFFFFFFF7E3C] .This is a black circle represented by hex data.For(Y,0,4 . 5 tiles highFor(X,0,4 . 5 tiles widePt-On(X*8,Y*8,{Y*5+X+GDB1}*8+Pic1.Y*5 is a vertical offset. when Y = 0, the byte retrieved by the curly braces {} is in the first line we defined..When Y=1, 5 is added to the offset, meaning the byte retrieved is now in the second row..X is the horizontal offset. You'll notice in our defined data, the values range from 0 to 2..Since Pt-On takes a pointer to an 8x8 sprite (which is 8 bytes of data), we multiply by 8..this means that if the byte in the tilemap is 0, the sprite displayed is the 8 bytes after Pic1. which is a white square..If the byte in the tilemap is 1, the sprite displayed is the 8 bytes after Pic1+8, which is a black square..and lastly, if the byte in the tilemap is 2, the sprite displayed is 8 bytes after Pic1+16, or the black circle.End:EndDispGraph .This updates the screen
here are some basic ideas about axe:data is generally defined as hex in [] brackets. [112233010203] defines 6 bytes of data in hexadecimal with the decimal equivalents 17,34,51,1,2,3. data can be defined with the command Data(). Data(17,34,51,1,2,3) is equivalent to [112233010203]. note that you cannot define a number greater than 255 with this method. though, Data(256r) would work, but it would also take up 2 bytes in memory.pointers are central to axe. for example, [112233010203]->GDB1. GDB1 is a pointer to the start of the 6 bytes of data. you can access a certain byte of data at a pointer by using {} braces. so {GDB1} = 17. {GDB1+1} = 34, and so on. variables A-Z + theta are pointers. they are 2 bytes, therefore hold values 0-65535. if you subtract 1 from 0, you get 65535. if you add 3 to 65534, you get 1. rarely if ever do you use curly braces {} with just A-Z or theta inside.
The largest semantic obstacle when learning axe is Pointers. If you've never programed in a language that uses pointers before, you might have a hard time getting used to it. The Wikipedia article about them is good, but its pretty technical and most of the examples are with C syntax. The second important thing to be aware of is the difference between signed and unsigned numbers, operations, and what you can actually store in the built in variables which are 16-bit integers instead of floats. Once you get past those 2 things, you'll start having a lot of fun because you get a lot of power, some times too much when it causes ram clears or freezes, so be sure to use it responsibly and archive/backup anything important.
To add to Quigibo comment on making your project in parts, if possible, I recommend still splitting your games in multiple files (and backing up regularly even on a computer or flash drive) even once you are very used to Axe. This makes it easier to scroll through code and data.
This sounds interesting! What are you planning in terms of enemies and items and weapons and features? And as the others have said, Axe has similar syntax but some of the concepts are definetaly new. If you have never coded a platformer before i definetaly recommend playing around in whatever language you plan to use and figure out how you are going to get your physics to work.
This sounds like a cool project. Good luck on it, as well as learning Axe. If you want, feel free to look through the source to Axe Snake and Spider (click the ticalc banner in my sig to find them). I hope you learn Axe and make this game, and many more. Smiley
True. I had all game events for Metroid written on paper somewhere, like boss orders, items, where energy tanks may be, an idea of where each map sectors are located. It's also a good idea to get some tiles/sprites before starting but not too many eithers, since you may not use them all.