Author Topic: The World's Hardest Game  (Read 43086 times)

0 Members and 2 Guests are viewing this topic.

Offline Darl181

  • «Yo buddy, you still alive?»
  • CoT Emeritus
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3408
  • Rating: +305/-13
  • VGhlIEdhbWU=
    • View Profile
    • darl181.webuda.com
Re: The World's Hardest Game
« Reply #150 on: November 15, 2010, 08:25:09 pm »
So it's kind of like this (improved in the following page)?
Also, is it possible to do that with two digits?  Would I just write the number to it, or would I have to  do the two digits seperately?
Vy'o'us pleorsdti thl'e gjaemue

Offline calcdude84se

  • Needs Motivation
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2272
  • Rating: +78/-13
  • Wondering where their free time went...
    • View Profile
Re: The World's Hardest Game
« Reply #151 on: November 15, 2010, 08:40:40 pm »
Well, in the post you linked to you were going in the right direction, you just needed to add 48 to L.
For 2 digits, you have to do each digit separately. If it's base 10, you just need to do /10 for the ten's place, ^10 for the one's. Then add 48 to each and store it to the proper offset from Str0X.
"People think computers will keep them from making mistakes. They're wrong. With computers you make mistakes faster."
-Adam Osborne
Spoiler For "PartesOS links":
I'll put it online when it does something.

Offline Darl181

  • «Yo buddy, you still alive?»
  • CoT Emeritus
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3408
  • Rating: +305/-13
  • VGhlIEdhbWU=
    • View Profile
    • darl181.webuda.com
Re: The World's Hardest Game
« Reply #152 on: November 15, 2010, 09:17:32 pm »
Quote
^10 for the one's
What does the modulus do on its own?

How do the brackets in the code work?  And why are the [00]'s in quotes, rather than the strings?  I've found it makes it easier to use something if you understand it ;D
Code: [Select]
:vWHGLVL1"[00]"prgmWHGLVL1"[00]→Str0XI get the offsets and such (had to figure it out on my own, but currently I reference the levels with Str01+(A*9)), and making it two digits would make the string 10 bytes large.  And the 48th token is the number 0.  Are the zeroes in brackets part of the string?
Vy'o'us pleorsdti thl'e gjaemue

Offline calcdude84se

  • Needs Motivation
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2272
  • Rating: +78/-13
  • Wondering where their free time went...
    • View Profile
Re: The World's Hardest Game
« Reply #153 on: November 15, 2010, 09:22:28 pm »
No, I think you have the quotes wrong. It's:
Code: [Select]
"appvWHGLVL1"[00]"prgmWHGLVL1"[00]->Str0XNote the apostrophe before appv ;)

Taking the modulus of something finds its remainder after division by a certain number. So 50 mod 6 equals 2 since 50/6 equals 8 remainder 2. If you take something mod 10, you get the last digit (decimal). For example, 85 mod 10 equals 5, and 5 is the digit in the one's place.
"People think computers will keep them from making mistakes. They're wrong. With computers you make mistakes faster."
-Adam Osborne
Spoiler For "PartesOS links":
I'll put it online when it does something.

Offline Darl181

  • «Yo buddy, you still alive?»
  • CoT Emeritus
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3408
  • Rating: +305/-13
  • VGhlIEdhbWU=
    • View Profile
    • darl181.webuda.com
Re: The World's Hardest Game
« Reply #154 on: November 15, 2010, 09:31:40 pm »
Taking the modulus of something finds its remainder after division by a certain number. So 50 mod 6 equals 2 since 50/6 equals 8 remainder 2. If you take something mod 10, you get the last digit (decimal). For example, 85 mod 10 equals 5, and 5 is the digit in the one's place.
Okay, thanks ;D

I'm still kind of confused about the [00].  What would the resulting string be?  What I'm shooting for is WHGLVL##
It seems to me the 1 in WHGLVL1 can be taken out for this...
Vy'o'us pleorsdti thl'e gjaemue

Offline calcdude84se

  • Needs Motivation
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2272
  • Rating: +78/-13
  • Wondering where their free time went...
    • View Profile
Re: The World's Hardest Game
« Reply #155 on: November 15, 2010, 09:35:56 pm »
In that case just remove the [00]'s and say
Code: [Select]
"appvWHGLVL00prgmWHGLVL00"->Str0XSince appvar and program names can only be up to 8 characters long, you can get away with no padding. (which is what the [00] from before was)
"People think computers will keep them from making mistakes. They're wrong. With computers you make mistakes faster."
-Adam Osborne
Spoiler For "PartesOS links":
I'll put it online when it does something.

Offline Darl181

  • «Yo buddy, you still alive?»
  • CoT Emeritus
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3408
  • Rating: +305/-13
  • VGhlIEdhbWU=
    • View Profile
    • darl181.webuda.com
