project-navigation
Personal tools

Author Topic: ufo2map  (Read 9415 times)

Offline Muton

  • Sergeant
  • *****
  • Posts: 496
    • View Profile
ufo2map
« on: April 24, 2010, 02:19:26 pm »
Tye BIG problem with ufo2map and maps as a whole is
to keep them up2date

recompile them all, all the time again and again is VERY time consuming *oh really?*
and frustrating

map-get.py is NO alternative (yet)
currently 110 maps are are not up2date
just a view of them
bunker.bsp, city_train.bsp, corrupter_crash.bsp, england.bsp, estate.bsp, farm.bsp, ferry.bsp, fighter_crash.bsp, fueldump.bsp, harbour.bsp, lake_ice.bsp, lake_ice_big.bsp, office.bsp, oriental.bsp, oriental_mosque.bsp, resort.bsp, rivertown.bsp, subway.bsp, tower.bsp, village.bsp, wilderness.bsp

At the moment there is no real easy and reliable way to determine if all maps are up2date or not
You can use a hash for a map file instead of trusting -onlynewer switch of ufoai
but there is no such way for ufo2map itself
Its possible to hash ufo2map the same way as maps to reliable find a modification
But if a dev just corrects a spelling
you end up thinking ufo2map has changed and starting to recompile all maps.
To determine what a dev has changed and how this effects map compiling is nearly impossible

How to fix it?!
We already have a version number
we need a revision number too
In that case a dev modifying the code in a way that a recompile is necessary
he/she/it just increment the revision number
using the new -V --version switch will return the Version and revision number
version:1.2.5 revision:1
This way we can precisely determine if it really necessary to recompile all maps or not

I've done this and adding more -nice options for NT5++
« Last Edit: April 24, 2010, 04:38:35 pm by Muton »

Offline MCR

  • PHALANX veteran
  • ******
  • Posts: 1244
    • View Profile
Re: ufo2map
« Reply #1 on: April 24, 2010, 05:28:20 pm »
Cool to see you working on this. 8)
I thought till now, that I can trust map.get.py & that the maps on the server are compiled there each midnight ?!
Thanks for the info that this is not the case. Good to know before posting outdated bug-reports  :-[  :-\...

Offline Muton

  • Sergeant
  • *****
  • Posts: 496
    • View Profile
Re: ufo2map
« Reply #2 on: May 03, 2010, 11:11:23 am »

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Re: ufo2map
« Reply #3 on: May 03, 2010, 12:15:19 pm »
it would be nice if you could remove utf-8 chars from batch files and if you could write them human readable ;)

also why not fixing map-get.py to help everyone? writing a batch file that only windows users can use is not a nice option to get rid of the problem.

Offline BTAxis

  • Administrator
  • PHALANX Commander
  • *******
  • Posts: 2607
    • View Profile
Re: ufo2map
« Reply #4 on: May 03, 2010, 12:25:13 pm »
You forget that Windows users can't use map-get.py in the first place, unless they install Python first.

Offline bayo

  • Professional loser
  • Project Coder
  • Captain
  • ***
  • Posts: 733
    • View Profile
Re: ufo2map
« Reply #5 on: May 03, 2010, 12:56:47 pm »
also why not fixing map-get.py to help everyone?

Isnt it a server side problem? The server dont have the last maps, then map-get do not download it.

Offline Muton

  • Sergeant
  • *****
  • Posts: 496
    • View Profile
Re: ufo2map
« Reply #6 on: May 03, 2010, 01:52:31 pm »
> utf-8 chars
uups win 7 notepad do utf-8?

> human readable
dont want to add another file
so thats the cost of "embedding"

> why not fixing map-get.py
thats the third step
Far to complex to fix and test it on one day

> Isnt it a server side problem
The whole idea is a problem ;)
Its useless if the files on the server are not always up2date
than you need a logic to handle file changes during recompile
The biggest map took 3,5h to compile
And what happen if someone is downloading a map and the script do apply the new one in the same moment?

Offline geever

  • Project Coder
  • PHALANX Commander
  • ***
  • Posts: 2561
    • View Profile
