Author Topic: My first game  (Read 26414 times)

0 Members and 1 Guest are viewing this topic.

Offline Omegaxis213

  • LV3 Member (Next: 100)
  • ***
  • Posts: 83
  • Rating: +5/-0
    • View Profile
Re: My first game
« Reply #60 on: May 26, 2014, 11:14:36 pm »
The enemy can fight back now and now there are potions.
« Last Edit: May 26, 2014, 11:50:00 pm by Omegaxis213 »

Offline DJ Omnimaga

  • Former TI programmer
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55913
  • Rating: +3152/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • DJ Omnimaga Music
Re: My first game
« Reply #61 on: May 27, 2014, 07:39:00 am »
Cool to hear. As for saving in appvars they are the main reason why I quit Axe a few years ago and why Supersonic Ball lacks highscores. I just found the process too confusing because I always mixed up the syntax for saving with the one for reading appvars content and half of the time it wouldn't even work even with the right syntax. >.<

Offline Streetwalrus

  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3821
  • Rating: +80/-8
    • View Profile
Re: My first game
« Reply #62 on: May 27, 2014, 07:45:01 am »
Wait what ? Appvars are totally easy. It depends on whether you use archive or ram though.

Offline DJ Omnimaga

  • Former TI programmer
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55913
  • Rating: +3152/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • DJ Omnimaga Music
Re: My first game
« Reply #63 on: May 27, 2014, 07:57:52 am »
The issue is that it's easy to mix up both syntaxes so you end up swapping them by mistake and wondering for hours why your code doesn't work. In my case, I also always had the issue about reading from the wrong location and despite hours of help from Quigibo at the time, my tilemappers would never get close to working (in my case, either reading from appvar would read from the wrong location even if I pointed to the right location or my programs would just say Done when ran even with the right amount of End commands and the right shell selected, despite a full mem reset done beforehand).

A few years ago I always said this was a serious issue with the Axe language and that appvar saving/reading really needed a syntax overhaul because using the same token for two commands made things too confusing. One thing that should have been done is to not have both reading and saving use Getcalc() and have one of them use something else (maybe "SaveCalc()"?), to avoid confusion, or implement more error codes to make things easier to debug. Also another problem is that getting the commands order right in your code can be extremely tricky to remember, so the user will often put the getcalc command at the wrong location. Sadly, it is too late to change all of this because this Axe syntax has been around for 4 years and most hardcore Axe users have gotten used to it.

Offline Streetwalrus

  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3821
  • Rating: +80/-8
    • View Profile
Re: My first game
« Reply #64 on: May 27, 2014, 08:06:30 am »
Lol I never heard of these problems. It felt natural to me. :P

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 #65 on: May 27, 2014, 08:09:59 am »
Yeah, didn't really run into such problems writing reuben either <_<

So yeah, don't hesitate to ask ;)

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

Offline DJ Omnimaga

  • Former TI programmer
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55913
  • Rating: +3152/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • DJ Omnimaga Music
Re: My first game
« Reply #66 on: May 27, 2014, 08:11:15 am »
I guess it depends of the people. Just because it was easy for you doesn't mean it is for everyone else. If that was the case, then I would be pumping out Axe games non-stop since the last four years. Same reason why some people learn ASM within three weeks while others spend three years trying to learn it to no avail (or manage to do it but just don't like it)


I still think the Getcalc syntax should have been changed to something else closer to TI-BASIC or xLIB or at least how standard Axe pointers were used. But as I said, it's too late now.
« Last Edit: May 27, 2014, 08:13:04 am by DJ Omnimaga »

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 #67 on: May 27, 2014, 08:12:31 am »
It is the same with other computer languages, you just open a filestream with either read or write (or both), the function call is the same. It might be originating from that.

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

Offline DJ Omnimaga

  • Former TI programmer
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55913
  • Rating: +3152/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • DJ Omnimaga Music
