Are you, in fact, a pregnant lady who lives in the apartment next door to Superdeath's parents? - Commodore

Create an account  

 
I need ideas of stuff to code!

(July 9th, 2015, 06:51)BRickAstley Wrote:
Quote:unity programming

So you can get started on the next Civ Game for us, an RB version?
Theoretically--though if I'm going in that direction I want a new Advance Wars first tongue

There's also the new Humble Bundle; I haven't gotten it yet, but I obviously should.
Reply

Civ 4 had four sided tiles. Civ 5 had six sided tiles. The obvious progression is that Civ 6 will have eight sided tiles. Go forth and build the whole game for us. The first step is figuring out how to make those tiles all fit together nicely. wink

You can background that process while playing through the humble bundle though, right? nod

Played: Pitboss 18 - Kublai Khan of Germany Somalia | Pitboss 11 - De Gaulle of Byzantium | Pitboss 8 - Churchill of Portugal | PB7 - Mao of Native America | PBEM29 Greens - Mao of Babylon
Reply

(July 10th, 2015, 05:45)spacetyrantxenu Wrote: The first step is figuring out how to make those tiles all fit together nicely. wink

Could settle for seven-sided tiles, all you need do is move the map from a euclidean plane to hyperbolic. We already play cylindrical and toroidal, after all...
DL: PB12 | Playing: PB13
Reply

(July 10th, 2015, 07:50)Bacchus Wrote: Could settle for seven-sided tiles, all you need do is move the map from a euclidean plane to hyperbolic. We already play cylindrical and toroidal, after all...

I guess seven sides would be ok if it was the successor to Civ 5.5 (BE)? twirl

Played: Pitboss 18 - Kublai Khan of Germany Somalia | Pitboss 11 - De Gaulle of Byzantium | Pitboss 8 - Churchill of Portugal | PB7 - Mao of Native America | PBEM29 Greens - Mao of Babylon
Reply

your ambitions are way too small....
Reply

(July 8th, 2015, 03:12)novice Wrote: Map balancing and editing tool
The MapTuner is a C# desktop application for reading, editing and writing Civ4 worldbuilder save files. It has a balance checker showing heuristic search algorithms in action, and its editor has ambitions of supporting full photoshop-style layered editing. The application poses a lot of interesting algorithm and software design pattern questions (which are not necessarily answered correctly in the current code base). I hear rumours that GermanJojo (?) is working on an editor which is probably more complete than this one, I haven't seen any details about it or source code for it, though. At any rate, you're both welcome to fork my repository and reuse as much or little of it as you see fit.
http://realmsbeyond.net/forums/showthread.php?tid=4199

Mine is right here:

https://github.com/germanjoey/civ4-mapcad

I'm going to write up a thread for it once I finish some tutorials, but I keep getting bit by the featuritis bug... "wouldn't it be great if it would work like this?" and I get delayed. lol I'm very close now, I think.
Reply

CH - what programming languages do you actually know well enough to be comfortable in? Even if you don't know what you want to code, IMHO a hobby project should either be something in a.) a language you're really comfortable in, so that you don't have to fight the language to get stuff done, or b.) something brand new, so that its fun to learn the language along the way.
Reply

(July 13th, 2015, 14:04)GermanJoey Wrote: CH - what programming languages do you actually know well enough to be comfortable in? Even if you don't know what you want to code, IMHO a hobby project should either be something in a.) a language you're really comfortable in, so that you don't have to fight the language to get stuff done, or b.) something brand new, so that its fun to learn the language along the way.
My "comfortable" languages fall into two groups:
1. Java. This is the language I used pretty much all the time in college, and thus have the most time in. Of course, Java has its obvious problems (especially if I wanted to do anything where performance is an issue; aka games), so I'm willing to work a bit with similar languages, whether they're obvious offshoots (Groovy, which is just Java with 50% fewer words and 100% more unexplained errors) or just similar concepts (C#, which I still haven't coded a line in yet, but from all the tutorials I've seen appears to be 90% the same as Java on the surface).

2. Clojure. This language I learned late in my college career; I like a lot of the stuff it's doing (especially all the parallel stuff) and can code decently in it, but as it's a relatively young language, I still don't know how to do anything useful in it.

It's weird how different the two languages are--one's your standard language everyone uses, and the other is a new Lisp variant. Obviously one's a lot more practical than the other (especially if I'm working with other people), but they're both good in their own way.
Reply

Hmmm, I think that it would be good for you to learn something new. Professional programmers often know many different languages, because it helps you gain perspective. Something that might be tricky in one language can be trivial or easy in another language and vice versa. I would suggest Python or Javascript, the former because its a very powerful, easy to use language that will give you a different perspective compared to Java, and Javascript because it's how you can do anything on the web. Both languages are fairly widely used and have big libraries available to them.

As for projects, here's a fun idea: design a really good blue-circle algorithm for Civ4. Like, one that actually takes into consideration a skilled player would think about (e.g. is food first ring, does this site share food, do I have any strategic concerns right now, etc) in contrast to the terrible one that's built into Civ4. This is actually something I need to do for my balance tool, but haven't gotten to yet because I've wanted to get all the terrain modification stuff rock-solid first. So, this would help me out. You can use any language you want, and I encourage you to use a brand new one. I have some rough pseudocode on my github but it would probably be more fun not to look at that.

