Hello,
I am not a native speaker...
I have been assigned to a group of 5 students. We have had an introduction to python last year (30h theory + 30h on PC, approximately) and now we have to create a game.
We use python, tkinter
Many groups have choosen to replicate an existing game... but I suggested to create one, to develop the game based on what we have learned rather than "go fetch". We have to establish the project by the end of the week and realize it within two months. The conception is done, but then we have to write the program.
So, it is a single window project, with a map (7*7 tiles), a menu bar and a text-display bar, below; a menu would be nice, if we manage to create save files, but won't be the first focus. We will probably not create an AI, so it will be 2 players.
Tiles generate an income, based on displayed values. With this income, units (3 types) can be built, from specific base-tiles. And there are extra-income on some tiles, allowing to gather magic (temp boosts to units). The units must destroy the other base and conquer the tiles to increase income.
It's quite simple, might not be much more fun than OXO, but we will stick to our level... we are studying electromechanics, not computer science...
So, my first problem is with canvas...
I am not a native speaker...
I have been assigned to a group of 5 students. We have had an introduction to python last year (30h theory + 30h on PC, approximately) and now we have to create a game.
We use python, tkinter
Many groups have choosen to replicate an existing game... but I suggested to create one, to develop the game based on what we have learned rather than "go fetch". We have to establish the project by the end of the week and realize it within two months. The conception is done, but then we have to write the program.
So, it is a single window project, with a map (7*7 tiles), a menu bar and a text-display bar, below; a menu would be nice, if we manage to create save files, but won't be the first focus. We will probably not create an AI, so it will be 2 players.
Tiles generate an income, based on displayed values. With this income, units (3 types) can be built, from specific base-tiles. And there are extra-income on some tiles, allowing to gather magic (temp boosts to units). The units must destroy the other base and conquer the tiles to increase income.
It's quite simple, might not be much more fun than OXO, but we will stick to our level... we are studying electromechanics, not computer science...
So, my first problem is with canvas...
[color=#2c3e50]import Tkinter window = Tkinter.Tk() display = Canvas(window, width=1500, height=900) display.create_rectangle(25, 25, 1100, 600, fill="grey") display.create_rectangle(1125, 25, 1475, 600, fill="blue") display.create_rectangle(25, 625, 1475, 875, fill="white") display.pack() window.mainloop()[/color]Earlier this afternoon, python did not identity 'Canvas' : not defined. Later on, it worked and it displayed the three coloured rectangles, well placed. And now, "canvas is undefined"... again...