News:

Please help making MegaGlest rock-stable by testing the pre-release snapshots.

Main Menu
Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Baŝto

#27
It's now possible to copy the selected area, it will then be pasted at the most top left point of the actual selection.

Ctrl-Left click: move map in window

Shift-Left click: select tiles



still TODO:


  • Making menus "Edit" and "View" functional
  • Scrolling and moving the canvas
  • Catching exceptions
  • Reducing/vanishing pen-lag
  • History (part of Edit)
  • Selection of tiles
  • fixing repainting of objects and resources
  • correctly linking to Qt on windows
#28
the hover text is great :D

QuoteThe heartfelt tune it plays is CC licensed, and you can get it from my seed on JoinDiaspora.com whenever that project gets going.
#29
I modified the build scripts.
Most distributions will build with Qt 4 and some (newest Ubuntu and Fedora) with Qt 5.
This code should be sufficient now:

cd
mkdir SCM
cd SCM
git clone https://github.com/basxto/megaglest-source.git megaglest-source_basxto
cd megaglest-source_basxto
# If you also want the default MegaGlest assets:
#git submodule update --init --recursive
git checkout qt4
cd mk/linux
sudo ./setupBuildDeps.sh
./build-mg.sh


This also builds the game, but you will need it for the preview feature.
#30
Feature requests / Re: map XML
21 March 2014, 20:17:15
I agree, XML might have to much overhead for a map-format

Suggestion for complete map format in JSON:

{ "formatVersion":1.0,

  "title":"a map",
  "author":"somebody",
  "description":"just a simple map for demonstration",

  "maxFactions":2,
  "altitudeFactor":1,
  "waterLevel":4,
  "cliffLevel":4,
  "cameraHeight":42,
  "altitudeMap":[
    [10,10],
    [10, 3]
  ],
  "surfaceMap":[
    [ 1, 3],
    [ 4, 5]
  ],
  "objectMap":[
    [ 0, 3],
    [ 0, 0]
  ],
  "resourceMap":[
    [ 1, 0],
    [ 0, 0]
  ],
  "playerPositions":[
    [0,0],
    [1,1]
  ]
}


I've chosen XML, because it's easier to embed Lua there ... but this will break syntax highlighting and lead to very blown maps.

Lua code could be attached like this:

  "lua":{
    "global":["scripts/global.lua"],
    "startup":["scripts/startup.lua","scripts/locicallySeperatedStartup.lua"]
  }


Or just:

  "lua":{
    "global":["global"],
    "startup":["startup","locicallySeperatedStartup"]
  }


All files should be located in scripts/ and have the suffix .lua ... this would be a more secure way.

"/" shouldn't be allowed than and symlinks not being followed.

Even so it should have no use, because the scripts can't read the content of the opened files and megaglest might crash.

We could try http://jsoncpp.sourceforge.net/
#31
Improvements compared to WxWidget version:


  • smooth drawing without gaps in the line
  • no gray / black fragments when rendering got screwed up
  • working history

still TODO:


  • Making menus "Edit" and "View" functional
  • Scrolling and moving the canvas
  • Catching exceptions
  • Reducing/vanishing pen-lag
  • History (part of Edit)
  • Selection of tiles
  • fixing repainting of objects and resources
#32
Yes, it is hard to nearly impossible getting rich. But there are some interesting concepts: http://ardour.org/download.html http://harrisonconsoles.com/site/store-mixbus.html

Quote from: -Archmage- on 20 March 2014, 05:30:31
That's because open source engines can't compete, their open source code just gives away anything that could possibly make them competitive.

It's always possible to recreate features, but closed source software can't use GPL code, if they do that, that would be a copyright infringement → you can sue them.
#33
Feature requests / map XML
19 March 2014, 19:54:48
This is a suggestion how an xml format for maps could look like.

No additional features (for now), just the same as .mgm files.

XML is a human readable format, this is not really important for maps, but you could easier write third party tools for maps.

E.g. you can create a website for storing maps and show a preview and player limit.


<?xml version="1.0" standalone="yes" ?>
<map version="1.0" maxfactions="8" width="2" height="2" altitudefactor="1" waterlevel="4" clifflevel="4" cameraheight="42">
  <head>
    <title>a map</title>
    <author>somebody</author>
    <decscription>just a simple map for demonstration</description>
  </head>
  <row><cell altitude="10" surface="1" resource="1"><cell altitude="10" surface="3" object="3"></row>
  <row><cell altitude="10" surface="4"><cell altitude="3" surface="5"></row>
</map>


Width and height also could be skipped.

Not defined parameters are set to 0.

This version is also possible:

<row><cell altitude="10" surface="gras" resource="gold"><cell altitude="10" surface="road" object="stone"></row>

But would be kind of ugly for mods with other resources like Annex .

#34
I'm using the shared libraries of megaglest for loading and saving maps.

