Omnimaga

Calculator Community => Other Calc-Related Projects and Ideas => HP Prime => Topic started by: ArielP on January 04, 2014, 04:09:59 pm

Title: Sokoban gam
Post by: ArielP on January 04, 2014, 04:09:59 pm
Hello!

This is my first post in omnimaga.

I'm still learning a little bit about the commands and possibilities of this excellent machine.

I started working on developing a version of the game Sokoban. Using tiles of 16x16 bits and I'm using the touch screen to control the movements of "pusher".

(https://lh6.googleusercontent.com/-0phvcCuQTu0/Usbp43TzBBI/AAAAAAAAEG8/Ms4C-DloNNw/w396-h466-no/Captura+de+pantalla+de+2014-01-03+12%253A18%253A53.png)

I made one (the first one!) video of the game:

[ Invalid YouTube link ]

The "Beta 1" version only has 10 levels, and keeps track of the number of moves made and the amount of pushes made.

They are the first ten levels of the DOS version about 30 years. ... They are difficult to solve, but not impossible :crazy:. Enjoy!  ;D

(https://lh6.googleusercontent.com/-LIHVUg75nCo/Ushh_PS9MkI/AAAAAAAAEH0/PGQUZvTTuBA/w322-h242-no/level1.png)(https://lh6.googleusercontent.com/-h4lkx9uAVE4/Ushh-ShkafI/AAAAAAAAEHk/zuGJAy5a-ys/w322-h242-no/Level3.png)(https://lh4.googleusercontent.com/--ylTPSitCeo/Ushh-Vwe-pI/AAAAAAAAEHo/Y-TQ4PstKh4/w322-h242-no/Level5.png)

The pusher moves touching the edges of the screen. I did not use keys courses to preserve the "health" of the keyboard.

Soon more levels.  ;D(http://www.omnimaga.org/Themes/default/images/gpbp_arrow_up.gif)

PS: Remember.....is a "Beta", there are features that have not yet been implemented. DOWNLOAD THE GAME (http://www.ucontrol.com.ar/forosmf/software-del-pasado/graficos-msx-en-una-calculadora-hp-prime/?action=dlattach;attach=16107)
Title: Re: Sokoban gam
Post by: DJ Omnimaga on January 04, 2014, 04:15:47 pm
Heya and glad to see you around here :D. I just saw this on the MoHPC forum and was impressed by the graphics. It's nice to see more HP Prime games using the ICON/DIMGROB features to their full potential. :)
Title: Re: Sokoban gam
Post by: ArielP on January 04, 2014, 04:19:44 pm
Hello!
He had visited many times this forum, but as my native language is Spanish, usually only limited me to read the post of its users.

I can read the English language pretty well, but writing takes me a little. I hope you can understand me;)

I am a beginner. Buy HP Prime makes it about a month, so surely my contributions will be quite poor (at least for a few months).

I live in Argentina, I'm 45, and I like electronics, programming (in general) and mathematics. Surely I will see around here often.

Greetings!
Title: Re: Sokoban gam
Post by: DJ Omnimaga on January 04, 2014, 04:32:22 pm
Aaah ok I see. From what I could see on MoHPC and here so far, though, your English seems pretty understandable in general (more than certain Americans who speak English as native language :P). Since many users here are French, German, Polish and Dutch, they usually don't mind grammar errors from those users. :)

And yeah I started HP PPL programming in March on the HP 39gII, but that calculator was so buggy that I had to reflash it every hour or so. When the HP Prime emulator came out, I started experimenting with what I knew and when Critor ran some of my programs, I was amazed. Even without DIMGROB and BLIT, I still got a Tunnel to run at 60 images per seconds (now 90 FPS after optimizing), then I found the image commands. I just need more time and motivation to finish some of my project ideas.

Anyway, for the game, I just played it and it was quite fun. I managed to finish the first level at least. I wonder if you could add small translucent arrows on each side with the FILLPOLY command so that we know where to place our fingers on the screen to move around? Because I sometimes found myself trying to move, to no avail, due to touching the screen at the wrong location.
Title: Re: Sokoban game
Post by: ArielP on January 04, 2014, 04:37:48 pm
Yes!

I have some ideas:
1) Translucent arrows over the secreen ( ;) )
2) "Escape" for abandon the game
3) Animated character for the "pusher"
4) Four levels: Beginner, Basic, Hard, Very Hard
5) Splash screen at begining
6) Help on game

.....buy i need time for need time for all that ;)
Title: Re: Sokoban gam
Post by: DJ Omnimaga on January 04, 2014, 05:37:05 pm
That would definitively be great additions!

Also nice avatar, I still need to grab an HP 50g at one point, but they're more expensive than the TI-Nspire CX CAS over here ($207.99), so I'll have to look for some online deals.

By the way, I noticed something at the start of the game: The field is not rendered instantly. It gradually appears on the screen. Do you draw everything directly to G0 or do you use one of the extra GROBs? If you use another GROB than G0 it could reduce risks of flickering (although I haven't encountered any so far) and you could add some effects like transitions between screens (like this screenshot (http://img.ourl.ca//ssballfadein.gif), although the fade-in part can be annoying to implement x.x)
Title: Re: Sokoban gam
Post by: Sorunome on January 04, 2014, 05:40:33 pm
This is looking awesome so far!
Keep up the great work! :)
Title: Re: Sokoban gam
Post by: ArielP on January 04, 2014, 06:07:40 pm
That would definitively be great additions!

Also nice avatar, I still need to grab an HP 50g at one point, but they're more expensive than the TI-Nspire CX CAS over here ($207.99), so I'll have to look for some online deals.

