Skip to main content

"Checkers' board"

Hello everyone!.. I am writing this post to tell you all, about my progress so far in making "The Checkers", and what I 've been doing so far . So, as in previous post I discussed about my planning in making the game. Now, I have started working for the implementation of the game . You can see the game board below which I made using this code;

import pyglet
from pyglet.window import key
from pyglet.window import mouse
from pyglet.window import gl
 
class checkers(pyglet.window.Window):
    bgimage=pyglet.resource.image('a.png')
    def __init__(self):
        super(checkers,self).__init__(600, 600,
              resizable=False# Make sure it is not resizable
              caption="checkers"# Caption of window
              config=pyglet.gl.Config(double_buffer=True),  # Avoids flickers
              vsync=False  # For flicker-free animation
              # Calling base class constructor
        # Get an instance of current platform
        platform = pyglet.window.get_platform()
        # Get an instance of current display
        display = platform.get_default_display()
        # Get an instance of current screen
        screen = display.get_default_screen()
        # Make sure that game approximately is placed as center of screen
        # This will adjust for different resolution. Relative positioning
        # Using resolution to center game window
        self.set_location(screen.width//2-250,screen.height//2-300)
         
    def on_draw(self):   ##This is my draw function which is implementing images.
            self.clear()
            self.bgimage.blit(0,0)
if __name__=="__main__":
    mygame=checkers()
pyglet.app.run()
Image result for chess board
     So this is the work I did initially and in the next post I well tell you about the further implementation of the game and the changes I made in it.Wait for my next blog, it is gonna publish soon...

Comments

Popular posts from this blog

Introduction to the new project

              Hello everyone, This is my introductory blog, for a new project of CT II. I have started working on this new game project, which is "Piano Tiles". In my first project I was using "Tkinter", but for this game I will be using "Pygame", because I think making "Piano Tiles" will become easy if I use "Pygame". About Pygame:     Pygame is a set of python modules specially designed for writing games. It has amazing                      features with excellent SDL library. Also by using pygame, the logic can be implemented in                small amount of code. Initial plan:    So initially I have desided to make the game window for the game and hopefully add music into it.      Then from on wards I will start working in the same way, making logic for the game by analyzing      the conditions ...

The Journey of little Hayy

''Mysticism and Rational Quest in Hayy Ibn Yaqzan by Ibn Tufayl''  In this paper I shall try to explore the text of Ibn Tufail’s, highlighting the key points and factors that have been described in the readings. According to the definition of Mysticism, “the belief that direct knowledge of God, spiritual truth, or ultimate reality can be attained through subjective experience (as intuition or insight),” and according to my understanding it is the real truth, reality or attaining direct connection to the divine, such that the finder in its search of the divinity become one with divine . The term Rational quest means "a piece of work, a strategy ( hikmat ), or observation that is completely based on logic and reasoning through natural ways ". Over all the phrase of the topic says to ''discover the spirituality or the divine by using thoughtful hypothesis, and careful observation to confirm those hypothesis by using your intellectual ( aqal )'...

5 easy business ideas you can easily start today

Starting a business is tough, it’s a long hard slog, and probably, you are destined to fail. But getting a business off the ground is only a problem you’ll face if you can come up with a business idea to begin with. Running a company for about two years, takes time, and a lot of ‘meetings’ at pubs to eventually come up with something you want to do, but all just you need to have a brilliant idea, and interest in doing it with heart & soul. Here I am giving the examples of five business ideas which can be easily start, and does not require any risk of a big investment.  1. Childcare The perfect business for stay at home parents. If you really love looking after children, then look after other people’s kids while yours are at school. You can become a registered childminder, or even open a day care center. 2. Tutor Some people just love teaching, they really enjoy helping others learn. If that’s you, then you should be making money out of it! The tutoring industry is mass...