The setup would be like this: Design a function that accepts four parameters and outputs a floating point number between 0 and 1, where 1 is a really amazing site and 0 is a really bad site. Imagine that there's going to be some kind of driver that will first setup the strategic parameters (more on that in a second) and then call your function on every free tile on the map, and then use the result to choose where to plant a city. Note that a "0" doesn't necessarily have to mean "21 ice tiles" and 1 one doesn't necessarily have to mean "all gold, gems, and rivers" - we just need to accurately differentiate between a good and bad site based on a typical lush multiplayer map. You might need to do some tuning based on some sample input data.

Anyways, the four parameters that you get are:
  • An integer that indicates your player number
  • A hash containing how far the bfc-center is from each other player's capital, including your own.
  • An array of the 21 BFC tiles. Each array element will be a hash that looks like this:
    Code:
    {
        x = integer, relative to bfc-center
        y = integer, relative to bfc-center
        terrain = grass/plains/tundra/desert/ice
        bonus = corn/gems/etc
        height = 0/1/2/3 for peak/hill/flat/water
        feature = jungle/forest/oasis
        auto-routed = true or false (e.g. if a city is planted here, will it automatically connect to an existing city that you own?)
        adjacent to river = true or false
        shared_with_allied_city = true or false
        shared_with_enemy_city = true or false
    }

    The x and y values will be relative to the bfc center, so you can think of the city-tile as "0/0", while the tile to the west of the city would be "-1/0," the tile to the northeast would be "1/1", etc. You can assume that you're only given valid sites (i.e. that the bfc center is at least 3 tiles away from any other cities and is on a hill or flatland).

  • A hash containing weights describing strategic concerns. For example, something like this:

    Code:
    {
        city_on_hill = 0.2
        has_copper = 0.9
        has_iron = 0.0
        has_ancient_luxury = 0.6
        has_classical_luxury = 0.0
        ...
    }

    This would indicate that copper is very valuable to the civ right now, possibly because this is the second or third city for that civ. Iron is not valuable because the civ wouldn't have it revealed. A hill plant is not as important for defensive reasons because this city is very close to our capital. Etc. You'll have to figure out what strategic concerns should be checked.

Interested? At any rate, this is just a suggestion. smile It just seems something small and self-contained, and at least know you have some interest in Civ 4. Do you have any other interests? I could probably give other suggestions that aren't so selfish of me if I knew what other lines to think along...
Reply

I think I've gotten a lot of different ideas from this topic so far. As for a bigger project, Brick had begun talking with me over PM about something (though he still needs to respond to my latest message), but that's a long-term project. This fat-cross evaluator is relatively small though, so that can be a side project (since I do all my heavy-duty coding on a separate machine).

I took a brief look at the repo you posted, and while the documentation is impressive (especially for something maybe five people will ever read), the fact that it appears you're using Perl makes me run away in horror! As such, I think I can do this relatively easily in Clojure--I know you recommended to do it in a new language, but Clojure is still relatively new for me (I understand the basic syntax and the flow of operations, but I still need to keep the function cheatsheet up so I can know what's possible), and it's certainly a different experience than vanilla Java (or C#, which Brick and I will likely be using). If I do actually complete the project in Clojure, how usable would it be for you? You probably can't just use it in your Perl project (then again, if you recite enough black magic incantations I've heard you can move mountains, so maybe you can), but can you understand the Lisp flow?

As for the specifics of the design, do you have a list of all the resources in Civ4 (since I'm lazy), as well as all the strategic categories you want to consider (since I can't write for infinite possibilities, even though Clojure makes this a lot more possible than you'd think)? Also, are you sure having the distance from the capitals is a reliable factor you want to include, especially since you aren't likely to know all that information (and there isn't really a good way to implement it--infinite distance? Zero distance? Just leave it out and hope stuff doesn't break?)

Edit: Looking over your post a bit more closely, I don't think it's a good idea for me to be evaluating what makes a good city (as you've noted various times in the lurker threads rolleye ). I feel like this could go forever, so it might be best for you to start with a basic list to start, then add more if I'm doing things right.

Also, is it a good idea to be using a value from 0-1? Having to test a simple helper function (just totaling all the weights given, so you can divide by it later) reminds me how bad/imprecise floating point arithmetic is--an integer-based system might be better (0-100 or 0-1000, depending on how precise the weights will be), but I don't know how much you'd have to overhaul the rest of the code (or how much you've actually developed upstream of my code) to make that happen.

Edit2: Here is the link to my github, there obviously isn't much there yet, but it's certainly a start:
https://github.com/VincentBorchardt/fat-...evaluator/

Edit3: Should be the last edit of the night, but why is the height numbered while all the other features are specifically named (aka enums, or :name -style keywords in Clojure)?

In better news, I have a nice clean function for determining if a resource is in the fat cross--if you don't know Lisp, it probably looks as arcane as the Perl does tongue
Hopefully tomorrow you can fill in some of my categories, so I can start writing the functions for them (obviously a lot of them are going to be repackagings of has-resource?, but there has to be a cleaner way to do so--it probably involves decoupling city-resources and has-resource? (so, say, for the ancient happiness resources I don't have to map the list 5+ times), but it's midnight here and I need to go to bed.
Reply



Forum Jump: