Rise of the Republic II

Page 5 of 5 FirstFirst 12345
  1. ✠Ikaroqx✠
    ✠Ikaroqx✠
    Well now. Not too bad sir, not bad at all.


    Despite coding not being my forte, I've imagined of making a completely automated, computer version of RTD games. There'd be both a single play (vs AI) mode and multi-player mode. Is that kind of where you were going with this? Would we have played it on that site?
  2. Lord of Cats
    Lord of Cats
    That is indeed an awesome site! Maybe you could teach me how to do that for my Galactic Map for Interstellar Civilizations? I also have the same questions as Ikaroqx btw. Cheers! Cats
  3. ♞Rogue General♞
    ♞Rogue General♞
    Many thanks! It was a pretty time-intensive project, one that I may continue if I have the time and motivation to do so.

    @Ikaroqx
    Implementing an AI for such a complex game is way out of my league, haha. The idea was for a multiplayer game where players would perform moves. The interactive map would be used to complement the forum thread.

    @Lord of Cats
    I have to preface this by saying that the method I used is just one out of many possible ways to go about it. Programming is a field where there are many possible solutions to a problem, though some are more efficient solutions than others. I can tell you the what I did, but chances are if you dig deep enough, you could probably improve my method greatly. Here we go:


    • The front-end of the website is coded in Javascript/HTML, with some CSS3 for flair.
    • The back-end is where much of the hidden logic and complexity is. That is all done in PHP.
    • The data is stored in your standard MySQL database. The actual data that is stored in the database is very large in volume, but pretty straightforward. Things like coordinates for each item (army, settlement, fleet, etc.), size of an army, name of army, name of a settlement, settlement details (type of settlement, income generated per turn....), what factions own what fleets/armies/settlements, faction colors, banners, player names to correspond to faction, map details, blah blah blah. All of that stuff needs to be accounted for and tracked, and would be virtually impossible for a single human to keep track of whilst keeping his/her sanity. That is what the MySQL database excels at!
    • JSON is used to transport the data from the MySQL database to the front-end JavaScript for processing. (This portion is actually much simpler than it sounds. JSON file is basically a text file of data, in a format that make is easy for JavaScript to read.)


    The way the website works is that when a move is taken, the corresponding entries in the MySQL database are updated. For example, if a player recruits an army, an entry is added into the "Army" table that might contain info such as "Army name", "Army size", "Army position (x,y)", "Owning faction", etc.

    Turn ends at the click of a button (only the GM can access that). When the turn ends, a new map is generated with all of the updated army positions, new structures, faction treasury amounts, etc.

    And then the process starts anew. That's basically the gist of what goes on in the code.

    If you want to do this for Interstellar Civilizations, you're gonna have to learn a bit of programming first! Most important (not just for a map of your game, but web design in general) is HTML/CSS. Those are very easy to start with too. Then, JavaScript is useful for making interactive stuff on a webpage, so that would be the next thing to learn. After that, learning about MySQL will be crucial. MySQL is basically a free data management system, and very popular on the web.

    You should first build a simple webpage using HTML/CSS/JavaScript. The best way to learn is to do! And practice MySQL - there are free online tools to start with (like this one).


    Only after you have the basics down for everything else should you venture into PHP. The back-end logic for the interactive map was coded in PHP. (Again, there are different languages you could use, I just chose one that I thought was easy, and was familiar with.) PHP is important because with it, you are able to take data from the MySQL database, package it in any way you like (for my example, packaging into JSON format), then we can send that data anywhere we want to (in my case, the data was sent to the interactive map). With PHP, you can also insert data into the MySQL database... which is pretty important, considering the database has to be continually updated in order for the game to function.

    I know this seems like puking text, but if you have more questions just ask. If you're not familiar with any of this stuff, perhaps (time permitting!) I can help you create an interactive map for your game.
Results 81 to 83 of 83
Page 5 of 5 FirstFirst 12345