Author Topic: Heightmap Exporter/Import (for gbm / mgm)  (Read 17105 times)

MuwuM

  • Ornithopter
  • *****
  • Posts: 426
  • No Game without Move(ment)
    • View Profile
    • MuwuM - Lexicons
Heightmap Exporter/Import (for gbm / mgm)
« on: 22 May 2012, 17:41:59 »
I developed a simple Heightmap Exporter/Importer. Supports gbm and mgm maps and png heightmaps.

http://muwns.eu/mgm/



Old Version:
http://www.muwum-lexicons.de/mgm/

with this tool you can get maps like this very easy:

... the Heightmap for this was:
« Last Edit: 30 March 2020, 16:30:53 by titi »

John.d.h

  • Moderator
  • Airship
  • ********
  • Posts: 3,757
  • I have to go now. My planet needs me.
    • View Profile
Re: Heightmap Exporter/Import (for gbm / mgm)
« Reply #1 on: 22 May 2012, 19:49:25 »
Cool!

ElimiNator

  • Airship
  • ********
  • Posts: 3,391
  • The MegaGlest Moder.
    • View Profile
Re: Heightmap Exporter/Import (for gbm / mgm)
« Reply #2 on: 23 May 2012, 00:53:22 »
Looks cool!  :)
Get the Vbros': Packs 1, 2, 3, 4, and 5!

atze

  • Technician
  • ****
  • Posts: 119
    • View Profile
Re: Heightmap Exporter/Import (for gbm / mgm)
« Reply #3 on: 23 May 2012, 16:20:09 »
Great work MuwuM. A really great tool.  :thumbup: Really great. Here is created a map (as experiment) in 3 seconds. ;D
 


Thank you.
this signature is not available in your country

wciow

  • Behemoth
  • *******
  • Posts: 968
    • View Profile
Re: Heightmap Exporter/Import (for gbm / mgm)
« Reply #4 on: 23 May 2012, 16:21:49 »
Nice simple tool for maps, thanks Muwum  :thumbup:
Check out my new Goblin faction - https://forum.megaglest.org/index.php?topic=9658.0

atze

  • Technician
  • ****
  • Posts: 119
    • View Profile
Re: Heightmap Exporter/Import (for gbm / mgm)
« Reply #5 on: 23 May 2012, 16:52:57 »
I guess this tool http://www.earthsculptor.com/  could be quite interesting for some mappers. It is free and has a heightmap exporter. In combination with your tool, you can certainly create some pretty good maps. (Works with Wine under Linux.)
this signature is not available in your country

tomreyn

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 2,764
    • View Profile
    • MegaGlest - the free and open source cross platform 3D real-time strategy game
Re: Heightmap Exporter/Import (for gbm / mgm)
« Reply #6 on: 23 May 2012, 21:01:06 »
Nice tool. :) Can you make the source code available just in case you or your webserver vanish at some point?
atibox: Ryzen 1800X (8 cores @3.6GHz), 32 GB RAM, MSI Radeon RX 580 Gaming X 8G, PCI subsystem ID [1462:3417], (Radeon RX 580 chipset, POLARIS10) @3440x1440; latest stable Ubuntu release, (open source) radeon (amdgpu) / mesa video driver
atibox (old): Core2Quad Q9400 (4 cores @2.66GHz), 8 GB RAM, XFX HD-467X-DDF2, PCI subsystem ID [1682:2931], (Radeon HD 4670, RV730 XT) @1680x1050; latest stable Ubuntu release, (open source) radeon / mesa video driver
notebook: HP envy13d020ng
internet access: VDSL2+

· · · How YOU can contribute to MG · Latest development snapshot · How to build yourself · Megapack techtree · Currently hosted MG games · · ·

MuwuM

  • Ornithopter
  • *****
  • Posts: 426
  • No Game without Move(ment)
    • View Profile
    • MuwuM - Lexicons
Re: Heightmap Exporter/Import (for gbm / mgm)
« Reply #7 on: 23 May 2012, 22:39:47 »
Can you make the source code available just in case you or your webserver vanish at some point?

of course:

