Magic 4x4

Advanced game related topics
User avatar
IceSoft
Addict
Addict
Posts: 1682
Joined: Thu Jun 24, 2004 8:51 am
Location: Germany

Re: Magic 4x4

Post by IceSoft »

@SPH,
Also a small bug:
The finish check is to late if all field filled and the next move can not change the boad.
"Game Over" comes not.
You have to make first a next(last) move which nothing changing on the board. only the move (press the key) have to be done before the 'finish' check is starting.
Last edited by IceSoft on Fri May 16, 2025 8:45 am, edited 1 time in total.
Belive! C++ version of Puzzle of Mystralia
<Wrapper>4PB, PB<game>, =QONK=, PetriDish, Movie2Image, PictureManager,...
Fred
Administrator
Administrator
Posts: 18162
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: Magic 4x4

Post by Fred »

I fixed a ScreenOutput() issue with DPI aware mode on Windows, should work with 6.21 final. You also need to change these lines to have the font size correct in DPI aware mode:

Code: Select all

Police = LoadFont(0, "Arial", DesktopUnscaledX(zoom/25))
Police2 = LoadFont(1, "Arial", DesktopUnscaledX(zoom/70))
Police3 = LoadFont(2, "Arial", DesktopUnscaledX(zoom/23))
Police4 = LoadFont(3, "Arial", DesktopUnscaledX(zoom/12))
After this change, all works fine here, good work !
User avatar
IceSoft
Addict
Addict
Posts: 1682
Joined: Thu Jun 24, 2004 8:51 am
Location: Germany

Re: Magic 4x4

Post by IceSoft »

@SPH,
Another improvement:
Its better to start with two tiles. It make it also clearer what is to do with 2 same tiles I think.
Belive! C++ version of Puzzle of Mystralia
<Wrapper>4PB, PB<game>, =QONK=, PetriDish, Movie2Image, PictureManager,...
User avatar
idle
Always Here
Always Here
Posts: 5836
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Re: Magic 4x4

Post by idle »

What sort of magic, is this!
Thanks for sharing
User avatar
NicTheQuick
Addict
Addict
Posts: 1504
Joined: Sun Jun 22, 2003 7:43 pm
Location: Germany, Saarbrücken
Contact:

Re: Magic 4x4

Post by NicTheQuick »

Shit, I made 2 wrong moves and now it's over... :(
Image
The english grammar is freeware, you can use it freely - But it's not Open Source, i.e. you can not change it or publish it in altered way.
User avatar
IceSoft
Addict
Addict
Posts: 1682
Joined: Thu Jun 24, 2004 8:51 am
Location: Germany

Re: Magic 4x4

Post by IceSoft »

NicTheQuick wrote: Fri May 16, 2025 12:38 pm Shit, I made 2 wrong moves and now it's over... :(
Image

Thats the situation => I miss the "GAME OVER" as I told here:
IceSoft wrote: Fri May 16, 2025 6:40 am @SPH,
Also a small bug:
The finish check is to late if all field filled and the next move can not change the boad.
"Game Over" comes not.
You have to make first a next(last) move which nothing changing on the board. only the move (press the key) have to be done before the 'finish' check is starting.
Belive! C++ version of Puzzle of Mystralia
<Wrapper>4PB, PB<game>, =QONK=, PetriDish, Movie2Image, PictureManager,...
User avatar
SPH
Enthusiast
Enthusiast
Posts: 561
Joined: Tue Jan 04, 2011 6:21 pm

Re: Magic 4x4

Post by SPH »

v1.1d (post 1)
Animation almost finished.
Graphic enhancements.
Advice from Fred and IceSoft corrected...

:wink:

!i!i!i!i!i!i!i!i!i!
!i!i!i!i!i!i!
!i!i!i!
//// Informations ////
Portable LENOVO ideapad 110-17ACL 64 bits
Version de PB : 6.12LTS - 64 bits
User avatar
IceSoft
Addict
Addict
Posts: 1682
Joined: Thu Jun 24, 2004 8:51 am
Location: Germany

Re: Magic 4x4

Post by IceSoft »

@SPH
BUG?
Sometimes the first stone has not the value 2
Belive! C++ version of Puzzle of Mystralia
<Wrapper>4PB, PB<game>, =QONK=, PetriDish, Movie2Image, PictureManager,...
User avatar
SPH
Enthusiast
Enthusiast
Posts: 561
Joined: Tue Jan 04, 2011 6:21 pm

Re: Magic 4x4

