Author Topic: Nostalgia - An Axe RPG  (Read 148975 times)

0 Members and 1 Guest are viewing this topic.

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: Nostalgia - My Axe Parser Contest Entry
« Reply #270 on: October 01, 2010, 10:29:05 pm »
Darn Opera browser sucks so bad at rendering CODE tags on SMF boards x.x

ANyway gonna give this a try later :D

Oh, was that the really, really long line problem? :P

And wow, that is a lot of code. I'll try to help if I can.




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: Nostalgia - My Axe Parser Contest Entry
« Reply #271 on: October 01, 2010, 10:33:53 pm »
Yeah it was that problem, which Opera have yet to fix despite my bug reports...

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: Nostalgia - My Axe Parser Contest Entry
« Reply #272 on: October 01, 2010, 10:37:00 pm »
What causes the problem? Maybe it was meant to do that? :?




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: Nostalgia - My Axe Parser Contest Entry
« Reply #273 on: October 01, 2010, 11:29:54 pm »
Not sure. It started doing that starting on Opera 10.6x

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: Nostalgia - My Axe Parser Contest Entry
« Reply #274 on: October 02, 2010, 04:54:49 am »
The main optimization I see you should do here is subroutine-ize more of your code.  Even simple operations like adding 2 variables together can become subroutines if they're used really often.  For instance, I see a lot of reference to K+V in the code.  Loading a variable takes 3 bytes and adding is another byte so that's 7 bytes each time you use it.  A subroutine however is always 3 bytes.  So if you used the expression K+V in your code 50 times (which seems like the case here) you save 4 bytes for each call which saves almost 200 bytes from your program with this simple one:

Code: [Select]
:Lbl KV
:Return K+V

^ By the way, this is valid syntax now to put a return before an expression.  It was something I added in 0.4.5 so that you can do it all on one line instead of having the return on the next line.

You can do similar optimizations to other often-used expressions.  The cost of using a subroutine is 1 byte for the extra "return" and then a savings of original size minus 3 each subsequent time its used.  It turns out that if a routine is more than 7 bytes and used even just twice, you still get a size optimization to subroutine it.  7 breaks even (but of course is more optimized if it were used 3 or more times instead of just twice):

Original: 7 bytes used 2 times = 14 bytes
Subed: 3 bytes for each call to subroutine, called 2 times = 6 bytes + subroutine itself (7 bytes) = 13 bytes + return (1 bytes) = 14 bytes

Also, here is a more optimized "Length of Numbers"
Code: [Select]
:.Length of Numbers
:Lbl LN
:r1>=10+(r1>=100)+(r1>=1000)+(r1>=10000)→Y
:Return
« Last Edit: October 02, 2010, 04:58:05 am by Quigibo »
___Axe_Parser___
Today the calculator, tomorrow the world!

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: Nostalgia - My Axe Parser Contest Entry
« Reply #275 on: October 02, 2010, 09:52:13 am »
Mhmm nice, Quigibo. Your language does a bit like the TI-81 when it comes to sub-routines, except with the 81 it was with sub-programs ;D

On the 81, just using an additional program took zero space so you could use a sub-program to save space just with Disp "" in them and you still managed to save 2 bytes.

Offline FinaleTI

  • Believe in the pony that believes in you!
  • Project Author
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1830
  • Rating: +121/-2
  • Believe in the pony that believes in you!
    • View Profile
    • dmuckerman.tumblr.com
Re: Nostalgia - My Axe Parser Contest Entry
« Reply #276 on: October 26, 2010, 02:58:56 pm »
* FinaleTI casts Arise on this topic

Well, I decided to pick this up again, since I've gotten some work done on Pokemon and I'll be finishing Collision Course soon (hopefully).
There probably won't be any new screenies and such for a little bit, because I'm busy optimizing. With a little work I just managed to shave about 195 bytes off the menu, and I haven't even fully implemented one of the sub() optimizations I started. (See Quigibo's post if you're wondering what I mean)
I'm sure I can find some more optimizations, and when I finish, I'll probably post the code again, in case I missed something that someone else might catch.


Spoiler For Projects:

My projects haven't been worked on in a while, so they're all on hiatus for the time being. I do hope to eventually return to them in some form or another...

Spoiler For Pokemon TI:
Axe port of Pokemon Red/Blue to the 83+/84+ family. On hold.

Spoiler For Nostalgia:
My big personal project, an original RPG about dimensional travel and a few heroes tasked with saving the world.
Coding-wise, on hold, but I am re-working the story.

Spoiler For Finale's Super Insane Tunnel Pack of Doom:
I will be combining Blur and Collision Course into a single gamepack. On hold.

Spoiler For Nostalgia Origins: Sky's Story:
Prequel to Nostalgia. On hold, especially while the story is re-worked.

ASHBAD_ALVIN

  • Guest
Re: Nostalgia - My Axe Parser Contest Entry
« Reply #277 on: October 26, 2010, 03:03:27 pm »
Looking cool so far from the earlier screenshots!  I saw this many months ago when I signed up for Omnimaga, but didn't ever post.  Keep up the good 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: Nostalgia - My Axe Parser Contest Entry
« Reply #278 on: October 26, 2010, 03:10:47 pm »
GLad to see this is not dead :)

Just make sure to not fall into the "Endless loop of rewriting code" though, that some coders felt into in the past, killing their project. Optimizing is good, though.

