PowerPoint Creative
Log In or Register to participate in PPC!
PowerPoint Creative
Log In or Register to participate in PPC!

Go down
Jarek
Jarek
Featured Creator
Featured Creator
Posts : 341
Join date : 2018-12-06
Location : Poland

John's Chess 'n Checkers (Droughts) revamped Empty John's Chess 'n Checkers (Droughts) revamped

Sat Mar 05, 2022 1:06 pm
Hey johnr,

I took the liberty of adding some VBA code to your game.

Now you can:
- move pieces during the Slideshow View
- instantaneously set up a new game with just one mouse click

I hope you don't mind that I had to make some small adjustments to the menu items to incorporate the changes. I did try to keep to your original as much as posssible. You can download it here.

Moving the pieces:
Click the piece you want to move, then move your cursor over to the middle of the target square and wait still until the clicked piece "settles down" automatically by itself - resist the temptation to click the target square to set the piece manually. You have 2 seconds in wich to do so. You always have to wait out the full 2 seconds with your cursor over the target square. The 2 second time count down is visible directly on the piece being moved in the Checkers game.

Modern wood version:
I redid the graphics for this version. Available here.

Well, what do you think?

-----------------------------------------------------
EDIT: The links in this post don't work anymore - scroll down for a new download link


Last edited by Jarek on Fri Mar 11, 2022 2:03 am; edited 1 time in total

rusnakcreative and !C8Hypela/M!!fN+hj5w like this post

!C8Hypela/M!!fN+hj5w
!C8Hypela/M!!fN+hj5w
Featured Creator
Featured Creator
Posts : 147
Join date : 2021-04-28
Location : Nusantara

John's Chess 'n Checkers (Droughts) revamped Empty Re: John's Chess 'n Checkers (Droughts) revamped

Sun Mar 06, 2022 3:00 am
Online-matchmaking update when? xD

The countdown animation is pretty cool, though I guess it all just boils down to counting down from 2 to 0. BUT, it happened ON the checker piece and STAYS on there when its MOVED AROUND. And I think THAT is exactly where it gets really cool. Also...

Jarek wrote:resist the temptation to click the target square to set the piece manually.

Do you understand how much I just CANNOT?
Jarek
Jarek
Featured Creator
Featured Creator
Posts : 341
Join date : 2018-12-06
Location : Poland

John's Chess 'n Checkers (Droughts) revamped Empty Re: John's Chess 'n Checkers (Droughts) revamped

Sun Mar 06, 2022 3:13 am
HAHAHA John's Chess 'n Checkers (Droughts) revamped 1f606 

I think it's more of a "finger flick instinct" than temptation we all have developed!

The countdown displays only on original PPT shapes. If it's an imported graphic - like the chess pieces for both versions - it doesn't work because the code checks for a text field input. I was considering developing PPT shapes for the chess pieces just for that reason but effectively resisted the urge. The checkers pieces are simple PPT ovals so it works fine. The time can be adjusted in increments of 1 second. I found 2 to be most suitable. I found the vba snippet on the web.

!C8Hypela/M!!fN+hj5w likes this post

!C8Hypela/M!!fN+hj5w
!C8Hypela/M!!fN+hj5w
Featured Creator
Featured Creator
Posts : 147
Join date : 2021-04-28
Location : Nusantara

John's Chess 'n Checkers (Droughts) revamped Empty Re: John's Chess 'n Checkers (Droughts) revamped

Sun Mar 06, 2022 4:36 am
An idea popped into my mind from that drag-around feature, have you ever heard of a game called Chessplosion?

I was thinking of a slide filled with checkboard squares, and you need to click your chess piece to start the game (a pawn maybe?). When the chess piece latches onto your cursor, rooks and bishops started sliding from the screen borders and players need to avoid them. Not sure how knights and queen pieces would work, but what do you think? Is it possible?

Btw, Chessplosion trailer can be seen below, which is where the inspiration roughly comes from.

PPT Dev
PPT Dev
PPT Creator
PPT Creator
Posts : 81
Join date : 2020-07-09
Location : USA
https://www.youtube.com/channel/UCmHvRg60FMXwpwYV1TliCVw

John's Chess 'n Checkers (Droughts) revamped Empty Re: John's Chess 'n Checkers (Droughts) revamped