By the way, I noticed something at the start of the game: The field is not rendered instantly. It gradually appears on the screen. Do you draw everything directly to G0 or do you use one of the extra GROBs? If you use another GROB than G0 it could reduce risks of flickering (although I haven't encountered any so far) and you could add some effects like transitions between screens (like this screenshot (http://img.ourl.ca//ssballfadein.gif), although the fade-in part can be annoying to implement x.x)

Hello again!
I have several calculators, most of them very old. I collect "home computers" and old calculators, so many of which have become obsolete.

The HP50G is an excellent machine, which these days leave with my son to another city. My son is going to start studying to be an engineer, and HP50G will be of great help.

As GROB, "think" I'm working on G1, I have not yet clear how the graphics system of the HP Prime (there is very little documentation!) Works.

Also notice that I draw the screen from top to bottom (in that order is that the program processes the contents of the array that stores the description of each board)

This is looking awesome so far!
Keep up the great work! :)

Thanks!!!!

Title: Re: Sokoban gam
Post by: ArielP on January 05, 2014, 07:39:45 am
Hello!

The level 1 has one cube missing. Solved in Beta 1.1 (Download (http://www.hpmuseum.org/forum/attachment.php?aid=124))

Sorry :)
Title: Re: Sokoban gam
Post by: Streetwalrus on January 05, 2014, 07:57:38 am
Pretty cool looking. :thumbsup:
Title: Re: Sokoban gam
Post by: ArielP on January 05, 2014, 10:06:13 am
Thanks!

PS: Working in more levels/options:
Title: Re: Sokoban gam
Post by: Handmixer on January 05, 2014, 11:05:22 am
The date in the lower part of the png should proberbly be Jan/2014
Title: Re: Re: Sokoban gam
Post by: DJ Omnimaga on January 05, 2014, 01:59:28 pm
I like the title screen! :)
Title: Re: Sokoban gam
Post by: ArielP on January 05, 2014, 07:10:28 pm
The date in the lower part of the png should proberbly be Jan/2014

Ups! ;) Fixed!

I like the title screen! :)

Gracias!
Title: Re: Sokoban gam
Post by: ArielP on January 06, 2014, 05:24:34 am
Hello!
It's almost ready the new Beta.

I have added:

1) Main Menu
2) Four levels of difficulty
3) 40 boards (and growing!)
4) Display of score obtained
5) Bye bye screen


Working:
1) Control the keyboard (almost finished)
2) Language (Spanish / English)

Some screenshots of this version:

(https://lh5.googleusercontent.com/-H-w71vU4xGc/UsqDhipQH8I/AAAAAAAAEIY/aCqx4C075-w/w322-h242-no/menu.png)(https://lh3.googleusercontent.com/-0Rm2asS1UUM/UsqDipBi1cI/AAAAAAAAEIo/Qn0fc4sjHUA/w322-h242-no/submenu1.png)(https://lh6.googleusercontent.com/-Jta54Jl9M-s/UsqDhMadGyI/AAAAAAAAEIc/wY5yY378Ueo/w322-h242-no/level.png)(https://lh6.googleusercontent.com/-N0mSQ8ju_WU/UsqDivhxFQI/AAAAAAAAEIs/A4V9fvB43xw/w322-h242-no/win.png)(https://lh5.googleusercontent.com/-ZuMKPgoaiIg/UsqDhOtyOhI/AAAAAAAAEIU/9VNVUTbEixc/w322-h242-no/byebye.png)




In a couple of days will be completed.
Title: Re: Re: Sokoban gam
Post by: DJ Omnimaga on January 06, 2014, 11:47:35 am
If arrow keypad controls are added, would key repeat be enabled so that we can hold down to move around rather than repeatedly pressing the keys?
Title: Re: Sokoban gam
Post by: ArielP on January 06, 2014, 11:51:51 am
I try! ;)
Title: Re: Sokoban gam
Post by: ArielP on January 06, 2014, 05:19:23 pm
Video:



Link: Sokoban for HP Prime (Beta 1.03) (http://www.ucontrol.com.ar/forosmf/software-del-pasado/graficos-msx-en-una-calculadora-hp-prime/?action=dlattach;attach=16110)
Title: Re: Sokoban gam
Post by: DJ Omnimaga on January 06, 2014, 10:49:29 pm
Great! Thanks for the vid. :D Hopefully if people upload videos of their games on Youtube it should give more visibility to the HP Prime in terms of capabilities. :)
Title: Re: Sokoban gam
Post by: Sorunome on January 07, 2014, 04:33:13 am
Yay, thanks for the vid, it is looking nice
Title: Re: Sokoban gam
Post by: DJ Omnimaga on January 07, 2014, 11:18:48 am
I just tried the new beta and it's very good. This is definitively gonna make front page news over here eventually. I can't wait until the d-pad controls are implemented :)
Title: Re: Sokoban game
Post by: Daniel Bausset on March 16, 2020, 01:37:17 pm
Hi guys,

I'm posting here in case Ariel gets a notification.
I've been trying to reach him about his Sokoban implementation on HP Prime.
Actually, I got myself a Prime G2 recently, and since Sokoban is one of my favorite games, I soon installed Ariel's version.
It didn't run on the latest firmware (some changes in the PPL language I guess), so I corrected some stuff, and while I was at it, I used the game to learn PPL programming and added some new features: arrow keys control, a high scores table, a last move undo feature...

(https://i.ibb.co/N6Tj07g/level-4-4.png) (https://i.ibb.co/yYjXz63/best-scores.png)

In the end, it makes for some nice improvements, so I just wanted to show it to Ariel before making it available online :)