Post by SPH »

IceSoft wrote: Fri May 16, 2025 8:49 pm @SPH
BUG?
Sometimes the first stone has not the value 2
it's not a bug: the added piece (even the first one) is always a 2 or a 4 (and this, throughout the game)

Code: Select all

2+Random(Random(1)*2)

!i!i!i!i!i!i!i!i!i!
!i!i!i!i!i!i!
!i!i!i!
//// Informations ////
Portable LENOVO ideapad 110-17ACL 64 bits
Version de PB : 6.12LTS - 64 bits
User avatar
IceSoft
Addict
Addict
Posts: 1682
Joined: Thu Jun 24, 2004 8:51 am
Location: Germany

Re: Magic 4x4

Post by IceSoft »

IceSoft wrote: Fri May 16, 2025 8:44 am @SPH,
Another improvement:
Its better to start with two tiles. It make it also clearer what is to do with 2 same tiles I think.
@SPH
What are you think about this "improvement"?
Belive! C++ version of Puzzle of Mystralia
<Wrapper>4PB, PB<game>, =QONK=, PetriDish, Movie2Image, PictureManager,...
User avatar
SPH
Enthusiast
Enthusiast
Posts: 561
Joined: Tue Jan 04, 2011 6:21 pm

Re: Magic 4x4

Post by SPH »

IceSoft wrote: Sat May 17, 2025 4:26 am
IceSoft wrote: Fri May 16, 2025 8:44 am @SPH,
Another improvement:
Its better to start with two tiles. It make it also clearer what is to do with 2 same tiles I think.
@SPH
What are you think about this "improvement"?
Meh... :?

And then, a piece allows you to project it against the wall of your choice. And then, you quickly understand what to do.
But thanks for the suggestion. :wink:
On the other hand, I would code the possibility of going back 5 moves if we say to ourselves that we should not have done a manipulation :mrgreen:

!i!i!i!i!i!i!i!i!i!
!i!i!i!i!i!i!
!i!i!i!
//// Informations ////
Portable LENOVO ideapad 110-17ACL 64 bits
Version de PB : 6.12LTS - 64 bits
User avatar
NicTheQuick
Addict
Addict
Posts: 1504
Joined: Sun Jun 22, 2003 7:43 pm
Location: Germany, Saarbrücken
Contact:

Re: Magic 4x4

Post by NicTheQuick »

SPH wrote: Fri May 16, 2025 4:47 pm v1.1d (post 1)
Animation almost finished.
Graphic enhancements.
Advice from Fred and IceSoft corrected...

:wink:
A bit of feedback here: I don't like the flickering of new tiles. Can you make it optional or change the animation? Maybe implement some kind of growing tile. So it starts a bit smaller and grows into normal size? I think that would look way better.
The english grammar is freeware, you can use it freely - But it's not Open Source, i.e. you can not change it or publish it in altered way.
miso
Enthusiast
Enthusiast
Posts: 410
Joined: Sat Oct 21, 2023 4:06 pm
Location: Hungary

Re: Magic 4x4

Post by miso »

Also, with the new PB versions (they got a new compiler check) Line 359:

Code: Select all

DisplayTransparentSprite(plateau(x+1,y+1),x*zoom/4,y*zoom/4,flash+150)
[ERROR] DisplayTransparentSprite(): A sprite should be created with the flag #PB_Sprite_AlphaBlending to use this command.
User avatar
SPH
Enthusiast
Enthusiast
Posts: 561
Joined: Tue Jan 04, 2011 6:21 pm

Re: Magic 4x4

Post by SPH »

@Nikthequick:
I like it.
I might create other effects and let the player choose.

@miso:
Oh! I haven't looked into this option because I'm still using an old version of PB. But if the latest version makes this option mandatory, then I'll do it.
(I'm downloading the latest version right away....)

EDIT
@miso:
... I downloaded version 6.21b9, but I don't understand how to use "PB_Sprite_AlphaBlending."
Can you help me concretely?

!i!i!i!i!i!i!i!i!i!
!i!i!i!i!i!i!
!i!i!i!
//// Informations ////
Portable LENOVO ideapad 110-17ACL 64 bits
Version de PB : 6.12LTS - 64 bits
miso
Enthusiast
Enthusiast
Posts: 410
Joined: Sat Oct 21, 2023 4:06 pm
Location: Hungary

Re: Magic 4x4

Post by miso »

It's the beta 9, so you might not want to. (But this will be with the new final release.)
Post Reply