It should be possible to extend shared_lib/map/map_preview, this would make it possible loading and saving .xml just like .mgm and .gbm.

This is mostly independant from map editor, just need to modify the suffix filters for loading and saving dialogs.

But I'm focusing on getting rid of WxWidget and porting map editor and g3d viewer to Qt.

-> Will not implement that now.
#35


still TODO:


  • Making menus "Edit" and "View" functional
  • Scrolling and moving the canvas
  • Catching exceptions
  • Reducing/vanishing pen-lag
  • History (part of Edit)
  • Selection of tiles
  • fixing repainting of objects and resources
#36
If you wanna try the preview feature without compiling the whole game, but you have installed megaglest:

cd mk/linux/
ln -s $(which megaglest) megaglest


still TODO:


  • Making menus "Edit" and "View" functional
  • Scrolling and moving the canvas
  • Catching exceptions
  • Reducing/vanishing pen-lag
  • History (part of Edit)
  • Selection of tiles
#37
Newest version, the statusbar is fake :D

You can't see it, but this version is much faster and uses less RAM.

#38
Basic map editing should be possible now.

still TODO:


  • Making menus "Edit" and "View" functional
  • Scrolling and moving the canvas
  • Catching exceptions
  • Reducing/vanishing pen-lag
  • History (part of Edit)
  • Selection of tiles
#39
Implemented a preview for the Qt map editor, using that parameter

./megaglest --preview-map=

With an autogenerated scenario more complex settings and tests would be possible, but did not implement that yet

./megalgest --load-scenario=
#40
Because this engine is closed source and costs money.

Furthermore some people like to hack around with the sources and learn C++, OpenGL etc.

I would rather use SpringRTS or pyrogenesis than making the game closed source freeware.

There is also a philosophy behind free software https://www.gnu.org/philosophy/free-sw.html
#41
gonna participate, somebody has to lose :D
#42
Also builds on Arch GNU/Linux with

pacman -S qt4

or

pacman -S qt5 and -DUSE_QT5=On

You can find the default dependencies with pacman -Si megaglest


mkdir SCM
cd SCM
git clone https://github.com/dabascht/megaglest-source.git megaglest-source_dabascht
cd megaglest-source_dabascht
git checkout qt4
cd mk/linux
sed -i 's/^EXTRA_CMAKE_OPTIONS=$/EXTRA_CMAKE_OPTIONS="-DBUILD_MEGAGLEST=Off -DBUILD_MEGAGLEST_MAP_EDITOR=On -DBUILD_MEGAGLEST_MODEL_IMPORT_EXPORT_TOOLS=Off -DBUILD_MEGAGLEST_MODEL_VIEWER=Off -DUSE_QT5=Off"/' build-mg.sh
./build-mg.sh


#43
Quote from: filux on 23 August 2013, 18:35:51
wrong thinking

everything in console, inside a files, etc. is default in english and should be always in english
I totally agree with that, but --load-scenario= only works with the translated names ... and that's the problem
#44
MegaGlest / Re: Adding Gameranger support?
23 August 2013, 18:25:28
Quote from: Ingvarr23 on 22 August 2013, 19:35:40
where can I find a tutorial to host my MegaGlest game then?

You don't need a tutorial for this.

Just make sure your router and/or firewall open port 61357 for your computer ... standard stuff for games.

Then in megaglest 'new game'>'internet game'>'host game' and make sure 'publish on masterserver?' is ticked, that's it.
#45
First of all: I use the German localization.

megaglest --load-scenario=egypt_mayhem works, that's right, this scenario name does not seem being translated. And just few scenario names are translated, at least in the German version.

I can't run megaglest --load-scenario=amazones instead I have to use megaglest --load-scenario=amazonen
#46
 64bit archlinux:

megaglest --list-scenarios and megaglest --load-scenario= are not compatible.

megaglest --list-scenarios lists the folder names of all scenarios

megaglest --load-scenario= expects the scenario name how it is defined in the .lng-file




Edit (tomreyn): Removed [bug] tag, not needed on the bug reports forum.
#47
I just tested it again.
I uploaded my --verbose output

That's a screenshot before (wave 13)...



and after (wave 15) the occurance of that bug.

#48
This occurs when too many units are on the map.
New movement commands are given, but not obeyed.
I'm not sure if they start walking when enough units got killed, but they don't start walking when a movement command is fulfilled.

this behavior can be observed in this scenario: http://www.file-upload.net/download-7987022/pigdefense.zip.html

It's a towerdefense with just pig waves and just 10sec between new waves, every wave will be 130% of the wave before. Since the pigs are slow and CPUs need some time to die, there is a huge amount of pigs on the map. The CPUs are still alive when the first units stop moving.




Edit (tomreyn): Removed [bug] tag, not needed on the bug reports forum.
#49
I got an error when tried to save and load a scenario with some lua code. I used a float variable and megaglest tried to restore it as an integer.

I used this in my global script:

wavemultiplyer = 0.3;

