Author Topic: Yahtzee, Axe edition RC 1  (Read 14149 times)

0 Members and 1 Guest are viewing this topic.

Offline ACagliano

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 919
  • Rating: +32/-2
    • View Profile
    • ClrHome Productions
Yahtzee, Axe edition RC 1
« on: February 03, 2016, 09:54:03 pm »
Here I have enclosed the source file and executable file for the Yahtzee game. Current untraceable bugs:

1. Saferam L1 not clearing after a Fill(), a looped zero, and other means of zero-ing the data
2. I believe small straight and full house still glitch, and i need to be able to reset the game to test those again, so see 1. haha
« Last Edit: February 05, 2016, 05:58:13 pm by ACagliano »

Offline Dudeman313

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 106
  • Rating: +2/-0
  • I am the embodiment of honorificabilitudinity.
    • View Profile
Re: Yahtzee, Axe edition bugs
« Reply #1 on: February 04, 2016, 08:43:58 am »
I wish I could test this, but I only have a CE now. Could it and Project Slender be ported?
Does this qualify as a signature?
The answer is "Sure."

Offline Runer112

  • Moderator
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: Yahtzee, Axe edition bugs
« Reply #2 on: February 04, 2016, 08:48:29 am »
Here I have enclosed the source file and executable file for the Yahtzee game. Current untraceable bugs:

1. Saferam L1 not clearing after a Fill(), a looped zero, and other means of zero-ing the data

I stepped through both instances of Fill(L1,...) in a debugger, and both are behaving correctly. If there's any unexpected data there after this, you must be putting it there. :P

Offline ACagliano

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 919
  • Rating: +32/-2
    • View Profile
    • ClrHome Productions
Re: Yahtzee, Axe edition bugs
« Reply #3 on: February 04, 2016, 12:29:49 pm »
I wish I could test this, but I only have a CE now. Could it and Project Slender be ported?

Slender is on hold, since right now I only have time for small projects. I'll be continuing it hopefully in about a month-ish. For those reason, I've opened Slender access to the community. The info to access the repo is below:

Code: [Select]
Server Name: acagliano.no-ip.biz
User: git
Password: tiCalcDevs
Path to game source: /home/git/repos/slender1.git
Supported commands: Anything related to git, and scp.

And sure it can be ported, I just don't know the language, nor do I have the CE so I'd need to have someone who does fork it.

* In related news (slender fan film) *
Spoiler For Spoiler:
there is a Slender fan film in production, headed by me and a few friends who either like making movies or like horror. I created a funding campaign at http://gofundme.com/slender-origins if anyone is interested in donating. Also, anyone who wants to help in other ways like ideas/set ideas or even joining (NY area) can PM me.

Here I have enclosed the source file and executable file for the Yahtzee game. Current untraceable bugs:

1. Saferam L1 not clearing after a Fill(), a looped zero, and other means of zero-ing the data

I stepped through both instances of Fill(L1,...) in a debugger, and both are behaving correctly. If there's any unexpected data there after this, you must be putting it there. :P

That was my fear, which will make this way harder. Only thing I can think of is the CONTINUE label somehow being executed. I'll look when I get home from work later, but if in the meantime, you or anyone sees anything that could cause that, do poke me :)

Offline ACagliano

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 919
  • Rating: +32/-2
    • View Profile
    • ClrHome Productions
Re: Yahtzee, Axe edition RC 1
« Reply #4 on: February 05, 2016, 05:59:27 pm »
Here is RC 1 of the Yahtzee Axe game. Please test and report any bugs/GUI glitches found here

Offline chickendude

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 817
  • Rating: +90/-1
  • Pro-Riot Squad
    • View Profile
Re: Yahtzee, Axe edition RC 1
« Reply #5 on: February 06, 2016, 09:34:52 pm »
Why are you using GetKey? Also, i'd either disable interrupts or turn off the run indicator (_RunIndicOff or resetting the bit in indicFlags).

What are the keys? I get to the screen where you have the five boxes, but there are no die or anything. I can select the boxes using the f1-f5 keys, but nothing else. The game screen looks a bit plain, but it's a nice start :) I played Yahtzee a ton in school, i believe this was the game i used to play, perhaps you could use it for some inspiration:
http://www.ticalc.org/archives/files/fileinfo/191/19190.html