Sun Mar 06, 2022 4:39 am
As far as I am aware, there is a way to make things drag and drop in PowerPoint.
!C8Hypela/M!!fN+hj5w
!C8Hypela/M!!fN+hj5w
Featured Creator
Featured Creator
Posts : 147
Join date : 2021-04-28
Location : Nusantara

John's Chess 'n Checkers (Droughts) revamped Empty Re: John's Chess 'n Checkers (Droughts) revamped

Sun Mar 06, 2022 4:59 am
Well I mean... that's exactly what Jarek did right up there xP

I want to word that up as a challenge, but it didn't really got conveyed through properly. So here's the official notice, I guess.
Jarek
Jarek
Featured Creator
Featured Creator
Posts : 341
Join date : 2018-12-06
Location : Poland

John's Chess 'n Checkers (Droughts) revamped Empty Re: John's Chess 'n Checkers (Droughts) revamped

Sun Mar 06, 2022 7:10 am
Sorry Hypela at least I can't help you - I'm not a VBA programmer. Just happened to stumble upon a code snippet that drags objects around the screen in SlideShow View. BTW - johnr is a non-vba purist like I was until this moment  John's Chess 'n Checkers (Droughts) revamped 1f603 
rusnakcreative
rusnakcreative
Administrator
Administrator
Posts : 632
Join date : 2017-08-16
https://www.rusnakcreative.com

John's Chess 'n Checkers (Droughts) revamped Empty Re: John's Chess 'n Checkers (Droughts) revamped

Sun Mar 06, 2022 8:35 am
!C8Hypela/M!!fN+hj5w wrote:Well I mean... that's exactly what Jarek did right up there xP

I want to word that up as a challenge, but it didn't really got conveyed through properly. So here's the official notice, I guess.

If you're looking to recreate the video you shared, it is possible to do the drag and drop AND having to avoid obstacles. It's just a matter of knowing your X,Y location of the thing you're dragging and dropping, and the X, Y locations of everything else. If your drag-able object gets so close to an obstacle, you can tell the code that's a hit and then treat it as such. However, there's a lot going on that PowerPoint can't handle all of it at once, and the game performance will suffer. So yes, you can make it happen, but it won't be a good experience. Check out my Space Invaders to see what I mean about detecting objects.
PPT Dev
PPT Dev
PPT Creator
PPT Creator
Posts : 81
Join date : 2020-07-09
Location : USA
https://www.youtube.com/channel/UCmHvRg60FMXwpwYV1TliCVw

John's Chess 'n Checkers (Droughts) revamped Empty Re: John's Chess 'n Checkers (Droughts) revamped

Sun Mar 06, 2022 11:52 am
rusnakcreative wrote:
!C8Hypela/M!!fN+hj5w wrote:Well I mean... that's exactly what Jarek did right up there xP

I want to word that up as a challenge, but it didn't really got conveyed through properly. So here's the official notice, I guess.

If you're looking to recreate the video you shared, it is possible to do the drag and drop AND having to avoid obstacles. It's just a matter of knowing your X,Y location of the thing you're dragging and dropping, and the X, Y locations of everything else. If your drag-able object gets so close to an obstacle, you can tell the code that's a hit and then treat it as such. However, there's a lot going on that PowerPoint can't handle all of it at once, and the game performance will suffer. So yes, you can make it happen, but it won't be a good experience. Check out my Space Invaders to see what I mean about detecting objects.
Actually, there is a way that you can do it. Instead of making PowerPoint do it all at once, what you do instead is that you create your board in such a way so that it can be easily scanned by PPT as needed. For example, creating a matrix with textboxes on a hidden slide that PPT can easily reference. That way, instead of detecting collisions, all it has to do is check the corresponding boxes that are accessible via the matrix, and display them via animation triggers. It would take a lot of work, but you can make it run smoothly that way.
johnr
johnr
Administrator
Administrator
Posts : 939
Join date : 2017-08-17
Location : UK
http://www.powerpointgames.uk

John's Chess 'n Checkers (Droughts) revamped Empty Re: John's Chess 'n Checkers (Droughts) revamped

Sun Mar 06, 2022 12:38 pm
I downloaded the original, and the revised graphics files (which I do prefer to my original graphics!).

On opening, I didn't get any request to accept the macros, so subsequently, I couldn't move any pieces. Any idea what I did wrong?!

And also, I would also like to point out (as a non-VBAer) that all the effort, and hours of work you guys put in to getting drag & drop in VBA, have resulted in the same effect (but maybe with less efficiency) as the game in Presentation Mode which took no effort whatsoever. Just saying. Wink
Jarek
Jarek
Featured Creator
Featured Creator
Posts : 341
Join date : 2018-12-06
Location : Poland

