Author Topic: how to modify glest  (Read 8983 times)

Ayrin Greenflag

  • Horseman
  • ****
  • Posts: 188
    • View Profile
    • http://www.lostinn.com/ayrin
how to modify glest
« on: 27 July 2007, 13:12:40 »
Hi guys, i would like to start to modify glest, what is the language and more important what program i need to use for modify the code? What compiler is the easiest? How many hours will past before i became insane? mmm or i already am? Thx a lot in advice.
« Last Edit: 1 January 1970, 00:00:00 by Ayrin Greenflag »

@kukac@

  • Guest
topic
« Reply #1 on: 27 July 2007, 13:18:20 »
how deep you want the modify it? want to make a new unit? modify the source code?

check the wiki, there are some nice things there
https://docs.megaglest.org/Modify_Glest
« Last Edit: 18 June 2016, 19:44:12 by filux »

Ayrin Greenflag

  • Horseman
  • ****
  • Posts: 188
    • View Profile
    • http://www.lostinn.com/ayrin
heavy
« Reply #2 on: 27 July 2007, 13:30:21 »
i'd like to modify all the source code keeping only the engine and some aspect of current game as camera view and little more... but it depends how hard will became the work for my mind :)
« Last Edit: 1 January 1970, 00:00:00 by Ayrin Greenflag »

@kukac@

  • Guest
topic
« Reply #3 on: 27 July 2007, 13:32:09 »
well, i dont know, but dont check the source what is in the wiki  :P
« Last Edit: 1 January 1970, 00:00:00 by @kukac@ »

Ayrin Greenflag

  • Horseman
  • ****
  • Posts: 188
    • View Profile
    • http://www.lostinn.com/ayrin
uhm
« Reply #4 on: 27 July 2007, 13:38:19 »
i'm reading the wiki and the multiplayer tread...tons of informantions :(
i'm trying to absorbe all informations i need ... not easy
the savegame is still in project phase?
« Last Edit: 1 January 1970, 00:00:00 by Ayrin Greenflag »

@kukac@

  • Guest
topic
« Reply #5 on: 27 July 2007, 13:42:51 »
because i wrote the multiplayer thread   ::)

the savegame is currently in development idea. as i know, there was a working savegame feature for the older Glest versions.
« Last Edit: 1 January 1970, 00:00:00 by @kukac@ »

Ayrin Greenflag

  • Horseman
  • ****
  • Posts: 188
    • View Profile
    • http://www.lostinn.com/ayrin
various
« Reply #6 on: 27 July 2007, 14:00:48 »
The multiplayer seems a very hard rock to break and i will read the wiki with attention, for the savegame i think the main problem is how the game set the start position for all characters if it's a codeline that check the start position on the map and it put always the same units and buildings the steps are

1 to export this code in external file
2 try to change the file for starting positions (just for some check)
3 add to the file new units in different position (for some more check)
4 work around the save and load game that build a similar file to the start one

this work i think can help also for multiplayer cuz the structure for the syncronize file can be similar to the save (as a database for mmorpg)
« Last Edit: 1 January 1970, 00:00:00 by Ayrin Greenflag »

weedkiller

  • Draco Rider
  • *****
  • Posts: 277
    • View Profile
(No subject)
« Reply #7 on: 28 July 2007, 14:29:51 »
First i must say i'm very interested in your working.
I would love to modify the source by myself but didn't succes due to lack of abilities (couldn't compile it till now).
I've some ideas about your savegame-check:
- every faction has its starting units declared in the magic.xml for example (root-folder of the faction, units aswell as buildings)
- the playcement could be coded (some kin of algorithm) since changing this file (faction.xml) gives new units placed around.
- there could also be a startingpoint saved in the mapfiles, as the mainbuilding is always in the center of your units (how should a algorith find that this unit, as all buildings are units, is the mainbuilding) so you might have a look at the mapeditor. It can be downloaded somere here (maybe glevolution or so)
« Last Edit: 1 January 1970, 00:00:00 by weedkiller »

jrepan

  • Guest
(No subject)
« Reply #8 on: 28 July 2007, 18:38:39 »
I am making savegame patch. It doesn't save yet: units, visible areas and objects.
« Last Edit: 1 January 1970, 00:00:00 by jrepan »

Ayrin Greenflag

  • Horseman
  • ****
  • Posts: 188
    • View Profile
    • http://www.lostinn.com/ayrin
codes
« Reply #9 on: 1 August 2007, 09:10:02 »
well jrepan i'm sure u have made an hard work for the savegame, my ides is to start from starting position in game. the mapeditor allow you to select 4 starting points then it create the map saving terrain objects and the start position. If we can modify the mapmaker letting it save the units positions we can have in the same way also the savegame.
The problem is: this game is fully customizable, this means that units changes for every custom version, so we need a way for standard the units in mapeditor, maybe using damage level.
I have to study the code so i can't tell how difficult it is, i bet a lot, but it will allow also to create maps for missions and, maybe, chain them in complex adventures.
Maybe i'm a dreamer?

