Dev Blog - Trilarion
Forum rules
Posted relevant content can be used under GPL or GFDL (http://www.gnu.org/) for the project. Thanks!
Posted relevant content can be used under GPL or GFDL (http://www.gnu.org/) for the project. Thanks!
Re: Dev Blog - 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).
XXVI - Game Center
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.
XXVII
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.
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.
XXVIII
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...
..yet the impressive thing is how short the code is. In Java it would have taken me longer, for sure.
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.
Here is my first try from this evening. Just a staggered grid to test a few terrain drawing algorithms. Doesn't look that impressive...
..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_())
Re: Dev Blog - Trilarion
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.
God I'm gonna go draw something tonight.
Re: Dev Blog - Trilarion
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.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. ...
XXIX
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.
Btw. If somebody wants to watch the source code developing just click here and for the list of changes in the master branch here.
XXX - Terrains with textures
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.
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.
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.
XXXI
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)
Re: Dev Blog - Trilarion
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?