* WalrusIRC

You need to have 5 posts and not be part of restricted usergroups in order to use the WalrusIRC embedded shoutbox. However, you can also access our IRC channel called #CodeWalrus via EFnet.

Author Topic: Pyramid 89  (Read 474 times)

0 Members and 1 Guest are viewing this topic.

Offline Ranman

  • Full User
  • Safe-haven access
  • Join Date: Feb 2017
  • Location:
  • Posts: 76
  • Post Rating Ratio: +4/-0
  • Gender: Male
Pyramid 89
« on: November 11, 2017, 03:46:28 pm »
Last week I dusted off one of my old projects that I created for one of my graduate courses that I never submitted.

The game is called Pyramid Solitaire. It is a simple fast paced solitaire game. See attached screenies.

Edit... This is another game that I thought I had lost back when my hard drive crashed and lost my backup. So... I have to make a few tweaks and rewrite the readme file (since it was not on my backup drive). Then i'll get it released too.

The object of the game is to remove all cards from the pyramid by matching 2 cards that add up to a value of 13 (kings are 13 all by themselves). You get to cycle through the deal pile a limited number of times to assist with finding cards.

Edit #2: Attached pyramid89.zip.
« Last Edit: November 20, 2017, 06:54:34 pm by Ranman »


  • Calculators owned: TI-89 HW1, TI-92+, Casio 9860G Slim, Casio fx6300, Tandy PC7
Ranman
Bringing Randy Glover's Jumpman to the TI-89 calculator. Download available at Ticalc.

Offline xlibman

  • Omni founder & CW co-founder
  • Super User
  • Original 5
  • CodeWalrus Supporter
  • *
  • Join Date: Nov 2014
  • Location: Quebec, Canada
  • Posts: 18912
  • Post Rating Ratio: +100/-5
    • dj_omnimaga
    • DJOmnimaga.music
    • @DJOmnimaga
    • dj_omnimaga
    • @DJOmnimaga
    • /u/DJ_Omnimaga
    • DJOmnimaga
    • 112/11286
    • @djomnimaga
    • @DJOmnimaga
    • DJ Omnimaga music store
  • Gender: Male
Re: Pyramid 89
« Reply #1 on: November 13, 2017, 07:05:37 pm »
This looks very good Ranman. Glad to see you found another of your old projects again. I myself thought I had lost some back in the days, only to find them out on a DVD-R half a decade later.
  • Calculators owned: TI-57, 73, TI-80 (broken), TI-81, TI-82, TI-83, TI-83+ (broken), TI-83+ (broken), TI-83+SE (broken), TI-84+, TI-84+CSE, TI-84+CE, TI-85, TI-86, TI-89T, TI-92, TI-Nspire, TI-Nspire CX (semi-broken), HP 39gII, HP Prime, Casio fx-7000G, fx-7400G+, fx-7700GE, fx-9750G+, fx-9750GII, fx-9860G, cfx-9850G, FX-1.0+, fx-CG10, fx-CP400
  • Consoles, mobile devices and vintage computers owned: Samsung i5510, Nexus 5, Atari 2600, Lynx, SMS, Game Gear, Genesis, Dreamcast, NES, SNES, N64, GCN, Wii, Wii U, GBA, DS, 3DS, PS2, PS3, PS4, PSP, PSVita, XBox 360, XBOne

Bandcamp|Reverbnation|Facebook|Youtube|Twitter
Retired Omnimaga admin (2001-11) and editor (2012-14)

Offline Lionel Debroux

  • Full User
  • Join Date: Jan 2015
  • Location:
  • Posts: 231
  • Post Rating Ratio: +11/-0
    • debrouxl
    • 58/5891
Re: Pyramid 89
« Reply #2 on: November 13, 2017, 09:17:57 pm »
Looks good indeed, another good find on your formerly lost backup drive :)
Member of the TI-Chess Team.
Co-maintainer of GCC4TI (GCC4TI online documentation), TIEmu and TILP.
Co-admin of TI-Planet.

Offline Ranman

  • Full User
  • Safe-haven access
  • Join Date: Feb 2017
  • Location:
  • Posts: 76
  • Post Rating Ratio: +4/-0
  • Gender: Male
Re: Pyramid 89
« Reply #3 on: November 14, 2017, 08:31:55 am »
This looks very good Ranman. Glad to see you found another of your old projects again. I myself thought I had lost some back in the days, only to find them out on a DVD-R half a decade later.

Quote from: Lionel Debroux
Looks good indeed, another good find on your formerly lost backup drive :)

Thanks guys!!
  • Calculators owned: TI-89 HW1, TI-92+, Casio 9860G Slim, Casio fx6300, Tandy PC7
Ranman
Bringing Randy Glover's Jumpman to the TI-89 calculator. Download available at Ticalc.

