VillagerSim - 1.0.5
A simulation of a small civilization
Nick Jarvis and Nick Wayne
A game we've working on for a while now. Our goal for this is to create an AI that can grow and colonize a world by itself without player input. Unfortunately as the AI isn't exactly working, we've added controls to work things such as placing buildings. Right now the entities that you will see are farmers, lumberjacks, and a builder because they are the only ones working. We are choosing to work on more engine based things for now, so updates might be less often.
TO RUN: run the "UpdatingVillagerSim.py" file
This is one instance of the entire world rendered at once:
Short demo - https://www.youtube.com/watch?v=9FjXN3hYSMI
Pygame.org account Comments
Rag'd 2014-03-02 22:05:28
Careful. I'm under linux and there a problem with uppercase letter. The program call .png and the image is .PNG !
Nick Jarvis 2014-03-03 03:34:13
Please elaborate, is this a problem with every call to open a .png file or just at a certain part?
Rag'd 2014-03-03 08:25:58
For few images. I think you work under Windows OS. This OS don't care about upper/lowercase unlike Linux (when you call a file with python, it require a OS call).
call Images/Tiles/MinecraftGrass.png -> MinecraftGrass.PNG
call Images/Tiles/Sand.png -> Sand.PNG
Images/Buildings/Dock.png -> Dock.PNG
Images/Entities/Villager.png -> Villager.PNG
Images/Buildings/Dark_LumberYard.png -> Dark_Lumberyard.png
Images/Buildings/Red_Lumberyard.png - > Red_LumberYard.png
Nick Jarvis 2014-03-03 14:08:02
So to be clear, Just those are causing the error? Would changing them all to uppercase break the program too? (Sorry I have very little experience on Linux)
Rag'd 2014-03-03 14:46:40
Exactely, just a difference uppercase or lowercase beetwin the call and the file occure the crash of the file image load - for Linux (and other unix systems) !
But, it's very simple to correct this with carefully name the files and the calls.
(sorry for my bad language, i'm french)
Nick Jarvis 2014-03-03 14:51:58
Oh no problem. I've gotta figure out how some of our files are uppercase while some are not... Thank you very much :)
Ireneusz Imiolek 2014-03-04 09:27:43
Looks interesting and very promising. Well done!
Regarding the letter case, best way to go about it is just go through all folders and change all *.PNG to *.png and change the 2 LumberYard files mentioned by Rag'd (Dark_LumberYard.png, Red_Lumberyard.png) - That's all I had to do to start it under Ubuntu.
miezebieze 2014-03-05 03:09:23
I think the best is, to lowercase ALL the directories and files (resources and code). This way, there will be few if not any errors. It's also viable for developers on case sensitive operating systems. Imagine two files with the same spelling but different casing; windows would cry and shout already while extracting.
Jeremy Gagnier 2014-03-03 03:46:50
This sounds really really awesome. If the computer can eventually colonize parts of the world, you could make it into a really awesome game where the player tries to disrupt them, or destroy them!
Rod 2014-03-10 10:30:13
Can't seem to get it to work..
Nick Jarvis 2014-03-10 21:32:09
Can you post the error message you are getting?
Rod 2014-03-11 06:52:16
I think its a python error, not your game. Some how my python and pygame doesn't work correctly. Guess I should try Pygame 1.9.1 for 2.7python instead of 3.2python.
MattFire1337 2014-03-18 05:00:45
Wow... I wish I could program something like this. This is awesome
metulburr 2014-06-05 18:09:22
Currently your program is Windows specific. Linux is case sensitive. Thus on Linux/mac when you run your program you get a pygame.error: Couldn't open Images/Tiles/Baby_Tree.png because the filename is actually baby_tree.png. Plus you have more files with extensions that are also uppercase in which i assume based on other posts here, that you are still loading it as lowercase.
However i dont even know how to run your program as you threw all your source code in the root directory. I tried a few py files and got some tracebacks, then tried test.py, no file called the AICivGame.py, then i gave up. I tried test.py on both linux and windows and get a black pygame window. Your readme does not describe how to test/run your code. So at that point i pretty much deleted it.
and you should read this regarding star imports http://www.python-forum.org/vi...
Markus H 2014-07-05 17:56:12
Have fork it at Github https://github.com/MarkusHacks... now it run at linux, change import * into right.
Iwan 'qubodup' Gabovitch 2014-09-17 23:31:10
Runing on Arch Linux. Annoying mousegrab and fullscreen, had to get into the code to do window mode and set resolution. Black screen at beginning made me think the game might be broken.
I'm not sure what's going on: people are running on water, there's on building info and it seems that I have no control over which building I am trying to place and buildings don't get placed. http://youtu.be/EQyUzpgVu3I Perhaps because I'm running from git?
It looks interesting though! Love me some hyperactive Settler 2 feel :)
Yaugho 2015-05-27 17:08:22
Adding compatibility to lower screen resolutions would help, I had to edit the screen size a bit, looks like your running Widescreen way above my native resolution so on first startup the I only saw about half the screen either way. Running it seemed smooth although I had a few instances where the villagers seem to start in water? (not sure if this is due to my screen_size edit) Due to this my cmd gets flooded with the 'SOMEONE IS DROWNING' print() message. -Looks great so far, will continue to play/mess with.
Nichromo221 2015-08-10 01:00:27
Looks great! :D
Edison Hsu 2016-03-30 20:37:52
Hi buddy, why I always meet some errors about the 'Vector2' ? Hope you can give me some suggestions