Author Topic: Metroid-like game  (Read 9913 times)

0 Members and 1 Guest are viewing this topic.

Offline Scipi

  • Omni Kitten Meow~ =^ω^=
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1547
  • Rating: +192/-3
  • Meow :3
    • View Profile
    • ScipiSoftware
Re: Metroid-like game
« Reply #15 on: September 12, 2010, 10:51:15 pm »
bytes bits nibbles yes I do know, I also know about bit operations.

Imma Cat! =^_^= :3 (It's an emoticon now!)
Spoiler For Things I find interesting:
Spoiler For AI Programming:
Spoiler For Shameless advertising:

Spoiler For OldSig:





Spoiler For IMPORTANT NEWS!:
Late last night, Quebec was invaded by a group calling themselves, "Omnimaga". Not much is known about these mysterious people except that they all carried calculators of some kind and they all seemed to converge on one house in particular. Experts estimate that the combined power of their fabled calculators is greater than all the worlds super computers put together. The group seems to be holding out in the home of a certain DJ_O, who the Omnimagians claim to be their founder. Such power has put the world at a standstill with everyone waiting to see what the Omnimagians will do...

Wait... This just in, the Omnimagians have sent the UN a list of demands that must be met or else the world will be "submitted to the wrath of Netham45's Lobster Army". Such demands include >9001 crates of peanuts, sacrificial blue lobsters, and a wide assortment of cherry flavored items. With such computing power stored in the hands of such people, we can only hope these demands are met.

In the wake of these events, we can only ask, Why? Why do these people make these demands, what caused them to gather, and what are their future plans...

Offline nemo

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1203
  • Rating: +95/-11
    • View Profile
Re: Metroid-like game
« Reply #16 on: September 13, 2010, 12:25:20 am »
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.

here's a basic program that displays a basic 5x5 tilemap:
Code: [Select]
.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 high
For(X,0,4 . 5 tiles wide
Pt-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:End
DispGraph  .This updates the screen
if you put the DispGraph into the nested for() loops, you'll notice a significant slowdown, but you'll see the drawing of the sprites 1 by 1.


Offline Quigibo

  • The Executioner
  • CoT Emeritus
  • LV11 Super Veteran (Next: 3000)
  • *
  • Posts: 2031
  • Rating: +1075/-24
  • I wish real life had a "Save" and "Load" button...
    • View Profile
Re: Metroid-like game
« Reply #17 on: September 13, 2010, 01:05:41 am »
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.

You can start on a big project if you want, but you'll want to have every important function as a subroutine so that you can work on the project step by step.  For instance, first write a routine "Draw Tile" that draws a tile and run the program to test it out.  Then, try to make a new routine "Draw Map" which calls the tile drawing routine to draw your tiles according to an array.  Then "Scroll Map" which scrolls the tile map, etc.  So as long as you keep working on smaller sections of code at a time, you might be able to manage a somewhat large project at the same time as you learn the language.  Good luck on your project!
___Axe_Parser___
Today the calculator, tomorrow the world!

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Metroid-like game
« Reply #18 on: September 13, 2010, 01:34:12 am »
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 deifnetaly 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.

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: Metroid-like game
« Reply #19 on: September 13, 2010, 01:39:58 am »
Yeah I remember I had serious trouble with them at first x.x (as well as storing to/reading from application variables). Thankfully I finally got used to them but you might want to check through some topics posted a while ago in the Axe sub-forums for them too.

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.

A large project by a beginner is possible, though. Maybe not by everyone but it can be possible by some people. tr1p1ea is one example (Desolate starting a few months after he starts learning ASM)

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: Metroid-like game
« Reply #20 on: September 13, 2010, 04:33:43 pm »
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. :)

Offline Scipi

  • Omni Kitten Meow~ =^ω^=
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1547
  • Rating: +192/-3
  • Meow :3
    • View Profile
    • ScipiSoftware
Re: Metroid-like game
« Reply #21 on: September 14, 2010, 10:33:07 pm »
Quote
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.

Thank you for the example. It helped.

Quote
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.

Thanks for the link. So pointers are something that start at the beginning of data in memory.I know about signed/unsigned and operations.

Quote
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.

I did that with a text based RPG I was making a while ago. Had one for the story, battles, store/inventory, and beastary.

Quote
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.

I don't lnow yet for enemy types. I guess Ill make that up as I go along. I definately wamt some kind of uber weapon as an easter egg. And I plan on having other easter eggs/unlockables.

Quote
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

Thank you Ill definitely look into them.

Imma Cat! =^_^= :3 (It's an emoticon now!)
Spoiler For Things I find interesting:
Spoiler For AI Programming:
Spoiler For Shameless advertising:

Spoiler For OldSig:





Spoiler For IMPORTANT NEWS!:
Late last night, Quebec was invaded by a group calling themselves, "Omnimaga". Not much is known about these mysterious people except that they all carried calculators of some kind and they all seemed to converge on one house in particular. Experts estimate that the combined power of their fabled calculators is greater than all the worlds super computers put together. The group seems to be holding out in the home of a certain DJ_O, who the Omnimagians claim to be their founder. Such power has put the world at a standstill with everyone waiting to see what the Omnimagians will do...

Wait... This just in, the Omnimagians have sent the UN a list of demands that must be met or else the world will be "submitted to the wrath of Netham45's Lobster Army". Such demands include >9001 crates of peanuts, sacrificial blue lobsters, and a wide assortment of cherry flavored items. With such computing power stored in the hands of such people, we can only hope these demands are met.

In the wake of these events, we can only ask, Why? Why do these people make these demands, what caused them to gather, and what are their future plans...

Offline meishe91

  • Super Ninja
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2946
  • Rating: +115/-11
    • View Profile
    • DeviantArt
Re: Metroid-like game
« Reply #22 on: September 14, 2010, 10:44:18 pm »
It might be easier if you plan out what you want ahead of time, that way you won't be adding or changing a bunch of stuff in the middle of development. Might save some headaches. Just a thought.
Spoiler For Spoiler:



For the 51st time, that is not my card! (Magic Joke)

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: Metroid-like game
« Reply #23 on: September 14, 2010, 11:32:46 pm »
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.

Offline nemo

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1203
  • Rating: +95/-11
    • View Profile
Re: Metroid-like game
« Reply #24 on: September 14, 2010, 11:35:53 pm »
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.

like DJ said, sprites are a good idea, but placeholders are perfectly fine. if you're using a 3 level grayscale enemy, make a 3 level grayscale enemy that took about 5-10 minutes, perfection isn't important. if you're convinced you're going to use the enemy, then perfect it/ask on the boards for someone to draw you a good enemy.


Offline Scipi

  • Omni Kitten Meow~ =^ω^=
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1547
  • Rating: +192/-3
  • Meow :3
    • View Profile
    • ScipiSoftware
Re: Metroid-like game
« Reply #25 on: September 14, 2010, 11:37:32 pm »
Thanks for the idea. I will try to do that.

Imma Cat! =^_^= :3 (It's an emoticon now!)
Spoiler For Things I find interesting:
Spoiler For AI Programming:
Spoiler For Shameless advertising:

Spoiler For OldSig:





Spoiler For IMPORTANT NEWS!:
Late last night, Quebec was invaded by a group calling themselves, "Omnimaga". Not much is known about these mysterious people except that they all carried calculators of some kind and they all seemed to converge on one house in particular. Experts estimate that the combined power of their fabled calculators is greater than all the worlds super computers put together. The group seems to be holding out in the home of a certain DJ_O, who the Omnimagians claim to be their founder. Such power has put the world at a standstill with everyone waiting to see what the Omnimagians will do...

Wait... This just in, the Omnimagians have sent the UN a list of demands that must be met or else the world will be "submitted to the wrath of Netham45's Lobster Army". Such demands include >9001 crates of peanuts, sacrificial blue lobsters, and a wide assortment of cherry flavored items. With such computing power stored in the hands of such people, we can only hope these demands are met.

In the wake of these events, we can only ask, Why? Why do these people make these demands, what caused them to gather, and what are their future plans...

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: Metroid-like game
« Reply #26 on: September 14, 2010, 11:44:47 pm »
Oh, also, feel free to use some of my Metroid sprites in Metroid II: Evolution/Expansion. Keep in mind that the following are not by me, though: Mother Brain, Kraid/Chozo, Samus and enemy 3/4. Some were converted by me from the GB game and the rest were done myself.