PDA

View Full Version : MaxDe - physics based game for Linux (64-bit)



Jonax
26-07-2022, 01:01 PM
I'm pleased to present the physics based Linux Freeware game MaxDe.


https://www.jonax.se/linux/maxde.php


Like previous projects MaxDe got very modest system requirements and runs well on virtual machines.


The controls are very simple. Just use the any key at the right moments. A little patience and some dexterity helps.


I can't take credit for the concept. That honour goes to renowned 19th century physicist James C Maxwell with his famous Gedankenexperiment -Maxwell's Demon.

Here used for gameplay to challenge your patience and dexterity. You got to play the part of the Demon.


The more scientifically interested may instead use the program for evaluating the process of spontaneous order appearing.
With a few molecules spontaneous order appears in a reasonable timeframe, but how about more crowded systems?
That's for you to find out.


Either way. I hope you will enjoy the MaxDe

Ñuño Martínez
28-07-2022, 04:01 PM
Curious game. Simple.

A problem: it doesn't look nice with a dark theme.

1586

You should force color to black or something.

Jonax
28-07-2022, 05:47 PM
Curious game. Simple.

A problem: it doesn't look nice with a dark theme.

1586

You should force color to black or something.

Thanks for feedback Ñuño. :)

Indeed that doesn't look nice and was not intended.
I think that is punishment for me being lazy and selecting the predefinded color clBitBtn instead of figuring out the hex code för the desired light gray I wanted. Looked good enough for me at home but I don't use dark theme so wasn't aware of that effect. Should have guessed it was risky to use predefined color. At least the money-green color seems to behave well in dark mode too.

I'll make a new version trying to fix the dark theme.

A trickier problem is the font. Captions should be black and not white. I Don't think I made any strange settings there and I don't know why they appear white for you. Any suggestions?

Lastly I can mention I got feedback from elsewhere. Apparently the game is considered too slow. It is a zen style game but I can see that the default number of balls make it too tranquil. Next version will start with 16 balls to give some immediate challenge.

Update ongoing: but may take some time.

Jonax
29-07-2022, 11:52 AM
Game updated. Slightly different colouring. Icon slightly adjusted. Start-mode now the more challenging 32 balls. I'm afraid speed got to remain the same.


Since it's still in preview mode I was lazy and let the new exectuable keep the same name. :-[
So no new version number but new SHA512 checksum

https://www.jonax.se/enzip/MaxDe.png



https://www.jonax.se/linux/maxde.php

Ñuño Martínez
29-07-2022, 04:02 PM
A trickier problem is the font. Captions should be black and not white. I Don't think I made any strange settings there and I don't know why they appear white for you. Any suggestions? Captions looks white because default color for text in dark mode is white.

I've test the updated version and text are still white.

As a suggestion, what about allow to select the number of balls?

Jonax
29-07-2022, 05:19 PM
As a suggestion, what about allow to select the number of balls?

Thanks again for valuable feedback :) Very helpful and much appreciated.

I have no plan for the white text right now. Got to see if there is some solution.

Actually there is already a way to select the number of balls but I now see that I was not very clear about that option.

Got to make that clearer somehow. I guess I got to write a line about that on the website and give the the instructions a more prominent space in the What-to-Do form.

How to select number of balls? Well, you got five difficulty levels. Selectable with keys 1, 2, 3, 4, 5 on the main keyboard.

SilverWarior
30-07-2022, 08:15 PM
I think that is punishment for me being lazy and selecting the predefinded color clBitBtn instead of figuring out the hex code for the desired light gray I wanted.

There is nothing wrong about using predefined colors. You just need to use Delphi or in your case Free Pascal predefined static colors and not system defined colors. How do you know which ones are static and which defined by system?
You can find out this simply by typecasting the color value to an integer. If it is positive then it represents Delphi/Free Pascal defined static color. But if it is negative then it corresponds to a specific system defined color that can be changed on system side through UI settings or UI themes being used.

Here is a few examples:

clBlack = 0
clBtnText = -16777198
clGray = 8421504
clGrayText = -16777199



I have no plan for the white text right now. Got to see if there is some solution.

Not sure if this is same in FPC/Lazarus but in Delphi you change text color through Font property. Default font color is set to clBitBtnText which is a system defined color (as shown above it has negative value).

Jonax
31-07-2022, 08:48 AM
@SilverWarior : Thanx for yet a piece of instructive and useful feedback.

I have to look into those negative color values. As you say this may be one of the cases where Lazarus and Delphi differ slightly but either way the situation got to be addressed somehow.

Meanwhile I have made color changes which I hope will be readable for both dark and light themes.

The start screen is also changed so the first thing the player must do is to chose difficulty level (keys 1-5)

I hope the game will behave better now and be interesting despite the slow pace and low action.



