Cube picker (game)

Applications, Games, Tools, User libs and useful stuff coded in PureBasic
AZJIO
Addict
Addict
Posts: 1298
Joined: Sun May 14, 2017 1:48 am

Cube picker (game)

Post by AZJIO »

Cube picker (1.8.1)
Download: yandex.ru, upload.ee
Download: yandex.ru (APK)


Screenshot (Linux)
Screenshot (Android)
Image

Compiled for Linux and Android (included).

ini file:

[set]
square = 40 - square size in pixels (20-100)
columns = 20 - number of columns (10-50)
rows = 15 - number of lines (10-50)
indent = 1 - spacing between squares (0-3), 0 - continuous, 3 - for large screens
delay = 300 - delay between click and disappear response (0-400)
colormax = 5 - number of colors (3-5)
recordsmax = 15 - maximum number of entries in the record table (3-30)
highlight = 0 - highlighting selected squares
user=name - enter a name so that the game does not ask for a name when saving records.

[color] - color for five squares
1 = 51FC12
2 = FFFF80
3 = FF0080
4 = 0FF
5 = 77F
Last edited by AZJIO on Tue Oct 31, 2023 4:50 am, edited 39 times in total.
AZJIO
Addict
Addict
Posts: 1298
Joined: Sun May 14, 2017 1:48 am

Re: Cubes (game)

Post by AZJIO »

If the game is called "Cube picker", is that a normal name for the game?
User avatar
Kuron
Addict
Addict
Posts: 1626
Joined: Sat Oct 17, 2009 10:51 pm
Location: Pacific Northwest

Re: Cubes (game)

Post by Kuron »

I have not had a chance to try it yet, but will later today. Any chance of a screenshot? You might get more interest.
Best wishes to the PB community. Thank you for the memories. ♥️
User avatar
RSBasic
Moderator
Moderator
Posts: 1218
Joined: Thu Dec 31, 2009 11:05 pm
Location: Gernsbach (Germany)
Contact:

Re: Cubes (game)

Post by RSBasic »

I have tested it. Very good game. 👍
Can you add online highscore?
Image
Image
AZJIO
Addict
Addict
Posts: 1298
Joined: Sun May 14, 2017 1:48 am

Re: Cubes (game)

Post by AZJIO »

RSBasic wrote: Mon Oct 09, 2023 7:40 pm Can you add online highscore?
I wanted to save highscore to a file.

Made for Windows/Linux
Last edited by AZJIO on Wed Oct 11, 2023 6:34 pm, edited 2 times in total.
dige
Addict
Addict
Posts: 1240
Joined: Wed Apr 30, 2003 8:15 am
Location: Germany
Contact:

Re: Cube picker (game)

Post by dige »

@AZJIO : Nice game! And I was surprised that you also successfully created this as an app! I guess with SB2.40? Do you already have experience with 2.51 regarding app creation?
"Daddy, I'll run faster, then it is not so far..."
AZJIO
Addict
Addict
Posts: 1298
Joined: Sun May 14, 2017 1:48 am

Re: Cube picker (game)

Post by AZJIO »

dige wrote: Tue Oct 10, 2023 3:03 pm Do you already have experience with 2.51 regarding app creation?
No.
apk - this was a temporary adaptation for testing. Now I have added the ability to start a new game and a settings window there. But ideally, you need to save the settings in the cache; I’m too lazy to do this right now.

Added "user=name" - enter a name so that the game does not ask for the name when saving highscore.
User avatar
Kuron
Addict
Addict
Posts: 1626
Joined: Sat Oct 17, 2009 10:51 pm
Location: Pacific Northwest

Re: Cube picker (game)

Post by Kuron »

Finally got a chance to try this. Fun little game and very addictive! I love that you are using pastel colors, they are very easy on the eyes.
Best wishes to the PB community. Thank you for the memories. ♥️
User avatar
RSBasic
Moderator
Moderator
Posts: 1218
Joined: Thu Dec 31, 2009 11:05 pm
Location: Gernsbach (Germany)
Contact:

Re: Cubes (game)

Post by RSBasic »

AZJIO wrote: Mon Oct 09, 2023 8:09 pm
RSBasic wrote: Mon Oct 09, 2023 7:40 pm Can you add online highscore?
I wanted to save highscore to a file.

Made for Windows/Linux
You can use this code by STARGÅTE: https://www.purebasic.fr/german/viewtopic.php?t=12857
Image
Image
AZJIO
Addict
Addict
Posts: 1298
Joined: Sun May 14, 2017 1:48 am

Re: Cube picker (game)

Post by AZJIO »

RSBasic
I don't have hosting with php. I can only edit static html files or javascript

Updated
Records of different difficulty levels are not combined into one list
Added settings window.
Added window resizing with changing square dimensions.
User avatar
Kuron
Addict
Addict
Posts: 1626
Joined: Sat Oct 17, 2009 10:51 pm
Location: Pacific Northwest