John's Chess 'n Checkers (Droughts) revamped Empty Re: John's Chess 'n Checkers (Droughts) revamped

Sun Mar 06, 2022 1:31 pm
johnr wrote:And also, I would also like to point out (as a non-VBAer) that all the effort, and hours of work you guys put in to getting drag & drop in VBA, have resulted in the same effect (but maybe with less efficiency) as the game in Presentation Mode which took no effort whatsoever. Just saying. Wink

As a non-VBA purist you are absolutely right. I was too until only recently - I'm inevitably embracing the dark side of the force and sneaking snippets of VBA code into my PPT slides mainly to automate things. The additional mind effort this requires helps also to keep Alzheimer's disease at a distance  John's Chess 'n Checkers (Droughts) revamped 1f604 

It's odd that you don't get the yellow message bar with a shield icon and the Enable Content button. Try this:

Open PowerPoint.
Click File.
Click Options.
Click Trust Center.
Click Trust Center Settings.
Click Macro Settings.
Click Enable all macros (or Disable all macros with notification)
Click OK twice.

You deserve to have a go at your own game!
johnr
johnr
Administrator
Administrator
Posts : 939
Join date : 2017-08-17
Location : UK
http://www.powerpointgames.uk

John's Chess 'n Checkers (Droughts) revamped Empty Re: John's Chess 'n Checkers (Droughts) revamped

Sun Mar 06, 2022 3:03 pm
Hmmm, strange....did all of the above (Enable all macros) but still wouldn't play.
rusnakcreative
rusnakcreative
Administrator
Administrator
Posts : 632
Join date : 2017-08-16
https://www.rusnakcreative.com

John's Chess 'n Checkers (Droughts) revamped Empty Re: John's Chess 'n Checkers (Droughts) revamped

Sun Mar 06, 2022 7:58 pm
John's Chess 'n Checkers (Droughts) revamped Ppsm-s10

Right-click on the PPSM file and select Properties. At the very bottom is going to be a check box that you can "Unblock" which will allow macros to be ran. If you have your macro settings to "Always prompt" you'll see the prompt asking if you want to enable macros as soon as you open the file.
!C8Hypela/M!!fN+hj5w
!C8Hypela/M!!fN+hj5w
Featured Creator
Featured Creator
Posts : 147
Join date : 2021-04-28
Location : Nusantara

John's Chess 'n Checkers (Droughts) revamped Empty Re: John's Chess 'n Checkers (Droughts) revamped

Sun Mar 06, 2022 10:22 pm
Jarek wrote:Just happened to stumble upon a code snippet that drags objects around the screen in SlideShow View.

Yes, grant me that code snippet you stumbled upon, pretty please.

rusnakcreative wrote:If you're looking to recreate the video you shared, it is possible to do the drag and drop AND having to avoid obstacles. It's just a matter of knowing your X,Y location of the thing you're dragging and dropping, and the X, Y locations of everything else. If your drag-able object gets so close to an obstacle, you can tell the code that's a hit and then treat it as such. However, there's a lot going on that PowerPoint can't handle all of it at once, and the game performance will suffer. So yes, you can make it happen, but it won't be a good experience. Check out my Space Invaders to see what I mean about detecting objects.

Too much going on in the VBA/Macro section and the graphical performance will suffer, but what if we drop the collision-detecting code entirely and make up for that shortcomings by using motion-animated objects with Mouse Over action? (The traditionally dirty-work) Also played your Space Invader re-creation a few days ago, I tried to tear down the casing to see how it works inside... I also found out that all macros and VBAs from pptx's were password-protected, rip.

xPLAYn wrote:Actually, there is a way that you can do it. Instead of making PowerPoint do it all at once, what you do instead is that you create your board in such a way so that it can be easily scanned by PPT as needed. For example, creating a matrix with textboxes on a hidden slide that PPT can easily reference. That way, instead of detecting collisions, all it has to do is check the corresponding boxes that are accessible via the matrix, and display them via animation triggers. It would take a lot of work, but you can make it run smoothly that way.

I think I've seen something similar being done with the hidden slide thing before, I believe it was Houtarou's Crazy Hexagon. It certainly is a fine piece of craft, albeit having a somewhat unforgiving gameplay mechanic. Those hexagons closed-in too fast, I'll give it that. Any direction on where I can learn to do something like it?