Oh yes, also some kind of difficult level will be nice to add in options :)
« Last Edit: 1 January 1970, 00:00:00 by Ayrin Greenflag »

jrepan

  • Guest
Re: codes
« Reply #10 on: 7 August 2007, 15:52:41 »
Sorry I didn't reply, I wasn't at home for a week. Did I understand correctly, that you want to take mapeditor code and modify it? I think that simpler is to create savegame from scratch, because savegame and map are actually too different. Objects are only common thing.
« Last Edit: 1 January 1970, 00:00:00 by jrepan »

Ayrin Greenflag

  • Horseman
  • ****
  • Posts: 188
    • View Profile
    • http://www.lostinn.com/ayrin
sorry
« Reply #11 on: 18 September 2007, 08:12:04 »
Sorry for the long wait, i was far from pc by long time, well, now i see the problem using the mapeditor code, well u was right, need a new code, did u made some good step forward?
« Last Edit: 1 January 1970, 00:00:00 by Ayrin Greenflag »

hailstone

  • GAE Team
  • Battle Machine
  • ********
  • Posts: 1,568
    • View Profile
My thoughts
« Reply #12 on: 18 September 2007, 09:48:52 »
Some things which need to be saved/loaded:
   
    Unit/Building's positions and attributes glest_game/world/map.h
        GameSettings (map, tileset, factions, tech, teams, start locations) glest_game/game/game_settings.h
        Max Players  glest_game/game/game_constants.h
        Stats for each player (kills, deaths, units produced, resources harvested) glest_game/game/stats.h
        Camera Location  glest_game/game/game_camera.h
        Explored area
        Time (Day or night)  enabledDay/enabledNight in glest_game/world/tileset.h
        Weather (raining, snowing) glest_game/world/tileset.h
        Speed? glest_game/game/game.h
        Resources remaining


I'm guessing it will be harder to load than to save. Also, some gui would need to be added to know what save game to load.

Save is fairly straight forward:
Play Game -> Open menu and click save -> saves a file with game information to saves folder

Load is more difficult
Choose save file to load (gui) -> check Glest version is compatible -> check resources exist or try to load resources and raise exception on problems -> set up the game
« Last Edit: 1 January 1970, 00:00:00 by hailstone »
Glest Advanced Engine - Admin/Programmer
https://sourceforge.net/projects/glestae/

jrepan

  • Guest
Re: My thoughts
« Reply #13 on: 18 September 2007, 12:25:27 »
Last weeks I haven't make it much. I have to find solutions to bugs and it is very boring.
This is almost usable. You can download it from here: http://http://jrepan.pri.ee/glest/glest-savegame-0.1.tar.gz
It saves only basic things now. It is not very stable(sometimes segfaults on saving)

TODO:
    fix bug: sometimes segfault on saving
    fix bug: explored areas loading don't work
    finish command saving(at the moment, it saves only command with some types(attack, repair, move, harvest))
    unitgroups
    time
    stats
    textentry look(at the moment, it looks like textlabel)
    and some minor improvoments(update translations, add comments to source, ...)
« Last Edit: 1 January 1970, 00:00:00 by jrepan »

@kukac@

  • Guest
topic
« Reply #14 on: 18 September 2007, 13:50:17 »
does it have winXP version too?
« Last Edit: 1 January 1970, 00:00:00 by @kukac@ »

jrepan

  • Guest
(No subject)
« Reply #15 on: 18 September 2007, 14:50:12 »
Quote from: "@kukac@"
does it have winXP version too?

No. If somebody wants, (s)he can make Windows version, but I don't have Windows.
« Last Edit: 1 January 1970, 00:00:00 by jrepan »

Ayrin Greenflag

  • Horseman
  • ****
  • Posts: 188
    • View Profile
    • http://www.lostinn.com/ayrin
steps
« Reply #16 on: 20 September 2007, 16:37:09 »
In the a.. of Bill Gates :) lol
Well maybe with the source someone can compile it under window.
Low time coz by work in this period and by my WoK php game.
« Last Edit: 1 January 1970, 00:00:00 by Ayrin Greenflag »

jrepan

  • Guest
Re: steps
« Reply #17 on: 21 September 2007, 11:32:10 »
Quote from: "Ayrin Greenflag"
In the a.. of Bill Gates :) lol
Well maybe with the source someone can compile it under window.
Low time coz by work in this period and by my WoK php game.

It is patch for source. Download Glest source, unpack it in glest direcotry and compile.
If you don't run glest in mk/linux, then you have to copy data/core/menu/menu.xml from mk/linux and make directory "savegames"
to directory where you run glest.
« Last Edit: 1 January 1970, 00:00:00 by jrepan »

reigoskeiter

  • Guest
hmm.....
« Reply #18 on: 13 October 2007, 10:03:09 »
mabey we can do this:
all of us from diffrent cuntrys translate each and every word in the game!
so we have the ultimate translation game!
whit much and diffrent languages! :P  :P
« Last Edit: 19 June 2016, 07:08:02 by filux »

 

anything