Chess game?

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
User avatar
isobellesophia
Miko-Class Veteran
Posts: 979
Joined: Mon Jan 07, 2019 2:55 am
Completed: None
Projects: Maddox and Friends! (AI Teacher friend), Friendly Universities! (Soon)
Organization: Friendly Teachers series
Deviantart: SophBelle
itch: Child Creation
Location: Philippines, Mindanao
Contact:

Chess game?

#1 Post by isobellesophia »

Hello and good evening,

Is there any code example for chess game?

Sorry if this is was too short to ask,

thanks.
I am a friendly user, please respect and have a good day.


Image

Image


User avatar
namastaii
Eileen-Class Veteran
Posts: 1350
Joined: Mon Feb 02, 2015 8:35 pm
Projects: Template Maker for Ren'Py, What Life
Github: lunalucid
Skype: Discord: lunalucid#1991
Soundcloud: LunaLucidMusic
itch: lunalucid
Location: USA
Contact:

Re: Chess game?

#2 Post by namastaii »

https://python-chess.readthedocs.io/en/latest/

https://r3dhummingbird.itch.io/chessgame-in-renpy - maybe they left the code unarchived.

It'll have to be in python

User avatar
Autumnotopia
Regular
Posts: 59
Joined: Sun May 19, 2019 8:53 pm
Completed: Making Friends
Tumblr: autumnotopiadev
Github: autumngreenley
itch: autumnotopia
Contact:

Re: Chess game?

#3 Post by Autumnotopia »

I'm also working on a chess minigame, the itch.io engine is super useful! (And the code is intentionally unarchived, I believe). In the public domain and everything. Thanks for the link, even though it wasn't even my question haha. Looking into it, you can also find the code/github for it here
Image
A game about loneliness, chess, and fighting monsters with magic

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3785
Joined: Mon Dec 14, 2015 5:05 am
itch: Imperf3kt
Location: Your monitor
Contact:

Re: Chess game?

#4 Post by Imperf3kt »

The cookbook has a great working chess game by RLinZ
viewtopic.php?f=51&t=50997
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor

Twitter

User avatar
isobellesophia
Miko-Class Veteran
Posts: 979
Joined: Mon Jan 07, 2019 2:55 am
Completed: None
Projects: Maddox and Friends! (AI Teacher friend), Friendly Universities! (Soon)
Organization: Friendly Teachers series
Deviantart: SophBelle
itch: Child Creation
Location: Philippines, Mindanao
Contact:

Re: Chess game?

#5 Post by isobellesophia »

Thanks guys! But how would i make a button for it? Like when you press that button, you'll be sent in the chess game. (playing with the character tbh.)
I am a friendly user, please respect and have a good day.


Image

Image


User avatar
namastaii
Eileen-Class Veteran
Posts: 1350
Joined: Mon Feb 02, 2015 8:35 pm
Projects: Template Maker for Ren'Py, What Life
Github: lunalucid
Skype: Discord: lunalucid#1991
Soundcloud: LunaLucidMusic
itch: lunalucid
Location: USA
Contact:

Re: Chess game?

#6 Post by namastaii »

You'd show it like any screen with a button..

User avatar
Alex
Lemma-Class Veteran
Posts: 3090
Joined: Fri Dec 11, 2009 5:25 pm
Contact:

Re: Chess game?

#7 Post by Alex »

isobellesophia wrote: Wed Sep 11, 2019 10:27 pm Thanks guys! But how would i make a button for it? Like when you press that button, you'll be sent in the chess game. (playing with the character tbh.)
That depends of what exactly you need - press a button to play a game from start till... kind of end, or button to open/close the same game (like you play some, leave it for some time and later came back to play it further)?

In any case copy/paste chess-game code into your project, find the label where this game starts and name it not to be 'start'. So later in your game you'll be able to call this label to start the chess game.
Then, the first option would be to call this label each time the button pressed.
The second option would be to make a button to just show/hide the game screen without calling the game label.

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Majestic-12 [Bot]