https://www.jonax.se/enzip/MaxDeStart.png
^ Start mode. Select difficulty with keys 1, 2, 3, 4 or 5

https://www.jonax.se/enzip/MaxDeOngoing.png
^ Ongoing

SilverWarior
31-07-2022, 10:52 AM
Meanwhile I have made color changes which I hope will be readable for both dark and light themes.

I liked your previous color choice more. Current button colors are to vibrant and thus stand out to much.


The start screen is also changed so the first thing the player must do is to chose difficulty level (keys 1-5)

In order to make choosing of difficulty more intuitive I recommend you make use of the RadioGroup component. Ant to make radio group horizontal just make sure that you change its column property to the number of radio buttons that it contains (5 in your case).
You could still keep keyboard binding for choosing desired difficulty quickly and add two more with left and right keys increasing and decreasing the difficulty respectively.

Jonax
01-08-2022, 02:11 AM
Indeed the current colors are a bit strong. I obviously liked the paler type of color from the earlier version. This is more of an attempt to make the captions and text more readable for the dark mode users. That white font on pale background is not looking good, as pointed out by Ñuño Martínez.

I still haven't tried/managed to force the font to black so this is a mitigating attempt.
The hope is that though the colors may be a bit strong at least most user can read the letters and better see what's going on and what's to do.

Using a RadioGroup for selecting difiicutly is an interesting idea. I generally like using the available Lazarus components, when possible. Why invent the wheel again when so much userful stuff is already available?

SilverWarior
01-08-2022, 03:24 PM
I generally like using the available Lazarus components, when possible. Why invent the wheel again when so much userful stuff is already available?

I gathered that much already :D
As far as I know RadioGroup is a standard component that comes with Lazarus. That is also why I recommended it;)

Jonax
02-08-2022, 09:58 AM
I gathered that much already :D
As far as I know RadioGroup is a standard component that comes with Lazarus. That is also why I recommended it;)

RadioGroup is standard in Lazarus too. Very useful, them standard components :)

About the keys 1-5 for selecting difficulty I actually got a special reason for chosing them.
Why? It's for the benefit for younger users who may learn/confirm a tiny bit of knowledge from this.
That is the number (of balls) is 2^(selected key-number). 2¹ = 2, 2²=4, 2³=8, 2⁴=16 and 2⁵= 32.

Not much but this is a game and not a physics and math lesson.

SilverWarior
02-08-2022, 03:11 PM
About the keys 1-5 for selecting difficulty I actually got a special reason for chosing them.
Why? It's for the benefit for younger users who may learn/confirm a tiny bit of knowledge from this.
That is the number (of balls) is 2^(selected key-number). 2¹ = 2, 2²=4, 2³=8, 2⁴=16 and 2⁵= 32.

That is interesting. But using RadioGroup would not deviate from this since RadioGroup buttons would also be marked from 1 to 5.
Now using of RadioGroup also has another possible advantage. And that is giving you an option to make whole game being controllable by just mouse or perhaps even through touch screen interface (not sure how good is support for these in Lazarus). Modern Delphi versions provide touch support right from the start without any additional code necessary (that is unless you are interested in special.gestures).

Jonax
05-08-2022, 09:47 AM
@SilverWarior: you are right of course. The game is not playable with mouse only now. Was not the intention when this project started but it turned out that way. I'm not sure I got the time and energy to squeeze in some mouse control option. But I'll keep that in mind. Maybe some options will appear in future revisions of the MaxDe.

I would assume the touching a touch screen gadet is more or less equal to using a mouse, but I figure most of those gadgets runs on android or apple OS anyway. Would be nice to create software for those too but that also got lower priority, because limited time and resources. It's good to learn the Delphi is doing well with touch screen gadets. I have no idea about the status for Lazarus. But that is not yet a problem for me. Still fully occupied making stuff for Linux PC's.

I'm not sure how many more revisions of the MaxDe there will be but I made an attempt to return to previous paler colours and to force the font color to (almost) black.
How? by assigning the forms an almost black color. Will it work adequately? I hope so but don't know yet. There always seem to be surprises when other users try the software..

Anyway. The latest version is available. Still same name but new checksum of course.

https://www.jonax.se/enzip/MaxDe220805.png

Jonax
18-08-2022, 07:39 PM
I'll probably only make minor cosmetic changes, if any, on this program. However I can mention there is already a cheat option. Just click the "Jonax || 2022" icon and the balls will start sorting themselves out. No AI involved. Just pure raw cheat.

About plans for next project. It's all still vague but the idea is to stay with the Demon theme After Maxwell's Demon it's time to do something with the other famous one from the 19th century. Laplace's Demon. ;) Just kidding. Doing the Laplace would be too much, I'm afraid.