Re: Cube picker (game)

Post by Kuron »

I will try and download the new version sometime this weekend and test it. Looking forward to it as it is a fun little game. I left the first version running about 8 hours and no crash or memory leaks. Very stable!

Added window resizing with changing square dimensions.
This is something I need to figure out for my own stuff. :|
Best wishes to the PB community. Thank you for the memories. ♥️
Jeromyal
Enthusiast
Enthusiast
Posts: 204
Joined: Wed Jul 17, 2013 8:49 am

Re: Cube picker (game)

Post by Jeromyal »

Ah the classic 'Same Game' !
Always loved it. I wrote one years ago back when RealBasic, was still RealBasic and the Macintosh still smiled at you when you turned her on.

Named mine Pop Blocks (lol)

To save from accidental clicks this game usually is first click selects group and a second click to confirm. So if it was an accident or someone changes their mind last second they can.

However this is very playable at least until my finger gets twitchy and starts clicking the mouse against my will. But that's a ME problem :-)
AZJIO
Addict
Addict
Posts: 1298
Joined: Sun May 14, 2017 1:48 am

Re: Cube picker (game)

Post by AZJIO »

Jeromyal wrote: Sun Oct 15, 2023 11:54 am To save from accidental clicks
I plan to make it possible to undo the last move. It's not difficult to do. The current state is an array of structures by number of cells. For example, 20*15*3 = 900, where 3 is the number of structure elements. I just need to copy the CopyArray() array (1kb) to be able to move back. To undo the move, I will copy the previous data array to replace the current one and redraw the canvas. I can even do a few undos and go back to the start of the game, saving each move. At first I didn’t want to make this option because the game becomes uninteresting, but then I decided that canceling the last move could be done.

I made a correction because one character at the end of the line was cut off in the records. Now records are displayed in ListViewGadget.

I added "Undo" (v1.6.1)
Jeromyal
Enthusiast
Enthusiast
Posts: 204
Joined: Wed Jul 17, 2013 8:49 am

Re: Cube picker (game)

Post by Jeromyal »

The one undo is a workable idea.
When there were no more moves left it asked for a name with my account name pre-filled, and then there was a yes/no dialog after that with my score.
I selected yes then checked the high score window and it was blank. Have not tried answering no to it yet. I don't even know for sure what the yes and no are meant to do.
I am suggesting a merger of the popup with the name entry and notice of score though, perhaps with an indicator that you either made the top score or not.
Up to you the direction you want to go with this though.

My game I had named Pop Blocks because I had planned to do an animation of a chain reaction from the mouse pointer with all the blocks popping like bubbles and a subtle pop and fizzing sound and sliding animations for the remaining blocks. Never implemented any of it sadly enough. The source was lost with a mechanical drive failure.

Anyhow, this is very good work. I had thought about doing this myself but I have yet to really play around with PureBasic graphics.

That being said, I was strongly thinking of creating an almost clone of Spinnakers Adventure Creator. Something for the kiddos. Only with a few more assets and editors. Just don't really know how to start.
AZJIO
Addict
Addict
Posts: 1298
Joined: Sun May 14, 2017 1:48 am

Re: Cube picker (game)

Post by AZJIO »

Jeromyal wrote: Sun Oct 15, 2023 6:00 pm then checked the high score window and it was blank
Is there access to the disk to write data? If the program is located in "Program Files", then you need to delete the ini file, then it will be created in the "%appdata%\CubePicker" folder ("home/user/.config/CubePicker").
If you change the settings, you will not see the highscore because different tables are used for different difficulty levels.
Jeromyal wrote: Sun Oct 15, 2023 6:00 pm I suggest combining a popup with name entry and a score notification
Firstly, the name is requested only when the game starts and then is used by default. Secondly, if you specify a name in the settings, it is never asked again. This requires creating your own window, 2 different ones, one with a name, the other without a name. Currently, a standard dialog system is used without additional events in the loop. You don’t want to press the “OK” button again, but firstly I was asked to warn that the game is over, and secondly it is impossible to save a highscore without a name. More precisely, you can, but there is no point in competing if your name is not written down. There are two groups, some like one thing, others another, I cannot satisfy both at the same time. I made it possible to create behavior for both user groups using an ini file.
There is a game called "Swell Foop" where the ending of the game is drawn directly onto the surface of the canvas. But there is a problem, not all cubes can be deleted in the window, how can I draw text directly on the cubes?

If you make animation, you need to make it so beautiful that it doesn’t cause disgust. I'm not the kind of artist to draw this.

Update (Windows)
Right click opens the color change dialog.


Jeromyal
Check out this game - Balloons
Jeromyal wrote: Sun Oct 15, 2023 6:00 pm Have not tried answering no to it yet.
Are you answering the question "Start a new game?"
Post Reply