that doesn't go well with my lazyness...
wow, this was your first big project Whales? I always though that any game dev would fail hard on a dozen projects before making something this big. but people even applaud your code. you just inspired me a little...
The reason I didn't fail hard was I started small, very small. Cataclysm v 0.0.1 was an @ walking around a screen full of dots. v 0.0.2 had walls--but they didn't block your view. v 0.0.3 had walls that blocked your view, and a rock you could pick up. And so on...
If you're interested in making a game, of any kind, my recommendation would be to start with the simplest possible version of that game (making RISK? start with an empty board that does nothing. Making a FPS? Start with walking around an empty box), and slowly add features individually. It takes longer, but you won't fail and you can solve problems as they crop up.
that is exactly how I think one should start too. Been following some new games, and I see that kind of slow paced development too on Survivors of Ragnarok. Each version it's just a really simple thing, like eating, or chopping a tree.
I wanted to try some roguelike game, cause I think I know how things are done code-wise. Except for world generation. In DF, Cataclysm, Rogue Survivor, Minecraft, Terraria and any other game with that, I just don't understand how it is done. Could you just very basically explain your method?
Gladly. There's two basic concepts for map generation; the overmap, and the local map (or just "map" in the code).
The overmap is 180x180 tiles, each of which is a character in the 'm' screen--things like road, house, forest, etc. This map's generation is detailed in overmap.cpp. Basically, for the first overmap, the one you start in, it starts just a fields; then forests are randomly "scribbled" in. A river is added, connecting two randomly-chosen points on the edges of the map. Several cities are then added--it starts with a crossroads tile ("+" roads), and in each direction it draws a street. Drawing a street involves going straight for a while, and on either side placing a building, or possibly another street--it's a recursive function. Finally, all the existing cities are connected by roads, and extra stuff is added--behives in forests, labs, missile silos, etc.
When you step off the overmap, a new one is generated; it takes a look at the adjacent, existing overmaps, looking for river edges and roads, and connects them intelligently.
The local map is basically a 3D treadmill--only a few overmap tiles are kept in memory at any given time, and if you move off the current one--say to the north--everything gets shifted south, and new data is pulled in to the north--from a file if one exists, or generated fresh if it's unexplored terrain.
Is it just me, or is the Windows source uncompilable?
I seem to be missing curses.h, anyone knows what to do with that?
Fakeedit:
It's also absent from the Linux source, so ...
Also, here's the error MinGW throws at me:
$ make
mkdir obj
g++ -g -c bionics.cpp -o obj/bionics.o
In file included from itype.h:6:0,
from item.h:6,
from player.h:4,
from bionics.cpp:1:
color.h:4:20: fatal error: curses.h: No such file or directory
compilation terminated.
make: *** [obj/bionics.o] Error 1
curses.h is not part of cataclysm, it's the ncurses library (or pdcurses, on Windows). I'd suggest googling pdcurses--as for using it, I have no clue how, but I'm sure head does.
On Ubuntu, to get ncurses, just type "sudo apt-get install libncurses-dev" (none of that tedious googling and downloading from unverified sources!)