Offline ACagliano

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 919
  • Rating: +32/-2
    • View Profile
    • ClrHome Productions
Re: Yahtzee, Axe edition RC 1
« Reply #6 on: February 06, 2016, 09:54:09 pm »
Why are you using GetKey? Also, i'd either disable interrupts or turn off the run indicator (_RunIndicOff or resetting the bit in indicFlags).

What are the keys? I get to the screen where you have the five boxes, but there are no die or anything. I can select the boxes using the f1-f5 keys, but nothing else. The game screen looks a bit plain, but it's a nice start :) I played Yahtzee a ton in school, i believe this was the game i used to play, perhaps you could use it for some inspiration:
http://www.ticalc.org/archives/files/fileinfo/191/19190.html

The keys are as follows:

[Math] - roll
Left/Right - cycle combos
Enter - score combo
Mode - show help
Clear - quit

And what would you recommend I use other than getKey? I used that bc it waits for a key, which saves me a loop.

ps: I do agree the score/combo section of the interface could be a bit...nicer.
« Last Edit: February 06, 2016, 10:00:19 pm by ACagliano »

Offline chickendude

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 817
  • Rating: +90/-1
  • Pro-Riot Squad
    • View Profile
Re: Yahtzee, Axe edition RC 1
« Reply #7 on: February 07, 2016, 10:08:56 pm »
I would just use a loop with _GetCSC, in asm:
waitKey:
bcall(_GetCSC)
or a
jr z,waitKey

I tested the game again and it seems to work pretty well, it'd be nice to be able to see all the sets at once. Also, when you pick your points after rolling, the dice aren't rolled again, you can choose to hold dice from the previous roll. I'm not sure what exactly happened, but i held dice until i eventually got a Yahtzee, and the second time i choose Yahtzee it wouldn't let me roll anymore, all i could do was press enter to get more points (see screenshot). I just tried it again and the same thing happened. Getting two Yahtzees (or maybe getting a Yahtzee after holding all five cards?) prevents you from being able to roll the dice anymore.

Offline ACagliano

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 919
  • Rating: +32/-2
    • View Profile
    • ClrHome Productions
Re: Yahtzee, Axe edition RC 1
« Reply #8 on: February 08, 2016, 10:11:48 am »
I would just use a loop with _GetCSC, in asm:
waitKey:
bcall(_GetCSC)
or a
jr z,waitKey

I tested the game again and it seems to work pretty well, it'd be nice to be able to see all the sets at once. Also, when you pick your points after rolling, the dice aren't rolled again, you can choose to hold dice from the previous roll. I'm not sure what exactly happened, but i held dice until i eventually got a Yahtzee, and the second time i choose Yahtzee it wouldn't let me roll anymore, all i could do was press enter to get more points (see screenshot). I just tried it again and the same thing happened. Getting two Yahtzees (or maybe getting a Yahtzee after holding all five cards?) prevents you from being able to roll the dice anymore.

the game is Axe, not asm, so I can't choose. I used getKey^r because it waits for a key, so I save a loop.

The way it works is, if you score more than one Yahtzee, you score again against an additional combo before rolling again.

Lastly, I found the thing with Holding before the first roll myself on a playthrough and fixed it. That was indeed a bug, or moreover an oversight on my part. Thanks. I have improved the UI, but before spending time on it, I wanted to ensure the fundamentals work.

As for seeing all the sets on screen, in the new GUI i might have room for it, but I did want to put some of the key bindings right on the main screen. So I'll ask this here, how many people would vastly prefer all combo's shown on screen? Or would a key list be preferred?

Offline chickendude

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 817
  • Rating: +90/-1
  • Pro-Riot Squad
    • View Profile
Re: Yahtzee, Axe edition RC 1
« Reply #9 on: February 08, 2016, 12:26:16 pm »
By key list do you mean like in the help menu? I think you could leave it as it is ([mode] brings up the help screen) or perhaps add an entry to the main menu or a [mode]=? button on screen. Personally i'd prefer to see all my combos.