If I were to become a non-VBA-purist, my catchphrase would be "Join the dark side, we have 'Mouse Over' Trigger." But alas, that's unfortunately not the case... yet.
johnr
johnr
Administrator
Administrator
Posts : 939
Join date : 2017-08-17
Location : UK
http://www.powerpointgames.uk

John's Chess 'n Checkers (Droughts) revamped Empty Re: John's Chess 'n Checkers (Droughts) revamped

Mon Mar 07, 2022 10:22 am
Whoo Hoo!! The 'Unblock' suggestion above worked a treat. Thanks Mike.

All I've got to do is learn how to play now. Wink
Jarek
Jarek
Featured Creator
Featured Creator
Posts : 341
Join date : 2018-12-06
Location : Poland

John's Chess 'n Checkers (Droughts) revamped Empty Re: John's Chess 'n Checkers (Droughts) revamped

Tue Mar 08, 2022 2:05 pm
How's it going John?
johnr
johnr
Administrator
Administrator
Posts : 939
Join date : 2017-08-17
Location : UK
http://www.powerpointgames.uk

John's Chess 'n Checkers (Droughts) revamped Empty Re: John's Chess 'n Checkers (Droughts) revamped

Thu Mar 10, 2022 5:22 am
Message reputation : 100% (1 vote)
It's going fine thanks. I can move all the pieces!

The problem is I'm not a very good chess player. I played against myself with your version and still lost!

Oh well.

!C8Hypela/M!!fN+hj5w likes this post

Jarek
Jarek
Featured Creator
Featured Creator
Posts : 341
Join date : 2018-12-06
Location : Poland

John's Chess 'n Checkers (Droughts) revamped Empty Re: John's Chess 'n Checkers (Droughts) revamped

Fri Mar 11, 2022 2:01 am
HAHAHA  John's Chess 'n Checkers (Droughts) revamped 1f604 

As a platform for practicing my VBA skills I'm still working with your Chess 'n Checkers game. It simply keeps on ispiring me to do so. 

Here is a version where you can save a game of chess or a game of checkers during a game. It works by creating a folder on your desktop (Chess-n-Checkers) and printing to it a pdf picture of the board setup each time you click Save Game, be it chess or checkers. The names  given to the files are unique so you don't overwrite the same file as long as the game saves are at least 1 minute apart. This also means that in order to recreate a game you have to manually setup the board using the pdf as a guide. It's just for fun and doesn't bring much to your existing game idea!

Download
johnr
johnr
Administrator
Administrator
Posts : 939
Join date : 2017-08-17
Location : UK
http://www.powerpointgames.uk

John's Chess 'n Checkers (Droughts) revamped Empty Re: John's Chess 'n Checkers (Droughts) revamped

Fri Mar 11, 2022 5:19 am
Jarek...Do you realise what you have just done?!


You have just got me slightly interested in what goes on...on the Dark Side. Keep this a secret but I have just ordered a copy of 'Powerful PowerPoint for Educators: Using Visual Basic for Applications to Make PowerPoint Interactive' Second Edition 2nd Edition by David M. Marcovitz







I got a used copy as the price for new is ridiculous. Price new on Amazon UK is over 100 GBP with postage (572 PLN / 130 USD).







We'll see what happens.
Jarek
Jarek
Featured Creator
Featured Creator
Posts : 341
Join date : 2018-12-06
Location : Poland

John's Chess 'n Checkers (Droughts) revamped Empty Re: John's Chess 'n Checkers (Droughts) revamped

Fri Mar 11, 2022 8:06 am
Yikes! That's horrendously expensive for the new copy - therefore must be really good! Very sensible of you buying used.

Yay! For your decision to join me for a Walk on the Dark Side. Just for the sake of keeping it an adventure and not a misfortune let's call it "Walk on the Wild Side". We can then form a VBA tandem to keep up each other's spirits when things start getting messy with all that VBA pouring in through all possibly available orifices in our bodies. We can call ourselves The Johnrek Duo and THIS could be our theme song albeit it's neither correct politically nor enough upspiriting but those were the times and here we are. 


 John's Chess 'n Checkers (Droughts) revamped 1f60e
Sponsored content

John's Chess 'n Checkers (Droughts) revamped Empty Re: John's Chess 'n Checkers (Droughts) revamped

Back to top
Permissions in this forum:
You cannot reply to topics in this forum