index.php
Code: [Select]
<?php
if(!is_uploaded_file($_FILES[&#39;map&#39;][&#39;tmp_name&#39;])){
 
echo(&#39;<h1>Heightmap Exporter/Importer</h1><form action="?" method="post" enctype="multipart/form-data">
Map: <input type="file"  name="map" /> This is the map to Export or Import the Heightmap.<br/>
Heightmap: <input type="file"  name="highmap" /> If givenImport this Heightmap, if notExport the Heightmap.<br/>
<
input type="submit" value="Export/Import" />
</
form> &#39;);
}else{

include(&
#39;readFunc.php&#39;);
$handle fopen($_FILES[&#39;map&#39;][&#39;tmp_name&#39;], "rb");
$contents = &#39;&#39;;
$version getInt32($handle);
#echo(&#39;Version: &#39;.$version.&#39; <br/>&#39;);
$maxPlayers getInt32($handle);
#echo(&#39;maxPlayers: &#39;.$maxPlayers.&#39; <br/>&#39;);
$width getInt32($handle);
#echo(&#39;width: &#39;.$width.&#39; <br/>&#39;);
$height getInt32($handle);
#echo(&#39;height: &#39;.$height.&#39; <br/>&#39;);
$altFactor getInt32($handle);
#echo(&#39;altFactor: &#39;.$altFactor.&#39; <br/>&#39;);
$waterLevel getInt32($handle);
#echo(&#39;waterLevel: &#39;.$waterLevel.&#39; <br/>&#39;);
$titel getString($handle,128);
#echo(&#39;title: &#39;.$titel.&#39; <br/>&#39;);
$autor getString($handle,128);
#echo(&#39;author: &#39;.$autor.&#39; <br/>&#39;);

if($version <= 1){
$description getString($handle,256);
}else{
$description getString($handle,128);
$magic getInt32($handle);
$meta getString($handle,124);
}
#echo(&#39;description: &#39;.$description .&#39; <br/>&#39;);

$i 0;
while (
$i $maxPlayers) {
$startLocation[$i] = array(getInt32($handle),getInt32($handle));
#echo(&#39;<b>StartLocation Player &#39;.$i .&#39;:</b> (&#39;.$startLocation[$i][0].&#39;,&#39;.$startLocation[$i][1].&#39;)<br/>&#39;);
$i++;
}

$i 0;
while (
$i $width $height) {
$map[($i $width)][(floor($i $width))][&#39;h&#39;] = getFloat($handle);
$i++;
}
$i 0;
while (
$i $width $height) {
$map[($i $width)][(floor($i $width))][&#39;s&#39;] = getInt8($handle);

$i++;
}
$i 0;
while (
$i $width $height) {
$map[($i $width)][(floor($i $width))][&#39;o&#39;] = getInt8($handle);
$i++;
}
fclose($handle);

$faktor 1;
$im imagecreatetruecolor(($width)*$faktor, ($height)*$faktor);
$color imagecolorallocatealpha($im255 ,255255,0);
imagefilledrectangle($im00$width*$faktor ,$height*$faktor$color);

$i 0;
while (
$i < ($width) * ($height)) {
$co $map[($i $width)][(floor($i $width))][&#39;h&#39;] / 20 * 255;
$color imagecolorallocatealpha($im$co ,$co$co0);
imagefilledrectangle($im, ($i $width)*$faktor, (floor($i $width))*$faktor, ($i $width+1)*$faktor-1,(floor($i $width)+1)*$faktor-1$color);
#echo(&#39;<b>Cell (&#39;.($i % $width).&#39;,&#39;.(floor($i / $width)).&#39;)</b><br/><pre>&#39;);
#echo(&#39; Height: &#39;.$map[($i % $width)][(floor($i / $width))][&#39;h&#39;].&#39; <br/>&#39;);
#echo(&#39; Surface type: &#39;.$map[($i % $width)][(floor($i / $width))][&#39;s&#39;].&#39; <br/>&#39;);
#echo(&#39; Object: &#39;.$map[($i % $width)][(floor($i / $width))][&#39;o&#39;].&#39; <br/>&#39;);
##echo(&#39; Resource: &#39;.getInt8($handle).&#39; <br/>&#39;);
#echo(&#39;</pre>&#39;);
$i++;
}

if(
is_uploaded_file($_FILES[&#39;highmap&#39;][&#39;tmp_name&#39;]) ){
imagedestroy($im);
$im imagecreatefrompng($_FILES[&#39;highmap&#39;][&#39;tmp_name&#39;]);
$i 0;
while (
$i < ($width) * ($height)) {
$col imagecolorsforindex ($im,imagecolorat($im, ($i $width)*$faktor,(floor($i $width))*$faktor));
$map[($i $width)][(floor($i $width))][&#39;h&#39;] = $col[&#39;red&#39;] / 255 * 20;
#$color = imagecolorallocatealpha($im, 0 ,0, 0,  / 20 * 127);
#imagefilledrectangle($im, ($i % $width)*$faktor, (floor($i / $width))*$faktor, ($i % $width+1)*$faktor-1,(floor($i / $width)+1)*$faktor-1, $color);
$i++;
}
$tmpfname tempnam("/tmp""map_");
$handle fopen($tmpfname"wb");
writeInt32($handle,$version);
writeInt32($handle,$maxPlayers);
writeInt32($handle,$width);
writeInt32($handle,$height);
writeInt32($handle,$altFactor);
writeInt32($handle,$waterLevel);
writeString($handle,$titel,128);
writeString($handle,$autor,128);
if(
$version <= 1){
writeString($handle,$description,256);
}else{
writeString($handle,$description,128);
writeInt32($handle,$magic);
writeString($handle,$meta,124);
}
$i 0;
while (
$i $maxPlayers) {
writeInt32($handle,$startLocation[$i][0]);
writeInt32($handle,$startLocation[$i][1]);
$i++;
}
$i 0;
while (
$i $width $height) {
writeFloat($handle,$map[($i $width)][(floor($i $width))][&#39;h&#39;]);
$i++;
}

$i 0;
while (
$i $width $height) {
writeInt8($handle,$map[($i $width)][(floor($i $width))][&#39;s&#39;]);
$i++;
}
$i 0;
while (
$i $width $height) {
writeInt8($handle,$map[($i $width)][(floor($i $width))][&#39;o&#39;]);
$i++;
}

fclose($handle);

header(&#39;Content-Description: File Transfer&#39;);
    
header(&#39;Content-Type: application/octet-stream&#39;);
    
header(&#39;Content-Disposition: attachment; filename=&#39;.$_FILES[&#39;map&#39;][&#39;name&#39;]);
    
header(&#39;Content-Transfer-Encoding: binary&#39;);
    
header(&#39;Expires: 0&#39;);
    
header(&#39;Cache-Control: must-revalidate&#39;);
    
header(&#39;Pragma: public&#39;);
    
header(&#39;Content-Length: &#39; . filesize($tmpfname));
    
ob_clean();
    
flush();
    
readfile($tmpfname);

}else{
header(&#39;Content-type: image/png&#39;);
imagepng($im);
}

imagedestroy($im);

}
?>
readFunc.php
Code: [Select]
<?php
function getInt32($handle){
$str fread($handle4);
$buf pack(&#39;a4&#39;,$str);
$res unpack(&#39;l&#39;,$buf);
return $res[1];
}
function 
getInt8($handle){
$str fread($handle,1);
$buf pack(&#39;a&#39;,$str);
$res unpack(&#39;c&#39;,$buf);
return $res[1];
}
function 
getString($handle,$length){
$str fread($handle$length);
$buf pack(&#39;a&#39;.$length,$str);
$res unpack(&#39;a&#39;.$length,$buf);
return $res[1];
}
function 
getFloat($handle){
$str fread($handle4);
$buf pack(&#39;a4&#39;,$str);
$res unpack(&#39;f&#39;,$buf);
return $res[1];
}

function 
writeInt32($handle,$val){
$buf pack(&#39;l&#39;,$val);
return fwrite($handle$buf,4);
}
function 
writeInt8($handle,$val){
$buf pack(&#39;c&#39;,$val);
return fwrite($handle$buf,1);
}
function 
writeFloat($handle,$val){
$buf pack(&#39;f&#39;,$val);
return fwrite($handle$buf,4);
}
function 
writeString($handle,$val,$length){
$buf pack(&#39;a&#39;.$length,$val);
return fwrite($handle$buf,$length);
}

?>

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,239
    • View Profile
Re: Heightmap Exporter/Import (for gbm / mgm)
« Reply #8 on: 23 May 2012, 22:51:03 »
I suggest we add this to svn as well as to megaglest.org?

Thanks

tomreyn

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 2,764
    • View Profile
    • MegaGlest - the free and open source cross platform 3D real-time strategy game
Re: Heightmap Exporter/Import (for gbm / mgm)
« Reply #9 on: 17 June 2012, 15:06:42 »
Thanks for providing the source code, MuwuM.

I suggest we add this to svn as well as to megaglest.org?
The code currently lacks input validation and is prone to (at least) XSS. Until this is fixed I'd prefer not to host it on megaglest.org
« Last Edit: 17 June 2012, 15:22:02 by tomreyn »
atibox: Ryzen 1800X (8 cores @3.6GHz), 32 GB RAM, MSI Radeon RX 580 Gaming X 8G, PCI subsystem ID [1462:3417], (Radeon RX 580 chipset, POLARIS10) @3440x1440; latest stable Ubuntu release, (open source) radeon (amdgpu) / mesa video driver
atibox (old): Core2Quad Q9400 (4 cores @2.66GHz), 8 GB RAM, XFX HD-467X-DDF2, PCI subsystem ID [1682:2931], (Radeon HD 4670, RV730 XT) @1680x1050; latest stable Ubuntu release, (open source) radeon / mesa video driver
notebook: HP envy13d020ng
internet access: VDSL2+

· · · How YOU can contribute to MG · Latest development snapshot · How to build yourself · Megapack techtree · Currently hosted MG games · · ·

Ishmaru

  • Behemoth
  • *******
  • Posts: 1,071
  • um wat??
    • View Profile
    • DelphaDesign
Re: Heightmap Exporter/Import (for gbm / mgm)
« Reply #10 on: 17 May 2015, 12:37:59 »
I developed a simple Heightmap Exporter/Importer.
http://www.muwum-lexicons.de/mgm/ (supports gbm and mgm maps and png heightmaps)

Does anyone still have have this? The link is dead :(
Annex: Conquer the World Release 4 For Pc Mac + Linux
https://forum.megaglest.org/index.php?topic=9570.0
Annex is now on Facebook!
https://www.facebook.com/AnnexConquer

MuwuM

  • Ornithopter
  • *****
  • Posts: 426
  • No Game without Move(ment)
    • View Profile
    • MuwuM - Lexicons
Re: Heightmap Exporter/Import (for gbm / mgm)
« Reply #11 on: 19 May 2015, 17:42:24 »
Up again, was offline a few days, as I am moving from one hoster to another

you might also try http://muwum.net/mgm/
« Last Edit: 20 May 2015, 10:05:53 by MuwuM »

titi_son

  • Draco Rider
  • *****
  • Posts: 283
  • titi_son
    • View Profile
Re: Heightmap Exporter/Import (for gbm / mgm)
« Reply #12 on: 26 May 2015, 21:48:49 »
this should work very well together with the heightmap random generator of tribaltrouble:
https://github.com/ftomassetti/procedurality-lands
There was a download page on the oddlabs page but since it has been taken down, you can't download it anymore:
https://web.archive.org/web/20080629000920/http://oddlabs.com/procedurality.php
« Last Edit: 7 October 2016, 22:31:38 by filux »
My first Tilseset: SPRING :) (included in Megaglest )

Secret Hint: To play online join the IRC #megaglest-lobby on freenode which is the lobby chat ingame. So you can chat with or wait for people in the lobby without running megaglest all the time.

titi

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 4,240
    • View Profile
    • http://www.titusgames.de
Re: Heightmap Exporter/Import (for gbm / mgm)
« Reply #13 on: 15 December 2015, 09:28:48 »
We played around with this a bit and it turned out that the height differences are not big enough to get a nicely shaped map in MG. Maybe you can offer an additional multiplier for the height calculation to make the height differences more obvious ?
Try Megaglest! Improved Engine / New factions / New tilesets / New maps / New scenarios

MuwuM

  • Ornithopter
  • *****
  • Posts: 426
  • No Game without Move(ment)
    • View Profile
    • MuwuM - Lexicons
Re: Heightmap Exporter/Import (for gbm / mgm)
« Reply #14 on: 17 December 2015, 17:10:58 »
As I did not touch the code for ~ 3 years now, I would need to have a short look at it. I will do later this evening.

MuwuM

  • Ornithopter
  • *****
  • Posts: 426
  • No Game without Move(ment)
    • View Profile
    • MuwuM - Lexicons
Re: Heightmap Exporter/Import (for gbm / mgm)
« Reply #15 on: 18 December 2015, 18:01:06 »
I just rewrote the code in JavaScript & HTML5 (as I prefer it much over php).

http://muwns.eu/mgm/ (testing/not stable)


* Should run with all modern browsers

The whole map procressing is now done localy in web browser, so data is not send to server anymore and resistent to hacking (you can also save and start the file locally).

@ titi: I added a feature to change the contrast of the Heightmap.

Some improvements / more readable code will be done during christmas.

Also created a github repository: https://github.com/MuwuM/mgm-map-editor
« Last Edit: 19 December 2015, 13:07:59 by MuwuM »

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,239
    • View Profile
Re: Heightmap Exporter/Import (for gbm / mgm)
« Reply #16 on: 1 January 2016, 04:06:23 »
Very nice thanks Muwuum!

tomreyn

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 2,764
    • View Profile
    • MegaGlest - the free and open source cross platform 3D real-time strategy game
Re: Heightmap Exporter/Import (for gbm / mgm)
« Reply #17 on: 2 January 2016, 22:43:26 »
Very nice indeed. :)
This is not just a serverless heightmap editor, it also serves to 'document' the map format more (we could totally use proper descriptions of our file formats and network protocols on the wiki).

And it could lay the foundation to a HTML/Javascript map editor. If anyone is willing to implement this I'll sure be happy to add an upload backend.
atibox: Ryzen 1800X (8 cores @3.6GHz), 32 GB RAM, MSI Radeon RX 580 Gaming X 8G, PCI subsystem ID [1462:3417], (Radeon RX 580 chipset, POLARIS10) @3440x1440; latest stable Ubuntu release, (open source) radeon (amdgpu) / mesa video driver
atibox (old): Core2Quad Q9400 (4 cores @2.66GHz), 8 GB RAM, XFX HD-467X-DDF2, PCI subsystem ID [1682:2931], (Radeon HD 4670, RV730 XT) @1680x1050; latest stable Ubuntu release, (open source) radeon / mesa video driver
notebook: HP envy13d020ng
internet access: VDSL2+

· · · How YOU can contribute to MG · Latest development snapshot · How to build yourself · Megapack techtree · Currently hosted MG games · · ·

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: Heightmap Exporter/Import (for gbm / mgm)
« Reply #18 on: 8 January 2016, 06:50:03 »
And it could lay the foundation to a HTML/Javascript map editor. If anyone is willing to implement this I'll sure be happy to add an upload backend.
Might be interesting for a personal project. I'm not sure if it's be worthwhile, though. What could it do that a desktop version couldn't? Mostly I'd think it'd be more limited, since we wouldn't be able to easily run MG to preview the map and there's performance concerns for any kind of larger operations (eg, one feature that comes to mind is treating the height levels of the map as an image and gaussian bluring this to get softer slopes). Probably not an issue at map making sizes, though, and I've done some pretty intensive stuff with JS (my current work involves WebRTC -- sharing video, audio, and screen capture).

I'm not sure what could be done better in a JS version that a desktop version.
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

MuwuM

  • Ornithopter
  • *****
  • Posts: 426
  • No Game without Move(ment)
    • View Profile
    • MuwuM - Lexicons
Re: Heightmap Exporter/Import (for gbm / mgm)
« Reply #19 on: 8 January 2016, 13:56:01 »
And it could lay the foundation to a HTML/Javascript map editor. If anyone is willing to implement this I'll sure be happy to add an upload backend.
Might be interesting for a personal project. I'm not sure if it's be worthwhile, though. What could it do that a desktop version couldn't?
As desktop app it is written in C++. It can do everything (even embedding a web-browser running the dedicated HTML/JavaScript code).
But as of today HTML5 (and it's infrastructure) is extremly powerful and can do almost everything (only limited by security restrictions).  ;)

Mostly I'd think it'd be more limited, since we wouldn't be able to easily run MG to preview the map
I agree. But we have the megaglest:// URL and we could also add something like support for base64 encoded Map files as url (then we would not even need to save the map as a file if we don't want to)

and there's performance concerns for any kind of larger operations (eg, one feature that comes to mind is treating the height levels of the map as an image and gaussian bluring this to get softer slopes). Probably not an issue at map making sizes, though, and I've done some pretty intensive stuff with JS (my current work involves WebRTC -- sharing video, audio, and screen capture).
As most browsers with good HTML5 support has very optimized code (e.g. GPU-rendering) for Canvas2D (already used in this tool) and WebGL (would be required to preview the map realtime in the browser or WYSIWYG-editing) performance should not be a too big issue. Anyway it is important to write the JavaScript code non-blocking that you won't see the anoying 'This site is not responding'-messages (already used in this tool).

I've done some pretty intensive stuff with JS (my current work involves WebRTC -- sharing video, audio, and screen capture).

I'm not sure what could be done better in a JS version that a desktop version.

e.g. you could use your WebRTC knowledge to add an feature to collaborativly edit maps  ;D

It's probably more a question of preference than what is the technical restrictions. A great thing of JavaScript is the huge amount of small libraries that can handle stuff you do not want to develop by yourself.

There are also already HTML5 painting tools available that provide a huge amount of image editing. http://literallycanvas.com/, https://www.picozu.com/

Ok, regarding painting it would even be better to write a plugin for GIMP :D , but I hope you got my intention
« Last Edit: 8 January 2016, 14:09:31 by MuwuM »

tomreyn

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 2,764
    • View Profile
    • MegaGlest - the free and open source cross platform 3D real-time strategy game
Re: Heightmap Exporter/Import (for gbm / mgm)
« Reply #20 on: 9 January 2016, 21:49:53 »
We currently have a wxgtk based editor and model viewer. Build ing this is not much fun since it depends on old libraries which are not available on newer systems. Baxsto wrote an editor in QT, which is already better than the old one, but as far as I know it is not completely done, yet (and could not replace the model viewer). Maybe things would be easier on the web after all. (Or maybe it would just add yet another incomplete option.  :P )
atibox: Ryzen 1800X (8 cores @3.6GHz), 32 GB RAM, MSI Radeon RX 580 Gaming X 8G, PCI subsystem ID [1462:3417], (Radeon RX 580 chipset, POLARIS10) @3440x1440; latest stable Ubuntu release, (open source) radeon (amdgpu) / mesa video driver
atibox (old): Core2Quad Q9400 (4 cores @2.66GHz), 8 GB RAM, XFX HD-467X-DDF2, PCI subsystem ID [1682:2931], (Radeon HD 4670, RV730 XT) @1680x1050; latest stable Ubuntu release, (open source) radeon / mesa video driver
notebook: HP envy13d020ng
internet access: VDSL2+

· · · How YOU can contribute to MG · Latest development snapshot · How to build yourself · Megapack techtree · Currently hosted MG games · · ·

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: Heightmap Exporter/Import (for gbm / mgm)
« Reply #21 on: 11 January 2016, 19:23:33 »
e.g. you could use your WebRTC knowledge to add an feature to collaborativly edit maps  ;D
You probably shouldn't. WebRTC uses UDP. Perfectly suitable to lose some audio or video data (since being real time is what's important), but for collaborative editing, we really wouldn't want a user's change to go ignored (and order is likely important). Also, WebRTC only has native support on Firefox and Chrome for now. My work has to use ActiveX and Java plugins to get IE and Safari working (and that's a non-free third party solution).

A simple web sockets solution to communication is likely more ideal (I've been using SignalR for the signalling channel of said WebRTC application -- it's a nice RPC library for persistent connections, either via long polling or websockets).
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

MuwuM

  • Ornithopter
  • *****
  • Posts: 426
  • No Game without Move(ment)
    • View Profile
    • MuwuM - Lexicons
Re: Heightmap Exporter/Import (for gbm / mgm)
« Reply #22 on: 26 January 2016, 17:13:14 »
Just added some features to edit the map (header data only)

Github and Online Version updated

titi

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 4,240
    • View Profile
    • http://www.titusgames.de
Re: Heightmap Exporter/Import (for gbm / mgm)
« Reply #23 on: 10 February 2016, 22:59:29 »
In general this works pretty good and you get wonderful maps, but at least the online version crashes my firefox quite fast.
Try Megaglest! Improved Engine / New factions / New tilesets / New maps / New scenarios

MuwuM

  • Ornithopter
  • *****
  • Posts: 426
  • No Game without Move(ment)
    • View Profile
    • MuwuM - Lexicons
Re: Heightmap Exporter/Import (for gbm / mgm)
« Reply #24 on: 11 February 2016, 00:54:03 »
Can you tell me which version of Firefox you are using/ is crashing?
Is it just not responsive or does it really break (firefox closes/tab 'dies'/...)
What actions lead to the crash? Any? Even when waiting? Editing giant maps, using randomizor, changing contrast of the map heights?

I develop with Chrome stable release and Firefox DeveloperEdition (depending on the PC I use, both pretty strong, at least for Website rendering) so there might be some issues I did not notice while testing.

It is not so easy to build long running tasks in browsers. Maybe I should have a look into WebWorkers, beside being hard to learn implement, they could help with such issues. Possibly using WebGL instead of Canvas2D would improve Performance, too.

« Last Edit: 11 February 2016, 01:23:23 by MuwuM »

 

anything