pygame is
Python
Simple DirectMedia Layer
 
 
pygame.org is
Site Swing
pyEmpires

pyEmpires - 0.2

Baris Aydek (dhalsim)

Tags:

Description

pyEmpires is a 2D, tile based, real-time strategy game. It uses isometric projection. A new game engine is been being developed and only pygame is used doing that. This game is under development. I'm looking for some pygame developers and 2d graphic artists. If you are interested in please contact me from baris dot aydek at gmail dot com There is a detailed info about game at homepage.

Changes

  • Map is a seperate file
  • New textures avaible, water, sand, grass: walking on sand is slower!
  • Group's are easier to find
  • Keyboard Shortcut XML file
  • Creating groups, and selecting them with CTRL+NUM_KEY
  • double clicking selects all units of that type
  • fixed a few bugs

Links

Home Page: https://www.ohloh.net/p/pyEmpires
Source: http://my-svn.assembla.com/svn/pyempires/trunk
Windows: http://my-svn.assembla.com/svn/pyempires/trunk/pyEmpires.zip
Mac: http://my-svn.assembla.com/svn/pyempires/trunk/pyEmpires.zip

Screenshot


click to view original size

Releases

pyEmpires - 0.2 - Sep 4, 2009
pyEmpires - 0.1 - Jul 18, 2009

Pygame.org account Comments

If you wish to leave a comment with your pygame.org account, please sign in first.

January 2, 2010 8:58am - Baris Aydek - nickname: (dhalsim)
No ResourceManager is not a unit itself but it is for loading units. look at the spriteClass method.
December 14, 2009 9:39pm - yanom - nickname: (yanom)
Also it looks very promising. I took a look at your code... is Class ResourceManager a game unit (dog it looks like)
December 14, 2009 9:38pm - yanom - nickname: (yanom)
Ah yes, the latest SVN version doesn't have the bug.
December 7, 2009 10:14am - Baris Aydek - nickname: (dhalsim)
Hi yanom, could you download it again and check if the problem is solved for you?
December 4, 2009 6:29pm - yanom - nickname: (yanom)
"
I got it to run by commenting out the code that tries to auto-detect screen resolution and replacing it with hard-coded values, maybe something to look at there.

Cool game though, very promising!
"

I have the same problem, what did you do to solve it?
November 2, 2009 11:32am - Baris Aydek - nickname: (dhalsim)
Sorry about the bug, I was planning to put the patch to a new release, but I'm still working on it. But you can always get a "stable" copy from svn/trunk

About the font problem, it seems to be a pygame bug. If you want to use your own font, simply put it to "resources" folder and call this:

pygame.font.Font("../resources/freesansbold.ttf", 12)

The path should be relative to the Main.py...

And if you prefer to use system fonts, try this:
http://www.pygame.org/docs/ref/font.html#pygame.font.SysFont

Also you are right about the lack of documentation. I will write an article on my blog as soon as possible.

Moving is tile based. First of all it calculates which tiles should be visited, also it uses objects and targets coordinates. (first and last directions)

Also you can check moveTo method in Units class. It calls findPath, and it calls getPath methods. getPath is the method which calculates tiles from the A* algorithm. If a path is avaible, constructPath will make a list of tiles to be visited. then on updateControl method objects' directions will be updated after every movement call.

I hope this helps, if you need any further help, you can contact me from my email: baris dot aydek at gmail dot com
November 1, 2009 1:27pm - Levente Zsíros - nickname: (zslevi)
The movement isn't grid based, is it?
November 1, 2009 1:21pm - Levente Zsíros - nickname: (zslevi)
Turkish comments in code doesn't help either.
November 1, 2009 1:08pm - Levente Zsíros - nickname: (zslevi)
I would be glad, if you wrote some high level overview of the engine to help potential modders (e.g. where is pathfinding implemented, where to put AI etc.)
November 1, 2009 1:05pm - Levente Zsíros - nickname: (zslevi)
I also had problems with fonts, even though I downloaded "freesansbold.ttf" and put it in every folder possible (Windows\Fonts\ and I activated it; to every meaningful game folder).

The following solved it:
src\textures\text.py line 70
modified from
font = pygame.font.Font(None, 17)
to
font = pygame.font.Font("freesansbold.ttf", 17)

The error message I previously got was:

C:\Documents and Settings\Zsiros\Dokumentumok\Downloads\pyEmpires\src>C:\Python2
54\python.exe Main.py
Traceback (most recent call last):
File "Main.py", line 327, in <module>
gui.run()
File "Main.py", line 182, in run
self.redrawAll()
File "Main.py", line 200, in redrawAll
show.execute()
File "C:\Documents and Settings\Zsiros\Dokumentumok\Downloads\pyEmpires\src\ga
me_screens.py", line 334, in execute
self.terminal.ekle('fps', fps)
File "C:\Documents and Settings\Zsiros\Dokumentumok\Downloads\pyEmpires\src\te
xtures\text.py", line 70, in ekle
font = pygame.font.Font(None, 17)
RuntimeError: default font not found 'freesansbold.ttf'
November 1, 2009 12:34pm - Levente Zsíros - nickname: (zslevi)
Oh, I thought the fix is already included in the release.
November 1, 2009 12:33pm - Levente Zsíros - nickname: (zslevi)
Problem still exists.
September 6, 2009 7:25am - Baris Aydek - nickname: (dhalsim)
Hi Timoty,
Thanks for the comments and the bug report :)
It probably was from your resolution is bigger than our map size. I reproduced the bug by decreasing map size. Now I made a patch, you can update via SVN or wait for 0.2.1 version
Thanks again
September 5, 2009 7:37am - Timothy Baldock - nickname: (timothy)
I got it to run by commenting out the code that tries to auto-detect screen resolution and replacing it with hard-coded values, maybe something to look at there.

Cool game though, very promising!
September 5, 2009 7:30am - Timothy Baldock - nickname: (timothy) - 4/5
Hi Baris,

I am getting the following error when I try to run the game:

~/Programming/pygame projects/pyempires/src$ python Main.py
Traceback (most recent call last):
File "Main.py", line 322, in <module>
gui = Main()
File "Main.py", line 92, in __init__
self.screenManager.createAllScreens()
File "/home/timothy/Programming/pygame projects/pyempires/src/game_screens.py", line 69, in createAllScreens
self.gameScreen = GameScreen(self.mainObj, name="Game", musicPath="../resources/music/game")
File "/home/timothy/Programming/pygame projects/pyempires/src/game_screens.py", line 308, in __init__
self.updateBackground(self.position)
File "/home/timothy/Programming/pygame projects/pyempires/src/game_screens.py", line 384, in updateBackground
self.backgroundSurface = self.wholeBackgroundSurface.subsurface(((self.position), (self.mainObj.resolution)))
ValueError: subsurface rectangle outside surface area

Looks like a very interesting project through from the screenshot :)
spotlight

 
our projects
pygame.org welcomes all python game, art, music, sound, video and multimedia projects. If they use pygame or not.
 
recent releases
Apr 16, 2014

Apr 13, 2014

Apr 9, 2014

Mar 21, 2014

Mar 18, 2014


Mar 15, 2014


Mar 14, 2014

Mar 13, 2014

Mar 11, 2014

Mar 9, 2014

... more!
 
for pygame related questions, comments, and suggestions, please see help (lists, irc)