Re: ufo2map
« Reply #7 on: May 03, 2010, 02:42:52 pm »
> Isnt it a server side problem
The whole idea is a problem ;)
The whole idea can't be the problem, the players need to have exactly the same maps (checksums) for multiplayer...

-geever
« Last Edit: May 03, 2010, 06:39:39 pm by bayo »

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Re: ufo2map
« Reply #8 on: May 03, 2010, 02:57:34 pm »
> Isnt it a server side problem
The whole idea is a problem ;)
Its useless if the files on the server are not always up2date
than you need a logic to handle file changes during recompile
The biggest map took 3,5h to compile
And what happen if someone is downloading a map and the script do apply the new one in the same moment?

i'm not sure whether you got the idea behind this ;)

Offline Destructavator

  • Combination Multiple Specialty Developer
  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 1908
  • Creater of Scorchcrafter, knows the zarakites...
    • View Profile
Re: ufo2map
« Reply #9 on: May 03, 2010, 09:28:31 pm »
You forget that Windows users can't use map-get.py in the first place, unless they install Python first.

What about a portable python package?  The people making the new and upcoming version of Blender have been packaging a portable package of python so that when the whole thing is done modelers won't need to download and install python first.

If this would work for UFO:AI scripts, then we could just have the python scripts and not need any batch files or other little odds and ends that only work on one platform.  That and the .sh scripts could also be done away with and replaced, because they can be a pain for Windows users to figure out how to run (especially for non-programmers).

I admit I'm not a veteran programmer and I don't know as much about these things as some of the others here, but I've seen some of these things that have been mentioned bundled in portable packages before, then customized for various uses, set up to work on more than one operating system.

Offline BTAxis

  • Administrator
  • PHALANX Commander
  • *******
  • Posts: 2607
    • View Profile
Re: ufo2map
« Reply #10 on: May 03, 2010, 09:30:38 pm »
Maybe, but it would be yet another awkward artificial trick to patch a problem. A REAL solution would be to code a client in C and compile it on each platform natively.

Offline Destructavator

  • Combination Multiple Specialty Developer
  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 1908
  • Creater of Scorchcrafter, knows the zarakites...
    • View Profile
Re: ufo2map
« Reply #11 on: May 03, 2010, 09:56:39 pm »
Maybe, but it would be yet another awkward artificial trick to patch a problem. A REAL solution would be to code a client in C and compile it on each platform natively.

Perhaps that should be done then?  Ufo2Map.exe is already like that, compiled for each platform, isn't it?  Perhaps that utility could be expanded to take over the functions that the scripts currently provide?

I just wish I had more experience with C and C++, If I did I would volunteer to do it myself.

Offline bayo

  • Professional loser
  • Project Coder
  • Captain
  • ***
  • Posts: 733
    • View Profile
Re: ufo2map
« Reply #12 on: May 03, 2010, 10:17:49 pm »
Maybe, but it would be yet another awkward artificial trick to patch a problem. A REAL solution would be to code a client in C and compile it on each platform natively.
Too much work for nothing. Things inside /contrib, compiling maps is not a "player" skill. Then installing Python is not an horrrible gap. Plus, I use Linux an i also must install Python to use map-get.

I really dont see the point. If you can't download a package, if u can't download maps (map-get), u must compile urself maps (ufo2map).

Offline BTAxis

  • Administrator
  • PHALANX Commander
  • *******
  • Posts: 2607
    • View Profile
Re: ufo2map
« Reply #13 on: May 03, 2010, 10:43:52 pm »
How about including python binaries in the C::B package, though? Keep all peripheral downloads in one place.

Offline Duke

  • Administrator
  • PHALANX veteran
  • *****
  • Posts: 1037
    • View Profile
Re: ufo2map
« Reply #14 on: May 04, 2010, 12:07:34 am »
i'm not sure whether you got the idea behind this ;)
I think I didn't get it either.
So what are the requirements for mapget ? I know it
- dowloads the newer compiled maps from some server
- is needed for MP games so all clients use the very same maps
- can be used to avoid compiling the maps yourself
Anything else ?