Dev Blog - Trilarion

Discussion of ongoing programming work.
Forum rules
Posted relevant content can be used under GPL or GFDL (http://www.gnu.org/) for the project. Thanks!
Post Reply
User avatar
Trilarion
Founder
Posts: 845
Joined: Thu Jan 12, 2012 9:27 pm
Location: Central germany

Re: Dev Blog - Trilarion

Post by Trilarion »

This "playable" state should be called version 0.2.0. However until then it's still a good way. But lately I made a lot of progress and it's fun again (as always when things work out as you want them).
User avatar
Trilarion
Founder
Posts: 845
Joined: Thu Jan 12, 2012 9:27 pm
Location: Central germany

XXVI - Game Center

Post by Trilarion »

Just a picture what I am currently working on. You see the Game (Network) Center with a list of connected players, a chat window and some yet really ugly looking buttons responsible for starting games, connecting and disconnecting. It's just an intermediate state.
Clipboard01.jpg
Clipboard01.jpg (95.03 KiB) Viewed 11312 times
User avatar
Trilarion
Founder
Posts: 845
Joined: Thu Jan 12, 2012 9:27 pm
Location: Central germany

XXVII

Post by Trilarion »

The work of today can be seen in the attached image. This time it is a political map (crudely painted I know) of the scenario, when you click on a scenario in the new "local scenario" dialog. The idea is that you can click somewhere on the map and then you get information about the nation and can decide if you want to start with it or not.

The noteworthy feature is that the scenario information is actually send over the network before displaying. You won't appreciate fully unless playing a multiplayer game with fellow gamers distributed all over the world. 8-)
Clipboard01.jpg
Clipboard01.jpg (46.79 KiB) Viewed 11306 times
User avatar
Trilarion
Founder
Posts: 845
Joined: Thu Jan 12, 2012 9:27 pm
Location: Central germany

XXVIII

Post by Trilarion »

It's been a while. However I can continue now and I will. If you have followed the conversation you'll already know that I want to switch to Python to speed up the development even though I still love Java.

Here is my first try from this evening. Just a staggered grid to test a few terrain drawing algorithms. Doesn't look that impressive...
First try in Python
First try in Python
Clipboard02.jpg (36.25 KiB) Viewed 10433 times
..yet the impressive thing is how short the code is. In Java it would have taken me longer, for sure.

Code: Select all

import sys
from PySide import QtGui, QtCore

if __name__ == '__main__':
    app = QtGui.QApplication(sys.argv)

    S = 80

    scene = QtGui.QGraphicsScene()
    for x in range(0, 9):
        for y in range(0, 6):
            scene.addRect(x * S + y % 2 * S / 2, y * S, S, S)

    view = QtGui.QGraphicsView(scene)
    view.resize(800, 600)
    view.show()

    sys.exit(app.exec_())
But then even just coming to the same state as the Java version is will take a a bit. But I will try my best and benefit as much as possible from the experiences already gained.
Veneteaou
Posts: 280
Joined: Sat Aug 25, 2012 4:23 am

Re: Dev Blog - Trilarion

Post by Veneteaou »

That's crazy. I know that object-oriented programs tend to be text efficient once you get them up and running, but nothing compares to scripting languages when it comes to punching a little bit of code.

God I'm gonna go draw something tonight.
User avatar
Trilarion
Founder
Posts: 845
Joined: Thu Jan 12, 2012 9:27 pm
Location: Central germany

Re: Dev Blog - Trilarion

Post by Trilarion »

Veneteaou wrote:That's crazy. I know that object-oriented programs tend to be text efficient once you get them up and running, but nothing compares to scripting languages when it comes to punching a little bit of code. ...
Yep, although kudos also have to go to the vast amount of excellent libraries. Without libraries a scripting language is severly limited. Pythons ability to relatively easily wrap around any library written in C makes it so powerful. Can't wait to continue tonight.
User avatar
Trilarion
Founder
Posts: 845
Joined: Thu Jan 12, 2012 9:27 pm
Location: Central germany

XXIX

Post by Trilarion »

Now I have as a test added some connected terrain of all the types we have and painted it. It looks good. The task is now to make it more connected and I have an idea about it. But instead of explaining let me just show it... in the next entry of the Dev Blog.

Btw. If somebody wants to watch the source code developing just click here and for the list of changes in the master branch here.
Now with terrain images
Now with terrain images
Clipboard01.jpg (82.48 KiB) Viewed 10425 times
User avatar
Trilarion
Founder
Posts: 845
Joined: Thu Jan 12, 2012 9:27 pm
Location: Central germany

XXX - Terrains with textures

Post by Trilarion »

The graphics framework (Qt) that I use currently allows to use images as textures for brushes which can be used to fill tiles (or any shape really). So I transformed the test map from above into five flat texture areas: sea, plains, desert, tundra, swamp and applied exactly this.
Prototyp_Terrain_2.jpg
Prototyp_Terrain_2.jpg (37.49 KiB) Viewed 10400 times
Of course the textures themselves are not perfect, especially they must be really large or still symmetric. But they are continuous on a level larger than a single also currently.

Next step: Put single mountains and hills on them.
User avatar
Trilarion
Founder
Posts: 845
Joined: Thu Jan 12, 2012 9:27 pm
Location: Central germany

XXXI

Post by Trilarion »

And now I placed some single mountains, hills, trees which I cut out from Ven's tiles and placed them randomly on the respective tiles. Because I put them even a bit outside of tiles the feeling of continuity is really there. Of course now things have to be improved:
  • Drawing objects on top of each other in the right order (isometric = up and right is far away then left down)
  • Have objects not too close to each other to give them some space
  • Have the continuous effect only when the neigboring tile is actually of the same type
  • Randomize the number of objects in each tile (currently exactly the same)
But the really good thing is that it doesn't look too bad and that I can make rivers nice in almost any possible way because I can just forbid to place objects on a river, thereby leading it through mountains, forest, hills.. that should be nice.
Prototyp_Terrain_3.jpg
Prototyp_Terrain_3.jpg (51.31 KiB) Viewed 10397 times
Veneteaou
Posts: 280
Joined: Sat Aug 25, 2012 4:23 am

Re: Dev Blog - Trilarion

Post by Veneteaou »

Wow that actually looks pretty good. Will that kind of stuff save in a save game, or will terrain change every time I load a save state?
Post Reply