Sub's coding pool party

sub

Active Member
💻 Oldtimer
Joined
Jun 18, 2003
Messages
5,961
Best answers
0
Location
New York
Hah, thanks, but that will be a long while :p. I also have no illusions, whatever I'm making right now has a 9 out of 10 chance of ending up a failure.

But I do have progress. I think I'm just going to use sprites for the tiles rather than trying to do the solid colors with lighting look I was originally trying to do (didn't need sprites for that). I figured out how to render sprites on an arbitrary shape, and it seems to work. I'm using a sprite from Alpha Centauri to test, and the sprite wasn't made to fit the tile size I'm using, but here's a picture anyway.



I think the fact that it's not one solid color makes the terrain look.. less bad.
 
Last edited:
Active Member
✔️ HL Verified
💻 Oldtimer
Joined
Mar 14, 2005
Messages
3,880
Best answers
0
1/10 still has a chance at success. I am sure there was a high rate of failure for the first successful NASA Rocket Launch.
 

sub

Active Member
💻 Oldtimer
Joined
Jun 18, 2003
Messages
5,961
Best answers
0
Location
New York
Yeah, water near the coast is going to be semi-transparent with tiles visible underneath. I'm going to try to make the tiles in deeper water darker / not transparent. Water tiles might be animated too, but I'm not sure.

The plan for today is to implement all the tile types that are planned for the game, with some crude tilesprites drawn for them, and then I'll start work on the water. The height generation also needs to be improved.
 
Last edited:

sub

Active Member
💻 Oldtimer
Joined
Jun 18, 2003
Messages
5,961
Best answers
0
Location
New York
I might need to make one of these topics for artwork




Haven't really done too much since last time. Frame rate was hovering around 20-30, now it's 1000ish which I think is good enough for a turn based game with little animation, learned a bit about open gl and how graphics are rendered, started work on map generation for multiple tile types, and improved tile height generation. A lot of that was done in the last two or three days, I've been lazy.

Not sure how many tile types to have. One of the reasons I liked Alpha Centauri is because there was like 3 tile types in that game, so you didn't have to stress too much about where to place cities. Currently I'm thinking tiles will offer food (helps cities grow) and production (helps cities make things), both with 3 tiers of benefits.

- Shallow Water / Oceans (no difference other than looks / you can only sail in shallow water with early technology): okay food, good food with seaport, bad production until late game technology
- Grassland - Good food, okay production
- Hills - Poor food, good production
- Forests - Okay food, good production
- Desert - poor food, poor production
- ice - Poor food, poor production

I'm thinking of adding an arid tile mainly for aesthetic reasons.
 
Last edited:
New Member
💻 Oldtimer
Joined
Mar 7, 2007
Messages
1,172
Best answers
0
Location
Israel
Alpha Centauri is awesome like that. If your game is anything like it I'd love to play. Looking good so far Sub.
 
Just a nice person :)
✔️ HL Verified
Joined
Jul 17, 2009
Messages
262
Best answers
0
Location
The Netherlands / HOLLAND!
Keep up the work! I really like it so far.
I can imagine it being good with enough variation. Detail doesn't have to be good, only make the content big enough.
 

sub

Active Member
💻 Oldtimer
Joined
Jun 18, 2003
Messages
5,961
Best answers
0
Location
New York
Now with free artwork. I spent 10 minutes raiding a free texture website. The tree texture I stole from a civ 3 graphics mod, but don't tell anyone.



The goal is to have the tile textures blend into each other / better represent the tiletype / not suck, this was just done because my MSPaint textures were jarring to look at.

I also have units in the game and moving around, as well as started to implement cities. Units have their stats stored in an ini file and that gets read into the variables when the game loads, which I think is good enough. Same deal for city names / civ names.

Thinking of tweaking the map generation algorithm to generate more land at sea level
 
Last edited:

sub

Active Member
💻 Oldtimer
Joined
Jun 18, 2003
Messages
5,961
Best answers
0
Location
New York
Back in July I was working with pathfinding and I had a bit of a rough time. Today's goal was to get pathfinding working in the current game, and I think it went well. Took me a few hours to implement compared to the week+ from last time, the code seems to work without a hitch, is faster than last time, much easier to read, and a lot less verbose.

Some results -- http://imgur.com/a/rSW9l