I hope this gets finished because I've been looking forward for this since the start. :)

Offline FinaleTI

  • Believe in the pony that believes in you!
  • Project Author
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1830
  • Rating: +121/-2
  • Believe in the pony that believes in you!
    • View Profile
    • dmuckerman.tumblr.com
Re: Nostalgia - My Axe Parser Contest Entry
« Reply #279 on: October 26, 2010, 03:18:36 pm »
Yeah, I don't plan on rewriting the code right now, unless there's a way to do something in a much smaller size.

I just noticed another good optimization, too. Hurrah for inData()!


Spoiler For Projects:

My projects haven't been worked on in a while, so they're all on hiatus for the time being. I do hope to eventually return to them in some form or another...

Spoiler For Pokemon TI:
Axe port of Pokemon Red/Blue to the 83+/84+ family. On hold.

Spoiler For Nostalgia:
My big personal project, an original RPG about dimensional travel and a few heroes tasked with saving the world.
Coding-wise, on hold, but I am re-working the story.

Spoiler For Finale's Super Insane Tunnel Pack of Doom:
I will be combining Blur and Collision Course into a single gamepack. On hold.

Spoiler For Nostalgia Origins: Sky's Story:
Prequel to Nostalgia. On hold, especially while the story is re-worked.

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: Nostalgia - My Axe Parser Contest Entry
« Reply #280 on: October 26, 2010, 04:05:00 pm »
Nice :D. I heard that this command had a bug, though, according to Nemo. You might want to check the IRC logs, though, because I forgot what it was...

Offline FinaleTI

  • Believe in the pony that believes in you!
  • Project Author
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1830
  • Rating: +121/-2
  • Believe in the pony that believes in you!
    • View Profile
    • dmuckerman.tumblr.com
Re: Nostalgia - My Axe Parser Contest Entry
« Reply #281 on: October 26, 2010, 04:37:31 pm »
I checked, but he never specified what was wrong with it. I just implemented it according to Quigibo's examples and it seems to work perfectly for me. But to be on the safe side, I only commented out the old Ifs.  ;)

Edit: I just checked, and the two lines I changed shaved off about 206 more bytes. ;D
« Last Edit: October 26, 2010, 05:08:39 pm by FinaleTI »


Spoiler For Projects:

My projects haven't been worked on in a while, so they're all on hiatus for the time being. I do hope to eventually return to them in some form or another...

Spoiler For Pokemon TI:
Axe port of Pokemon Red/Blue to the 83+/84+ family. On hold.

Spoiler For Nostalgia:
My big personal project, an original RPG about dimensional travel and a few heroes tasked with saving the world.
Coding-wise, on hold, but I am re-working the story.

Spoiler For Finale's Super Insane Tunnel Pack of Doom:
I will be combining Blur and Collision Course into a single gamepack. On hold.

Spoiler For Nostalgia Origins: Sky's Story:
Prequel to Nostalgia. On hold, especially while the story is re-worked.

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: Nostalgia - My Axe Parser Contest Entry
« Reply #282 on: October 26, 2010, 05:57:08 pm »
Well, I decided to pick this up again
YES! ;D
I'm so glad this is being worked on again.  I can't wait for more progress. :)

Offline yunhua98

  • You won't this read sentence right.
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2718
  • Rating: +214/-12
  • Go take a dive in the River Lethe.
    • View Profile
Re: Nostalgia - My Axe Parser Contest Entry
« Reply #283 on: October 26, 2010, 06:02:01 pm »
* yunhua98 is excited.  \o/  ;D

Spoiler For =====My Projects=====:
Minor setback due to code messing up.  On hold for Contest.
<hr>
On hold for Contest.


Spoiler For ===Staff Memberships===:






Have you seen any good news-worthy programs/events?  If so, PM me with an article to be included in the next issue of CGPN!
The Game is only a demo, the code that allows one to win hasn't been done.
To paraphrase Oedipus, Hamlet, Lear, and all those guys, "I wish I had known this some time ago."
Signature Last Updated: 12/26/11
<hr>

Offline FinaleTI

  • Believe in the pony that believes in you!
  • Project Author
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1830
  • Rating: +121/-2
  • Believe in the pony that believes in you!
    • View Profile
    • dmuckerman.tumblr.com
Re: Nostalgia - My Axe Parser Contest Entry
« Reply #284 on: October 26, 2010, 07:27:02 pm »
Optimization is going smoothly. I managed to cut the size from 10416 bytes to 9910! That's 506 bytes saved! And I'm pretty sure there are still several things I can optimize.  :D


Spoiler For Projects:

My projects haven't been worked on in a while, so they're all on hiatus for the time being. I do hope to eventually return to them in some form or another...

Spoiler For Pokemon TI:
Axe port of Pokemon Red/Blue to the 83+/84+ family. On hold.

Spoiler For Nostalgia:
My big personal project, an original RPG about dimensional travel and a few heroes tasked with saving the world.
Coding-wise, on hold, but I am re-working the story.

Spoiler For Finale's Super Insane Tunnel Pack of Doom:
I will be combining Blur and Collision Course into a single gamepack. On hold.

Spoiler For Nostalgia Origins: Sky's Story:
Prequel to Nostalgia. On hold, especially while the story is re-worked.