And your loop should more or less get turned into that asm code, i'm not familiar with Axe but in your program try pressing [2nd]+[On]. You'll exit your program and the RAM your program occupied won't be freed (a massive RAM leak).

The way it works is, if you score more than one Yahtzee, you score again against an additional combo before rolling again.
You mean the second time around you get the fifty points and then pick another combo? The problem currently is you can just continually choose Yahtzee and get an infinite amount of points, at least until the counter overflows. I think i always just played after the first Yahtzee any others will give you 100 points, but with your way at least prevent the player from chosing another Yahtzee ;)

Btw, i forgot how much i love playing this game :D Please post when you get the new GUI ready!

Offline ACagliano

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 919
  • Rating: +32/-2
    • View Profile
    • ClrHome Productions
Re: Yahtzee, Axe edition RC 1
« Reply #10 on: February 08, 2016, 01:51:30 pm »
By key list do you mean like in the help menu? I think you could leave it as it is ([mode] brings up the help screen) or perhaps add an entry to the main menu or a [mode]=? button on screen. Personally i'd prefer to see all my combos.

Ok, I can do that.

And your loop should more or less get turned into that asm code, i'm not familiar with Axe but in your program try pressing [2nd]+[On]. You'll exit your program and the RAM your program occupied won't be freed (a massive RAM leak).

Ah, I was not aware of that happening. Looking in the Axe documentation, I think there is a version of getKey that uses the OS's version (scancode?). I did notice that, in the game, [2nd] and [Alpha] are still active as they normally are (something that's been bugging me, since I like using [2nd] as a primary key). I'll fix that and report back.

The way it works is, if you score more than one Yahtzee, you score again against an additional combo before rolling again.
You mean the second time around you get the fifty points and then pick another combo? The problem currently is you can just continually choose Yahtzee and get an infinite amount of points, at least until the counter overflows. I think i always just played after the first Yahtzee any others will give you 100 points, but with your way at least prevent the player from chosing another Yahtzee ;)

Well there are different ways of handling the scoring. In some programs I've seen you can score Yahtzee again, and then another combo. In others, you can score another combo and get a 50 point bonus. Both ways accomplish the same result, but I believe the latter might actually be better, require less coding, and be less bug-prone. I'll work on this and post back.

Btw, i forgot how much i love playing this game :D Please post when you get the new GUI ready!

I love it too. I actually had a handheld Yahtzee thing, but it broke, so that's why I made this haha. And will do, ofc. Thanks for the comprehensive bug reports :p

Offline ACagliano

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 919
  • Rating: +32/-2
    • View Profile
    • ClrHome Productions
Re: Yahtzee, Axe edition RC 1
« Reply #11 on: February 08, 2016, 08:29:36 pm »
Fixes for everything except the [2nd] + [ON] leak. GUI improvement. I'm waiting for Runer, so I can ask him about some of the other Axe keyscanning options.

Offline Runer112

  • Moderator
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: Yahtzee, Axe edition RC 1
« Reply #12 on: February 08, 2016, 09:26:40 pm »
And your loop should more or less get turned into that asm code, i'm not familiar with Axe but in your program try pressing [2nd]+[On]. You'll exit your program and the RAM your program occupied won't be freed (a massive RAM leak).

This should not happen, as Axe uses _GetKeyRetOff, which returns kOff rather than actually shutting off the calculator.

However, I agree that it's better to go with a _GetCSC loop in a case like this. Which, in Axe, simply translates to While 1 : EndIf getKey. If interrupt are enabled (which you can do with FnOn), put a Stop in the loop to save battery, too!

Offline ACagliano

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 919
  • Rating: +32/-2
    • View Profile
    • ClrHome Productions
Re: Yahtzee, Axe edition RC 1
« Reply #13 on: February 08, 2016, 09:56:29 pm »
Can I then store getKey to a variable? Like 
Code: [Select]
EndIf getKey->G

Offline Runer112

  • Moderator
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: Yahtzee, Axe edition RC 1
« Reply #14 on: February 08, 2016, 11:45:41 pm »
Can I then store getKey to a variable? Like 
Code: [Select]
EndIf getKey->G

Of course.