Offline Ranman

  • Full User
  • Safe-haven access
  • Join Date: Feb 2017
  • Location:
  • Posts: 76
  • Post Rating Ratio: +4/-0
  • Gender: Male
Re: Pyramid 89
« Reply #4 on: November 20, 2017, 02:24:24 pm »
Pyramid Solitaire was uploaded to Ticalc today.  :w00t:

Edit: attachment moved to first post.
« Last Edit: November 20, 2017, 11:10:00 pm by Ranman »
  • Calculators owned: TI-89 HW1, TI-92+, Casio 9860G Slim, Casio fx6300, Tandy PC7
Ranman
Bringing Randy Glover's Jumpman to the TI-89 calculator. Download available at Ticalc.

Offline xlibman

  • Omni founder & CW co-founder
  • Super User
  • Original 5
  • CodeWalrus Supporter
  • *
  • Join Date: Nov 2014
  • Location: Quebec, Canada
  • Posts: 18912
  • Post Rating Ratio: +100/-5
    • dj_omnimaga
    • DJOmnimaga.music
    • @DJOmnimaga
    • dj_omnimaga
    • @DJOmnimaga
    • /u/DJ_Omnimaga
    • DJOmnimaga
    • 112/11286
    • @djomnimaga
    • @DJOmnimaga
    • DJ Omnimaga music store
  • Gender: Male
Re: Pyramid 89
« Reply #5 on: November 20, 2017, 06:46:55 pm »
Good to see it released! You should put the link in the first post if not done already. :)
  • Calculators owned: TI-57, 73, TI-80 (broken), TI-81, TI-82, TI-83, TI-83+ (broken), TI-83+ (broken), TI-83+SE (broken), TI-84+, TI-84+CSE, TI-84+CE, TI-85, TI-86, TI-89T, TI-92, TI-Nspire, TI-Nspire CX (semi-broken), HP 39gII, HP Prime, Casio fx-7000G, fx-7400G+, fx-7700GE, fx-9750G+, fx-9750GII, fx-9860G, cfx-9850G, FX-1.0+, fx-CG10, fx-CP400
  • Consoles, mobile devices and vintage computers owned: Samsung i5510, Nexus 5, Atari 2600, Lynx, SMS, Game Gear, Genesis, Dreamcast, NES, SNES, N64, GCN, Wii, Wii U, GBA, DS, 3DS, PS2, PS3, PS4, PSP, PSVita, XBox 360, XBOne

Bandcamp|Reverbnation|Facebook|Youtube|Twitter
Retired Omnimaga admin (2001-11) and editor (2012-14)

Offline Lionel Debroux

  • Full User
  • Join Date: Jan 2015
  • Location:
  • Posts: 231
  • Post Rating Ratio: +11/-0
    • debrouxl
    • 58/5891
Re: Pyramid 89
« Reply #6 on: December 01, 2017, 04:47:17 pm »
Several suggestions about the code:
  • the ZIP file is incomplete ;)
    The three missing assembly files can be found in the Jumpman ZIP (and should be using the versions for which I suggested optimizations in the other thread, I haven't downloaded the latest Jumpman version to check).
  • conversely, the Pyramid Solitaire ZIP might be cleaned up, as some functions don't seem to be used;
  • in TimeUtils.c, Sleep(): the "/ 2.65" causes a conversion to float, a floating-point division, and a conversion back to integer. "* 100 / 265" is more efficient size-wise (that's what matters) and speed-wise;
  • in pyramid.c:
    • I noticed that depending on how the linker reorders section, the call to SetUserFont(intvfont - 32 * 8, ...) (clever way to save space, I like it in general :) ) can end up producing a reference to outside the program's space, and the linker produces an error in such a case. As long as you don't hit the issue, it doesn't matter much.
    • careful ordering of the functions in pyramid.c (I can provide you the file if you're interested) makes it possible to declare the functions "static", which avoids the need to use prototype declarations at the beginning, and most of all, opens the set of functions to inlining - usually beneficial to code size for functions called only once, or trivial functions such as ResetAutoQuit();
    • in MoveCursor(), you're using floats for the usual Pythagorean distance computation; isn't there a way you could use squared distances, avoiding sqrt and floats altogether ? ;)
    • is there a way to reach value == 26 in CheckSelection() ? Normally, kings are selected as single cards. The point is, if value == 26 can't occur, then you can use value == 13 instead of (value % 13) == 0... avoiding a division and opening the function to inlining.
« Last Edit: December 01, 2017, 04:50:15 pm by Lionel Debroux »
Member of the TI-Chess Team.
Co-maintainer of GCC4TI (GCC4TI online documentation), TIEmu and TILP.
Co-admin of TI-Planet.

 


You can also use the following HTML or bulletin board code to share it on your page or forum signature!


Also do not forget to check our affiliates below.
Planet Casio TI-Planet Calc.news BroniesQC BosaikNet Velocity Games