PureMondrian

Applications, Games, Tools, User libs and useful stuff coded in PureBasic
User avatar
moulder61
Enthusiast
Enthusiast
Posts: 193
Joined: Sun Sep 19, 2021 6:16 pm
Location: U.K.

Re: PureMondrian

Post by moulder61 »

@infratec
Thanks, that fixed the internet issue for me. :) I might have been able to work it out myself, but probably not. ;)

@jacdelad
Equally, I don't use Windows, so I'll never make any money programming in PB. :(

I kind of have two games in development at the moment, so if/when I consider them good enough to share, I'm sure the other two Linux users will be happy. :p

The issue started for me when Mr.L changed the graphics to vector or whatever else it was he did? They look really nice, but it stopped working after that.

Moulder.
"If it ain't broke, fix it until it is!

This message is brought to you thanks to SenselessComments.com

My PB stuff for Linux: "https://u.pcloud.link/publink/show?code ... z3MR0T3jyV
User avatar
Mindphazer
Enthusiast
Enthusiast
Posts: 460
Joined: Mon Sep 10, 2012 10:41 am
Location: Savoie

Re: PureMondrian

Post by Mindphazer »

Hello jacdelad
That's a nice game, thanks for that !
Do you think it could be possible to change the way to rotate a piece ?
I use a laptop, and on a touchpad, it's impossible to hold the left button and right-click at the same time !
Maybe you could consider usig a keyboard shortcut ?

Thanks a lot
MacBook Pro 16" M4 Pro - 24 Gb - MacOS 15.4.1 - Iphone 15 Pro Max - iPad at home
...and unfortunately... Windows at work...
AZJIO
Addict
Addict
Posts: 2191
Joined: Sun May 14, 2017 1:48 am

Re: PureMondrian

Post by AZJIO »

the shape could be rotated before dragging it.
Axolotl
Addict
Addict
Posts: 837
Joined: Wed Dec 31, 2008 3:36 pm

Re: PureMondrian

Post by Axolotl »

Hi Moulder,
.... I'm sure the other two Linux users will be happy. :p ....
Count three. I am determined to switch to Linux. :oops: :)
Sorry for OTM. Maybe this announcement increases the pressure on me.....
Just because it worked doesn't mean it works.
PureBasic 6.04 (x86) and <latest stable version and current alpha/beta> (x64) on Windows 11 Home. Now started with Linux (VM: Ubuntu 22.04).
User avatar
moulder61
Enthusiast
Enthusiast
Posts: 193
Joined: Sun Sep 19, 2021 6:16 pm
Location: U.K.

Re: PureMondrian

Post by moulder61 »

@Axolotl
Count three. I am determined to switch to Linux.
Well, if you have trouble making the switch to Linux I'm happy to help, if I can.
Whether that is getting PB working with a particular Linux distro or just choosing a distro in the first place.
Don't ask me about programming though. I know very little. :)

Moulder.
"If it ain't broke, fix it until it is!

This message is brought to you thanks to SenselessComments.com

My PB stuff for Linux: "https://u.pcloud.link/publink/show?code ... z3MR0T3jyV
User avatar
jacdelad
Addict
Addict
Posts: 2010
Joined: Wed Feb 03, 2021 12:46 pm
Location: Riesa

Re: PureMondrian

Post by jacdelad »

Ok, so...I'm thankful for all the input. I will do another version with some improvements, like an alternative method for rotating.

All other suggestions: Please do it yourself! You have the code and the permission to do this for your own purposes. As stated in the initial post, I just wanted to solve the master riddles shipped with the REAL game this program is based on. I just put the game around it to make it playable. If you rellay like it, I recommend you to buy the original (it's a great gift too, because it looks easy, but it isn't, at least on the harder stages).

However, I am developing "normal" software, like the Gerber module and man tools for the company I worked for. I'm not a game designer and designing/programming games is not tempting to me. This one is an "accident" which just came to life through the challenge of solving the REAL game. So I see it as done now and want to move on to other projects.

You could make it use the 3D engine, add sounds, use full screen and whatever. Like I said, everyone who wants to is invited to do so!
Good morning, that's a nice tnetennba!

PureBasic 6.21/Windows 11 x64/Ryzen 7900X/32GB RAM/3TB SSD
Synology DS1821+/DX517, 130.9TB+50.8TB+2TB SSD
User avatar
moulder61
Enthusiast
Enthusiast
Posts: 193
Joined: Sun Sep 19, 2021 6:16 pm
Location: U.K.

Re: PureMondrian

Post by moulder61 »

@jacdelad

I get where you are coming from. You did something as an experiment and it's turned into a monster!
I'm trying to write a game or two and they will be free for anybody to do anything with. If I charged money there would be an obligation on my part to fix stuff or develop it or whatever, and I'm not interested in doing that particularly. At the moment, it's a learning experience for me. If anybody enjoys it or learns something from it(even if it's how NOT to program!), that's a good thing.
Thanks for what you have done so far. :)

Moulder.
"If it ain't broke, fix it until it is!

This message is brought to you thanks to SenselessComments.com