Re: The World's Hardest Game
« Reply #156 on: November 15, 2010, 09:38:41 pm »
Okay, I think I have it now.  Thanks ;D
Vy'o'us pleorsdti thl'e gjaemue

Offline calcdude84se

  • Needs Motivation
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2272
  • Rating: +78/-13
  • Wondering where their free time went...
    • View Profile
Re: The World's Hardest Game
« Reply #157 on: November 15, 2010, 09:41:35 pm »
You're welcome. :)
Always glad to help.
"People think computers will keep them from making mistakes. They're wrong. With computers you make mistakes faster."
-Adam Osborne
Spoiler For "PartesOS links":
I'll put it online when it does something.

Offline Darl181

  • «Yo buddy, you still alive?»
  • CoT Emeritus
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3408
  • Rating: +305/-13
  • VGhlIEdhbWU=
    • View Profile
    • darl181.webuda.com
Re: The World's Hardest Game
« Reply #158 on: November 16, 2010, 12:25:40 am »
I've been trying to implement this for an hour or so now, but to no avail.  I think I've finally figured out why it didn't work.
So, rather than have one string for each level (using lots of memory), you just have one string that you can change to your needs.
Code: [Select]
"appvWHGLVL1"[00]"prgmWHGLVL1"[00]->Str0X
.L is the level, P is whether or not it's a program. We put its pointer in X.
L+48->{P*9+Str0X+7}
GetCalc(P*9+Str0X)->X
The line "L+48->{P*9+Str0X+7}" stores the correct digit in the right place. So, if L=6 and P=1, then the data at Str0X now looks like this:
Code: [Select]
"appvWHGLVL1"[00]"prgmWHGLVL6"[00]The 48 is necessary because the character '0' equals 48, '1' equals 49, etc. 7 is the offset to the first '1', and 9 is the difference between the offsets to the first and second '1's.

Its easy :) Just go to options, and select Application under 'shell'.  The only difference between apps and programs is you can't modify any data that you create in your program.  ie: you cant do this:

Code: [Select]
[000102030405]->Str1
9->{Str1+5}  //cant do that!

you have to do this instead

Code: [Select]
[000102030405]->Str1
Copy(Str1,L1,6)  //copy it to some free ram, but you cant copy back
9->{L1+5}
The level editor is an app...
* Darl181 blinks
« Last Edit: November 16, 2010, 12:25:52 am by Darl181 »
Vy'o'us pleorsdti thl'e gjaemue

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: The World's Hardest Game
« Reply #159 on: November 16, 2010, 12:19:19 pm »
O.O hah well now you know ;D Is it small enough to be a program?

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: The World's Hardest Game
« Reply #160 on: November 16, 2010, 01:58:37 pm »
Hum... I'd like the checkboard pattern to look more like the original game :)

Offline Darl181

  • «Yo buddy, you still alive?»
  • CoT Emeritus
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3408
  • Rating: +305/-13
  • VGhlIEdhbWU=
    • View Profile
    • darl181.webuda.com
Re: The World's Hardest Game
« Reply #161 on: November 16, 2010, 06:28:44 pm »
O.O hah well now you know ;D Is it small enough to be a program?
The level editor is 11995 bytes when compiled as a program, 12614 bytes when compiled as an app.
Unless there's a >3,000-byte optimization possible, the editor's going to be an app.
I might add the optimization to the game though...it's only 8541...

I came up with an idea, have the string in an external appvar, but I don't know how I would bring it back to the string in the actual editor.
Vy'o'us pleorsdti thl'e gjaemue

Offline MRide

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 711
  • Rating: +14/-0
  • You can't see this.
    • View Profile
Re: The World's Hardest Game
« Reply #162 on: November 16, 2010, 06:33:20 pm »
That's...that's >9000 bytes! :P
Nice, this is going to be really good when it's all finished.
Axe has certainly increased the number of quality games coming out.

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: The World's Hardest Game
« Reply #163 on: November 16, 2010, 10:23:34 pm »
Indeed, a huge jump in quality games compared to before it came out. I think about half of the 83+ features this year (besides old programs) are Axe games or Axe Parser itself. :)

It reminds me when TIGCC got popular.
« Last Edit: November 16, 2010, 10:23:50 pm by DJ Omnimaga »

Offline Darl181

  • «Yo buddy, you still alive?»
  • CoT Emeritus
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3408
  • Rating: +305/-13
  • VGhlIEdhbWU=
    • View Profile
    • darl181.webuda.com
Re: The World's Hardest Game
« Reply #164 on: November 19, 2010, 10:00:09 pm »
Hey, just found this.
http://www.youtube.com/watch?v=8vZkt0V5WuI

And no, it's not a rickroll
« Last Edit: November 19, 2010, 10:00:28 pm by Darl181 »
Vy'o'us pleorsdti thl'e gjaemue