I was going to use an external library for the pathfinding, but I thought it'd be harder to implement an existing library compared to just doing it myself. As a result I'm sure it isn't as fast as it could be, but I think it's good enough for what I need.
 
Last edited:

sub

Active Member
💻 Oldtimer
Joined
Jun 18, 2003
Messages
5,961
Best answers
0
Location
New York
I think I'm pretty happy with myself. I'm trying to make the game easy to mod, so right now there's an ini file that you can edit with notepad or whatever, and every unit stat for unit types is exposed there. You can change any stat that you want, as well as add / remove as many unit types as you want (well, I guess you need at least one unit). When the game starts up it'll look at the file and take care of adding them to the game. For me it makes adding different types of units to the game a breeze, and anyone who had the game would also be able to do the same. I'm also doing this for civilizations, so same deal there, can add / remove as many civilizations as you want, with as many city names as you want. It was actually pretty easy to do. ini files were originally developed for Windows, but the ini reader I'm using apparently also works on linux / mac, so this shouldn't have a problem working there. I just need to make it generate the default file if it's not there on the off chance that the user deleted it or something.

Aiming to have most everything done in terms of controlling individual units by the end of the week (for example, rightclicking to move onto unexplored terrain will still generate a proper path there, and that probably shouldn't happen.. just small things like that), and maybe then I'll either work on getting cities more fleshed out or adding in a GUI system, because cities are going to need that. In January someone ported GUIChan over to the library I'm using, so I'm thinking I'm going to give that a try.

 
Last edited:
Cunning as Zeus
Banned
✔️ HL Verified
💻 Oldtimer
Joined
Nov 23, 2003
Messages
6,079
Best answers
0
Looking good, bud. Keep at it. I'm liking the look of the different terrain types (and that you chose to use more than just the 3).
 

sub

Active Member
💻 Oldtimer
Joined
Jun 18, 2003
Messages
5,961
Best answers
0
Location
New York
Thanks. The artwork is all stuff I've found and slightly modified from free-art websites (well, I blatantly stole the forest artwork), ideally I'd like to have artwork that more closely resembles what type of tile type it is. Although really I just need artwork that doesn't suck, and lord knows that I'm not an artist. I'm thinking of asking my little brother to draw me some cities and units, he's actually very good at drawing, but he's never done anything on the PC, and I kind of hate him, so yeah, we'll see how that goes.
 

sub

Active Member
💻 Oldtimer
Joined
Jun 18, 2003
Messages
5,961
Best answers
0
Location
New York
I'm immensely confused on how to properly handle resolutions. Do I just resize the gui / text with each resolution change?
 
Just a nice person :)
✔️ HL Verified
Joined
Jul 17, 2009
Messages
262
Best answers
0
Location
The Netherlands / HOLLAND!
Well, I would go with crafting some elements like buttons, labels and textboxes to fit your GUI needs.
A good aim of design would be HTML controls like.

Like this you can focus on fixing 1 thing and use that all over the place.

I assume text graphics are build in though. Just set them at a size visible at the lowest res and keep that.
(maybe then make an option to use a precentage of the screen as gui later..)

Or just take an open source GUI library for your game.
 
Last edited:

sub

Active Member
💻 Oldtimer
Joined
Jun 18, 2003
Messages
5,961
Best answers
0
Location
New York
Yeah, I'm trying out a few GUI libraries, but I'm still pretty clueless on the whole resolution thing. I think I'm just going to make it work in an 800 x 600 window, and then figure out where to go from there.

For the past 5 hours I've been trying to figure out the best way to implement a minimap and get it working. I had a hard time getting this to work, but I finally have it working now, albeit I need to make it larger and maybe rotate it to match the map.



edit: can now resize it by changing two numbers. hoooray for minimaps



 
Last edited:

sub

Active Member
💻 Oldtimer
Joined
Jun 18, 2003
Messages
5,961
Best answers
0
Location
New York
That'd be pretty hilarious. I think that should now be my goal.

Shit, that only gives me about 16 more years to finish.
 
NOT IN THE MANGA™
★ Black Lounger ★
✔️ HL Verified
🚂 Steam Linked
💻 Oldtimer
Joined
Jan 5, 2008
Messages
3,276
Best answers
0
Location
Lithuania
Why so pessimistic?
 

Users who are viewing this thread

Top Bottom