Author Topic: My first game  (Read 48027 times)

0 Members and 5 Guests are viewing this topic.

Offline Omegaxis213

  • LV3 Member (Next: 100)
  • ***
  • Posts: 83
  • Rating: +5/-0
    • View Profile
Re: My first game
« Reply #120 on: November 16, 2014, 11:36:32 pm »
Saving coordinates would force me to create 5 more appvars which I would need to archive them all when the player exits to prevent accidental ram clears and losing data. I think I might reset the player at the beginning of the new level. Level 1 and you exit then you will return at the beginning at level 1, but if you are in Level 2 then you will return at the beginning of Level 2.

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: My first game
« Reply #121 on: November 17, 2014, 01:37:00 am »
Why 5 appvars ? ???
You know you can store several bytes in one appvar, even several times the size of a variable, right ?
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 Omegaxis213

  • LV3 Member (Next: 100)
  • ***
  • Posts: 83
  • Rating: +5/-0
    • View Profile
Re: My first game
« Reply #122 on: November 17, 2014, 08:48:49 am »
Yes but I don't know how to do that yet so for now I have to store them in several appvars.

Offline chickendude

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 817
  • Rating: +90/-1
  • Pro-Riot Squad
    • View Profile
Re: My first game
« Reply #123 on: November 18, 2014, 06:09:24 am »
Well if you ask someone can help you out :) I imagine Axe just uses the OS's routines so saving more than one variable shouldn't be any more difficult than just saving one variable.

EDIT: This is looking really great, by the way. Movement is a little slow but i love the bars and the action and everything!

Offline Omegaxis213

  • LV3 Member (Next: 100)
  • ***
  • Posts: 83
  • Rating: +5/-0
    • View Profile
Re: My first game
« Reply #124 on: November 18, 2014, 05:29:23 pm »
Well I don't know how to access the different (slots) of an appvar to store multiple data into one data, so can anyone can teach/tell me how to do it?

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: My first game
« Reply #125 on: November 18, 2014, 06:03:50 pm »
Well it's always RAM that you manipulate.
You can do 1→{L3} and 1→{L3}r but also 1→{L3+1} or 1→{L3+2}r.
Well the exact same way, after a GetCalc("appvNAME",X)→P, you can do 1→{P} and 1→{P}r (if X>1) but also 1→{P+1} or 1→{P+2}r.
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 Omegaxis213

  • LV3 Member (Next: 100)
  • ***
  • Posts: 83
  • Rating: +5/-0
    • View Profile
Re: My first game
« Reply #126 on: November 18, 2014, 06:06:41 pm »
Will it get stored back into the appvar after you close the program?

Offline parserp

  • Hero Extraordinaire
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1455
  • Rating: +88/-7
  • The King Has Returned
    • View Profile
Re: My first game
« Reply #127 on: November 18, 2014, 06:25:14 pm »
Will it get stored back into the appvar after you close the program?
If you are storing it to a pointer, yes. So basically if you want to create a new appvar if one does not exist, and archive it at the end of the program, it would go something like this:
Code: [Select]
1->{L1}:1->{L1+1}     //some initialization, if appvar doesn't exist these will not change
If GetCalc("appvDATA",Y0)    //checks to see if appvar exists and is in archive
{Y0}->{L1}                             //store data from the appvar into some free RAM
{Y0+1}->{Y0+1}
End

...Program that manipulates data in {L1} and {L1+1}...

Unarchive "appvDATA"      //unarchives it, if it doesn't exist (still) it does nothing
GetCalc("appvDATA",2)->S    //overwrites the previous appvar that may or may not have existed
{L1}->{S}                             //store data into appvar
{L1+1}->{S+1}
Archive "appvDATA"           //archives it
Return                               //ends the program

If you run this code every time the program runs, it will store the initial values (1 and 1) to the data you need if the appvar did not previously exist (running for the first time) and gets the data from the appvar if returning to a saved game. And at the end it stores the values back into the appvar and archives it.

Offline Omegaxis213

  • LV3 Member (Next: 100)
  • ***
  • Posts: 83
  • Rating: +5/-0
    • View Profile
Re: My first game
« Reply #128 on: November 18, 2014, 06:38:49 pm »
Just a question but why are you using Y0 and what is it?

Offline parserp

  • Hero Extraordinaire
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1455
  • Rating: +88/-7
  • The King Has Returned
    • View Profile
Re: My first game
« Reply #129 on: November 18, 2014, 10:07:00 pm »
Just a question but why are you using Y0 and what is it?
As far as I know it's the only way in Axe to read data from the archive, if you wanted to unarchive the appvar first, you could store it to some pointer and access it from that. But otherwise if the data is only accessible from the archive with the Y tokens. (Y0-Y9)

[somebody correct if this is wrong]

Offline Omegaxis213

  • LV3 Member (Next: 100)
  • ***
  • Posts: 83
  • Rating: +5/-0
    • View Profile
Re: My first game
« Reply #130 on: November 18, 2014, 10:14:53 pm »
It works! :D Thanks

Offline Sorunome

  • Fox Fox Fox Fox Fox Fox Fox!
  • Support Staff
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 7920
  • Rating: +374/-13
  • Derpy Hooves
    • View Profile
    • My website! (You might lose the game)
Re: My first game
« Reply #131 on: November 19, 2014, 01:22:27 am »
Just a question but why are you using Y0 and what is it?
As far as I know it's the only way in Axe to read data from the archive, if you wanted to unarchive the appvar first, you could store it to some pointer and access it from that. But otherwise if the data is only accessible from the archive with the Y tokens. (Y0-Y9)

[somebody correct if this is wrong]
That is correct, the y-vars are the archive pointers. You can't do a lot with them, like only read data via like {Y0+2} or via Copy(

THE GAME
Also, check out my website
If OmnomIRC is screwed up, blame me!
Click here to give me an internet!

Offline Omegaxis213

  • LV3 Member (Next: 100)
  • ***
  • Posts: 83
  • Rating: +5/-0
    • View Profile
Re: My first game
« Reply #132 on: November 19, 2014, 11:30:31 pm »
This is a mini update but I'm working on a skill tree which is dependent on your level. You will be able to unlock new moves and abilities by using the skill tree. Also there is a new enemy :D .

Offline Sorunome

  • Fox Fox Fox Fox Fox Fox Fox!
  • Support Staff
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 7920
  • Rating: +374/-13
  • Derpy Hooves
    • View Profile
    • My website! (You might lose the game)
Re: My first game
« Reply #133 on: November 20, 2014, 12:53:31 am »
Is it my browser or is the gif freezing pretty soon and is corrupted?
Anyways, the title screen is looking nice (alli could see x.x)

THE GAME
Also, check out my website
If OmnomIRC is screwed up, blame me!
Click here to give me an internet!

Offline Omegaxis213

  • LV3 Member (Next: 100)
  • ***
  • Posts: 83
  • Rating: +5/-0
    • View Profile
Re: My first game
« Reply #134 on: November 20, 2014, 11:02:43 pm »
Right now when I try to compile the program into the app I get a not enough rom error and after I garbage collect, it does nothing at all ???  (by nothing at all I mean it still says not enough rom space). Anyone have suggestions?
« Last Edit: November 20, 2014, 11:08:37 pm by Omegaxis213 »