Re: My first game
« Reply #68 on: May 27, 2014, 08:16:18 am »
Perhaps I guess. If that's really the case, though, then I guess the fact I have never ever wrote a single line of code in a computer language doesn't help (VB6 doesn't count, because you can write it the same way you would write unoptimized TI-83+ BASIC (without ever using a single function/external file) code and it will still work). On a side note this was my help topic 4 years ago, which was also close to my final days of Axe http://www.omnimaga.org/axe-language/map-editor-help-more-appvar-readingcreating-issues/ . This was back when Supersonic Ball was tilemap-based rather than tunnel-based.

Offline Runer112

  • Moderator
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: My first game
« Reply #69 on: May 27, 2014, 12:35:25 pm »
I still think the Getcalc syntax should have been changed to something else closer to TI-BASIC or xLIB ...

How do you interface with appvars with TI-BASIC/xLIB? I glanced at the BASIC third-party library page on the DCS wiki and couldn't see any function names that jumped out as interfacing with appvars.
« Last Edit: May 27, 2014, 12:38:56 pm by Runer112 »

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 #70 on: May 27, 2014, 12:37:09 pm »
I still think the Getcalc syntax should have been changed to something else closer to TI-BASIC or xLIB ...

How do you interface with appvars with TI-BASIC/xLIB? I glanced at the BASIC third-party library page on the DCS wiki and couldn't see any function names that jumped out as interfacing with appvars.
You can't in native basic, but like Celtic III makes it possible for you.

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 #71 on: May 27, 2014, 02:49:37 pm »
I'm adding a shop now :D . Also I really need help with Appvars....
« Last Edit: May 27, 2014, 02:55:20 pm by Omegaxis213 »

Offline Streetwalrus

  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3821
  • Rating: +80/-8
    • View Profile
Re: My first game
« Reply #72 on: May 27, 2014, 05:26:58 pm »
Go to the Axe subforum, there's a tutorial sticky that has a link to an appvar tut. ;)

Offline DJ Omnimaga

  • Former TI programmer
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55913
  • Rating: +3152/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • DJ Omnimaga Music
Re: My first game
« Reply #73 on: May 27, 2014, 06:21:21 pm »
I still think the Getcalc syntax should have been changed to something else closer to TI-BASIC or xLIB ...

How do you interface with appvars with TI-BASIC/xLIB? I glanced at the BASIC third-party library page on the DCS wiki and couldn't see any function names that jumped out as interfacing with appvars.

For example, if you want to create a game save, you just store the content you want in a list, such as L1->LSAVE. Of course you can't use appvars, but you can still create external files or read from them that way. As for reading from a save list, you do LSAVE(1) for element 1, LSAVE(2) for element 2, and so on (so you can do stuff like 18+LSAVE(2)->A).

With Celtic you can interface with appvars directly but the syntax doesn't look much better than in Axe. :P (IN axe, I think just making appvar save use a different token than appvar reading rather than have them use the same would already help).


But yeah, as Street said, if you need appvars help you might want to check the tutorial in the Axe sub-forum.
« Last Edit: May 27, 2014, 06:23:09 pm by DJ Omnimaga »

Offline Runer112

  • Moderator
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: My first game
« Reply #74 on: May 27, 2014, 07:56:15 pm »
I'm adding a shop now :D . Also I really need help with Appvars....

The best way to get whatever specific answer(s) you're looking for is to ask specific questions. :P

And sorry for this slight thread hijacking that's been going on... which I will now continue!

For example, if you want to create a game save, you just store the content you want in a list, such as L1->LSAVE. Of course you can't use appvars, but you can still create external files or read from them that way. As for reading from a save list, you do LSAVE(1) for element 1, LSAVE(2) for element 2, and so on (so you can do stuff like 18+LSAVE(2)->A).

With Celtic you can interface with appvars directly but the syntax doesn't look much better than in Axe. :P (IN axe, I think just making appvar save use a different token than appvar reading rather than have them use the same would already help).

You can basically treat external variables in Axe just like a zero-indexed, fixed-size list. For instance, if a variable's data pointer is in L, you could read the first 1-byte value with {L}, read the second 1-byte value with {1+L}, or write to the third 1-byte value with →{2+L}. You could also do the same operations, but treating the values as 2-byte values instead, about as easily: read the first 2-byte value with {L}ʳ, read the second 2-byte value with {1*2+L}ʳ, and write to the third 2-byte value with →{2*2+L}ʳ. Note that the *2 is because each element is 2 bytes.

Also, there isn't really any special command to "save" external variables, barring archiving it with Archive "appvNAME". The two primary commands for interacting with appvars are to locate existing ones, GetCalc("appvNAME"), and to create them, GetCalc("appvNAME",SIZE). The former might be used like GetCalc("appvHiScores")→S to locate a high scores appvar. If it simply held 2-byte score values, the Nth high score could be read with {N*2+S}ʳ or written with →{N*2+S}ʳ. The latter might be used like GetCalc("appvHiScores",10*2)→S to create a high scores appvar with 10 2-byte score entries, which you would commonly do if the fetch attempt returned zero for S, meaning it wasn't found.