Megeglest wrote this to the savegame file:

<LuaScript variable="wavemultiplyer" value="0.3" value_type="3"/>

When I tried to load the game, I got this:

[2013-08-17 21:34:15] *ERROR* In [/build/megaglest/src/megaglest-3.8.0-beta1/source/glest_game/game/script_manager.cpp::init 468]
error [Error converting from string to int, found: [0.3]
Stack Trace:
megaglest:Shared::Platform::megaglest_runtime_error::megaglest_runtime_error(std::string const&, bool)address [0xa71cd8] line: 0
megaglest:Shared::Util::strToInt(std::string const&)address [0xa480a1] line: 0
megaglest:Shared::Lua::LuaScript::loadGame(Shared::Xml::XmlNode const*)address [0xa02452] line: 0
megaglest:Glest::Game::ScriptManager::loadGame(Shared::Xml::XmlNode const*)address [0x5412ee] line: 0
megaglest:Glest::Game::ScriptManager::init(Glest::Game::World*, Glest::Game::GameCamera*, Shared::Xml::XmlNode const*)address [0x5442fa] line: 0
megaglest:Glest::Game::Game::init(bool)address [0x585096] line: 0
megaglest:Glest::Game::Program::setState(Glest::Game::ProgramState*, bool)address [0x652e68] line: 0
megaglest:Glest::Game::Game::loadGame(std::string, Glest::Game::Program*, bool, Glest::Game::GameSettings const*)address [0x580812] line: 0
megaglest:Glest::Game::MenuStateLoadGame::mouseClick(int, int, Shared::Platform::MouseButton)address [0x780cf8] line: 0
megaglest:Glest::Game::MainWindow::eventMouseDown(int, int, Shared::Platform::MouseButton)address [0x681d50] line: 0
megaglest:Shared::Platform::Window::handleMouseDown(SDL_Event)address [0xa7892a] line: 0
megaglest:Shared::Platform::Window::handleEvent()address [0xa794ea] line: 0
megaglest:Glest::Game::glestMain(int, char**)address [0x68e51e] line: 0
megaglest:Glest::Game::glestMainSEHWrapper(int, char**)address [0x6939d1] line: 0
/usr/lib/libc.so.6:__libc_start_main()address [0x7ff0b5025a15] line: 0
megaglest() [0x4c6d99]address [0x4c6d99] line: 0
]
[2013-08-17 21:34:15] *ERROR* In [/build/megaglest/src/megaglest-3.8.0-beta1/source/glest_game/global/lang.cpp::getScenarioString Line: 488] Error [Value not found in propertyMap: In [/build/megaglest/src/megaglest-3.8.0-beta1/source/glest_game/game/script_manager.cpp::init 468]
error [Error converting from string to int, found: [0.3]
Stack Trace:
megaglest:Shared::Platform::megaglest_runtime_error::megaglest_runtime_error(std::string const&, bool)address [0xa71cd8] line: 0
megaglest:Shared::Util::strToInt(std::string const&)address [0xa480a1] line: 0
megaglest:Shared::Lua::LuaScript::loadGame(Shared::Xml::XmlNode const*)address [0xa02452] line: 0
megaglest:Glest::Game::ScriptManager::loadGame(Shared::Xml::XmlNode const*)address [0x5412ee] line: 0
megaglest:Glest::Game::ScriptManager::init(Glest::Game::World*, Glest::Game::GameCamera*, Shared::Xml::XmlNode const*)address [0x5442fa] line: 0
megaglest:Glest::Game::Game::init(bool)address [0x585096] line: 0
megaglest:Glest::Game::Program::setState(Glest::Game::ProgramState*, bool)address [0x652e68] line: 0
megaglest:Glest::Game::Game::loadGame(std::string, Glest::Game::Program*, bool, Glest::Game::GameSettings const*)address [0x580812] line: 0
megaglest:Glest::Game::MenuStateLoadGame::mouseClick(int, int, Shared::Platform::MouseButton)address [0x780cf8] line: 0
megaglest:Glest::Game::MainWindow::eventMouseDown(int, int, Shared::Platform::MouseButton)address [0x681d50] line: 0
megaglest:Shared::Platform::Window::handleMouseDown(SDL_Event)address [0xa7892a] line: 0
megaglest:Shared::Platform::Window::handleEvent()address [0xa794ea] line: 0
megaglest:Glest::Game::glestMain(int, char**)address [0x68e51e] line: 0
megaglest:Glest::Game::glestMainSEHWrapper(int, char**)address [0x6939d1] line: 0
/usr/lib/libc.so.6:__libc_start_main()address [0x7ff0b5025a15] line: 0
megaglest() [0x4c6d99]address [0x4c6d99] line: 0
]
#50
I gonna use, I it's less confusing this way

--lesser than
function lt(a,b)
return not(a >= b);
end

--lesser than or equal to
function le(a,b)
return not(a > b);
end