Ok, quite a large update is on the way.
Procedurally generated:
- forests
- oceans
- grass
- temperature
Here are some world map pics for you:


Release soon hopefully…
Ok, quite a large update is on the way.
Procedurally generated:
Here are some world map pics for you:


Release soon hopefully…
Ok quite a large amount of fixes today:
I’ve tested the world size up to 1600 x 1600 and everything seems to be functioning correctly. (make sure to set the town and tree density to a lower number if you do this. Lower the number, the more of themthere is btw)
On another note coding has been slower since I changed my keyboard layout to colemak yesterday and I’m still trying to get used to it.
Source: untitled.25.08.08.tar
I think I ought to make a name for this thing…
EDIT: Finally got my pc with windows installed on it back up so I can test a bit.
Changed the readme slightly.
OK that’s me finally got SDL implemented, I’ve really not been concentrating much on getting the game advanced this week, mainly just going over python docs and really familiarizing myself with them.
Soo onto the release, like I said SDL is implemented in the form of pygame. (this is a python only release for now i’m afraid)
This is a good thing for dev time however, it should now allow me to speed up developing the fun parts instead of worrying about confusing errors caused by the way I used to draw the ASCII.
At the moment this release is somewhat of a holdover, something to mess around with until I actually get visitable towns etc working in the python releases.
Randomly placed towns are in, as well as a fully scalable world. So feel free to mess around with the settings but be prepared for some possible crashes. *its not very well tested yet*
for now I think I’m going to leave the environment as blocks but it will hopefully be quite simple to get little trees and town images instead of the ASCII or block color I have now.
Instructions are included in the read me, and as usual I suggest 7-zip for unpacking the tar.gz if you are a windows user.
Source: Untitled.24.08.08.tar.gz
- Bill
WEDNESDAY:
________________________________________________________________________________________
Apart from today, I’ve not really been doing all that much on the game engine this week. I’ve mainly been trying out random snippets of graphics code.
Today however I ported most of the engine over to python so I can use the pygame, SDL libraries. This has increase development speed quite a bit as I’m no longer confined to printing everything to console. (and also because python seems quicker to program in)
I’ll probably update the c++ version with SDL as soon as i’ve got comfortable working with it in python. OpenGL is a possibility for the future, although I’ll not say when. At least a while away yet anyways.
I think I’m going to try and keep the two language versions, meaning that people can pick the language they prefer coding in.
At the moment I’m having some problems getting my camera to follow the player, as i’ve already implemented basic LOS.
Hopefully a minor release sometime soon!
MON - TUES:
_________________________________________________________________________________________
Decided that I needed to keep a log of all my coding stuff on the tuesday night while at work.
So far i’m just trying to make my untitled game a bit more modular by splitting it up into several source files, Having a bit of a problem though.
The errors: Getting a “not defined in this scope” error whenever I try to pass variables to functions in different source files.
Got most of the base stuff set up tho, like showing the town. Learning about structs within structs which is actually VERY useful at the moment. Used a position struct and also a size struct, so I can do world.size.y. Nice.
Loving using vim. Got my keyboard shortcuts set up the other day for tabs to to and it REALLY improves my work flow.
Agh so close to getting it compiling. I’m having problems with scons, using Program(['main.cpp','makeworld.cpp']) in scons.
The errors: i’m getting multiple definition errors. meh.
Ok I seem to have fixed the multiple definitions prob. Used the extern tag and it seems to be ignoring that now. Now of course I have another problem: makeworld.cpp: Undefined reference to ‘Player’.
WEDNESDAY:
_________________________________________________________________________________________
6:29AM: Right got a small amount of code compiled by using extern in a header file and then defining an int above the main in main.cpp. now to try it with the classes
6:32AM: Wow that worked! Think i’ll go on with this when i’ve had some sleep.
2:06PM: Had some real problems getting them to link up properly, kept getting PLAYER is not defined or some such. Fixed itself after while of me messing around with the class names etc.
Had some problems caused by me trying to put Player.pos.y = 15 in a header file until I realised that this would probably cause multiple definitions.
going to be using vectors I think for World.features because that will allow me to change the size of the world dynamically according to the players choice.
5:12PM: Cancel that vectors idea, I was having trouble getting the 2 dimensional vectors up and running so I’m sticking with an array of strings for the moment, memory intensive - hell yeah, but its going to get the job done until I have to use vectors. (They are most likely a placeholder)
I’ve done something interesting with the world drawing this time. Instead of building the entire world from scratch each time the player moves, now what happens is that only the squares around the player are built again and then the world is drawn. This seems to be quite a bit faster so far, although I may run into problems doing this later with other people on the map. (traders etc.)
At the moment i’m passing all the classes and functions around the cpp files in their entireity, although I think i’m going to want to get a pointer system set up soon, as I can see it becoming quite CPU intensive once my player class is properly fleshed out.
THURSDAY
_________________________________________________________________________________________
01:45AM: Got variable view distance working. (In a very basic form, although with support for changing it on the fly which will be usefull for dungeons, night etc.) Run into a small problem, which is that when the player nears the edge of the map I get an error.
The error: ‘Segmentation fault’ - Pretty certain I know whats causing this, and its the lack of characters as you look over the edge of the map. Best possible fix at the moment will be to stop the camera moving while the player can continue right up to the edge, although as a quick fix I may increase array size.
3:28PM: Been trying to fix the segmentation fault but its causing me problems, I dont want to waste computer memory by doing this the wrong way because I know it will come back to haunt me later when I have to do something really complicated. So far i’ve tried three different techniques:
1: Split the view distance square into 4 and draw them all separately, player ‘@’ in the middle. The problem with this method is that It is very complicated to try and set it up so that I don’t get the error. Also doing things this way will make it harder to create things like dwarf fortresses line of sight in adventure mode, which I think will be a really good thing to have.
2: Use extra characters in the array of world by the amount of viewdistance[view]. Then fill them all with spaces. This solves the problem of 1, but also isn’t very elegant and uses more memory than I want to use for this part of the game. Also its probably going to make my life harder later when I want to put in line of sight (LOS) etc.
3: Use an if loop going along the x drawing characters until it finds one that it can’t draw and then takes a new line. This method seems to be the best option for the moment because it means that I can do things like seeing a mountain that is behind a tree. It also should solve the problem of the error as I can tell it to take a new line when it detects the edge of the map. Fingers crossed it will work.
8:01PM: In the end I went for the padding method, but with a few alterations to make sure that its not going to cause me too much greif later. The padding can be adjusted if needs be. So now we have a very basic Fog of War system, although its only a square at the moment I’ll probably change it at some point so that it is actually dynamic.
I’ve also implemented the world wrap so that now when you reach the edge of the map you appear at the opposite edge, kinda cool although it really needs a larger world to be more realistic.
Started implementation of items. Tried to get fstreams running, compiler was having none of it.
FRIDAY
_________________________________________________________________________________________
7:54PM: Not done all that much on the engine today, was doing some work on planis.info. Now we have a forum!
I did however get my fstreams working to some degree. (It doesn’t seem to want to compile in codeblocks) It now reads from the included townNames.dat file, (which you can edit with a text editor btw.) and then assigns a random name to each town at the same time as giving them random positions on the world map.
There seems to be a small problem with the numbers of towns that are created being inconsistent but i’ll get to that in a while.
Saturday
_________________________________________________________________________________________
Tried to get randomly generated trees in but I’m having the same problem with them as with the towns which is annoying.
In my test map I should have around 100 - 200 trees all with random coordinates that are within the bounds of the area. However whenever I try to display them I get maybe one or two and nothing else.
Decided that I need to learn OpenGL at some point so I’d better get started on it, although there arn’t that many tutorials out there for Linux so I’m trying a SDL tutorial to get me going until I get around to buying a new monitor.
Sunday
_________________________________________________________________________________________
Worked mostly on getting some basic OpenGL working, triangles and boxes, woo exiting! ![]()
Think i’m going back to the previous release for dev work as its much more stable, at the moment i’m compiling and running fine but as soon as I try to run it again it crashes with a seg fault. Meh.
Anyway this is turning out to be quite a long blog post, so I’ll leave it at that.