My PB stuff for Linux: "https://u.pcloud.link/publink/show?code ... z3MR0T3jyV
User avatar
Kwai chang caine
Always Here
Always Here
Posts: 5494
Joined: Sun Nov 05, 2006 11:42 pm
Location: Lyon - France

Re: PureMondrian

Post by Kwai chang caine »

Nice game, thanks for sharing 8)
ImageThe happiness is a road...
Not a destination
User avatar
jacdelad
Addict
Addict
Posts: 2010
Joined: Wed Feb 03, 2021 12:46 pm
Location: Riesa

Re: PureMondrian

Post by jacdelad »

KCC likes it, now I can die in peace! :mrgreen:

@Mindphazer: I already did some changes, but I am suck on the notebook-rotation-problem. How would you offer a better method to rotate the piece? I genuinely have no idea...
@moulder61: Did you get it to work on Linux now?
Good morning, that's a nice tnetennba!

PureBasic 6.21/Windows 11 x64/Ryzen 7900X/32GB RAM/3TB SSD
Synology DS1821+/DX517, 130.9TB+50.8TB+2TB SSD
User avatar
Mindphazer
Enthusiast
Enthusiast
Posts: 460
Joined: Mon Sep 10, 2012 10:41 am
Location: Savoie

Re: PureMondrian

Post by Mindphazer »

jacdelad wrote: Mon Jul 08, 2024 10:03 pm @Mindphazer: I already did some changes, but I am suck on the notebook-rotation-problem. How would you offer a better method to rotate the piece? I genuinely have no idea...
Well, I tried to add a shortcutmenu with, for example the "R" key : while moving the piece, if you press the R key, it rotates just like when you right-click. But it doesn't work so far, and i didn't have time to understand why yet...
MacBook Pro 16" M4 Pro - 24 Gb - MacOS 15.4.1 - Iphone 15 Pro Max - iPad at home
...and unfortunately... Windows at work...
User avatar
jacdelad
Addict
Addict
Posts: 2010
Joined: Wed Feb 03, 2021 12:46 pm
Location: Riesa

Re: PureMondrian

Post by jacdelad »

Using a key shouldn't be a problem. Do you want full keyboard control?
Good morning, that's a nice tnetennba!

PureBasic 6.21/Windows 11 x64/Ryzen 7900X/32GB RAM/3TB SSD
Synology DS1821+/DX517, 130.9TB+50.8TB+2TB SSD
User avatar
Mindphazer
Enthusiast
Enthusiast
Posts: 460
Joined: Mon Sep 10, 2012 10:41 am
Location: Savoie

Re: PureMondrian

Post by Mindphazer »

Well, here's how I did, assuming I want to rotate the piece using the "W" key.
Add an enumeration

Code: Select all

Enumeration MenuElements
  #WKey
EndEnumeration
Then add this line after opening the main window :

Code: Select all

AddKeyboardShortcut(#MainWindow, #PB_Shortcut_W, #WKey)
Finally, add these lines in the main select, after Case #PB_Event_CloseWindow

Code: Select all

Case #PB_Event_Menu
  If EventMenu() = #WKey
    PostEvent(#PB_Event_Gadget,#MainWindow,#Canvas,#PB_EventType_RightClick)
  EndIf
MacBook Pro 16" M4 Pro - 24 Gb - MacOS 15.4.1 - Iphone 15 Pro Max - iPad at home
...and unfortunately... Windows at work...
User avatar
jacdelad
Addict
Addict
Posts: 2010
Joined: Wed Feb 03, 2021 12:46 pm
Location: Riesa

Re: PureMondrian

Post by jacdelad »

The canvas already offers reacting on keyboard inputs, so I'll prefer this. But thanks for the suggestion.
Good morning, that's a nice tnetennba!

PureBasic 6.21/Windows 11 x64/Ryzen 7900X/32GB RAM/3TB SSD
Synology DS1821+/DX517, 130.9TB+50.8TB+2TB SSD
User avatar
jacdelad
Addict
Addict
Posts: 2010
Joined: Wed Feb 03, 2021 12:46 pm
Location: Riesa

Re: PureMondrian

Post by jacdelad »

I updated the package on GitHub (be sure to get the Win.anim file too as it contains the new winning animation). Also: bugfixes, use "R" to rotate a tile while holding it, fixed opening links, like infratec posted, added icon for the compiled program...).
https://github.com/jacdelad/PureMondrian/tree/main
Good morning, that's a nice tnetennba!

PureBasic 6.21/Windows 11 x64/Ryzen 7900X/32GB RAM/3TB SSD
Synology DS1821+/DX517, 130.9TB+50.8TB+2TB SSD
User avatar
Mindphazer
Enthusiast
Enthusiast
Posts: 460
Joined: Mon Sep 10, 2012 10:41 am
Location: Savoie

Re: PureMondrian

Post by Mindphazer »

Hello Jac de Lad,
thanks for the update !
The way you manage keyboard is, indeed, simplier than the way i was doing it !
MacBook Pro 16" M4 Pro - 24 Gb - MacOS 15.4.1 - Iphone 15 Pro Max - iPad at home
...and unfortunately... Windows at work...
Post Reply