France added to MercatorWorld

User avatar
Mr. Kibernetik
Site Admin
Posts: 4786
Joined: Mon Nov 19, 2012 10:16 pm
My devices: iPhone, iPad, MacBook
Location: Russia
Flag: Russia

Re: MercatorWorld: Russia added

Post by Mr. Kibernetik »

You can save any multi-frame sprite.
When you save your multi-frame sprite with command SPRITE SAVE it is automatically saved as sprite sheet.

In samples folder there will be an example "sprite creator.txt" which generates a set of single-frame sprites, shows them, then creates multi-frame sprite from them, plays it, saves it as sprite sheet, shows this sprite sheet, loads it as multi-frame sprite, and plays second sprite also (in a shuttle way ;) ).

This is the text of the sample "sprite creator.txt":

Code: Select all

' creates N sprites and shows them
' creates animated sprite "a" from these sprites and shows LOOP animation
' saves these sprites as spritesheet and shows this image
' reads this spritesheet back to animated sprite "b" and shows SWAY animation
' NOTE: if you change N then to set proper NX and NY you need to know how spritesheet is created

graphics
n=10 ' number of sprites
nx=5 ' spritesheet X count
ny=2 ' spritesheet Y count

' creates N sprites
draw font size 40
draw color 0,0,1
for i=1 to n
  sprite i begin 50,50
  draw rect 0,0 to 50,50
  draw text i at 0,5
  sprite i end
  sprite i at 60*(i-1),50
  sprite i show
  next i
draw font size 30
draw color .8,.8,.8
draw text "Sprites:" at 10,10

' creates animated sprite "a" from sprites
sprite 1 copy "a"
for i=2 to n
  sprite "a" add i
  next i

' shows animated sprite "a"
draw text "A:" at 10,130
sprite "a" at 60,120
sprite "a" show
sprite "a" delay 0.3
sprite "a" loop

' saves animated sprite as spritesheet
f$="test"&n&".png"
sprite "a" save f$

' shows spritesheet
draw text "Spritesheet:" at 10,190
draw image f$ at 0,230

' loads spritesheet as animated sprite "b"
sprite "b" load f$,nx,ny

' shows animated sprite "b"
draw text "B:" at 130,130
sprite "b" at 180,120
sprite "b" show
sprite "b" delay 0.3
sprite "b" sway

end: goto end

User avatar
Dutchman
Posts: 851
Joined: Mon May 06, 2013 9:21 am
My devices: iMac, iPad Air, iPhone
Location: Netherlands
Flag: Netherlands

Re: MercatorWorld: Russia added

Post by Dutchman »

Great! Really a wonderfull set of sprite creation commands. :!: :!: :!:

User avatar
Mr. Kibernetik
Site Admin
Posts: 4786
Joined: Mon Nov 19, 2012 10:16 pm
My devices: iPhone, iPad, MacBook
Location: Russia
Flag: Russia

Re: MercatorWorld: Russia added

Post by Mr. Kibernetik »

I was using your MercatorWorld program today - very nice program!

Only thing I would suggest is that cities dots to have different size according to city population (city size). It will be much easier to navigate if to see where are bigger cities.

User avatar
Dutchman
Posts: 851
Joined: Mon May 06, 2013 9:21 am
My devices: iMac, iPad Air, iPhone
Location: Netherlands
Flag: Netherlands

Re: MercatorWorld: Russia added

Post by Dutchman »

yes, I planned that already, but first I want to solve problems with the map of the Netherlands.

User avatar
Dutchman
Posts: 851
Joined: Mon May 06, 2013 9:21 am
My devices: iMac, iPad Air, iPhone
Location: Netherlands
Flag: Netherlands

Re: MercatorWorld: Russia added

Post by Dutchman »

The following additions and changes have been made:
- Language is now set by the variable 'Language' in the first line of the program
- Russian district names are now dependent on the 'Language' variable
- The Netherlands is added to MercatorWorld. The program to run is named 'Nederland'. The local language is chosen for that name because that name (program-name) occurs in the top-bar during run-time.
- For the same reason the names of the Russian programs has been adapted.
- Documentation files on Mercator-projection have been corrected on minor details.
- Several files have been adapted/corrected.
- The files in DropBox have been updated. See first post on this subject.

To be done:
Programs will be adapted to version 3.4 of Smart-Basic
The size of the city-plots will become dependent on the population size.
The 'heart' of Russia will get a zoomed map, due to the large concnetration of cities.
France is the next country to be added.

User avatar
Dutchman
Posts: 851
Joined: Mon May 06, 2013 9:21 am
My devices: iMac, iPad Air, iPhone
Location: Netherlands
Flag: Netherlands

Re: Improved city-plot in MercatorWorld

Post by Dutchman »

I have improved the cityplot:
- The appearance of the spots representing the cities have been improved.
The function 'PloitCities' in the file "mercatormap-b.txt" makes now a call to the function 'Plot(n,x,y)' which should be located in the main 'country'-programfile.
In this way e.g. district-capitals can be given a different appearance
- The default city-spot is now in two contrasting colours (field and border) for better visibility.
- The appearance of the city-spots in the MercatorWorld-'countries' have been changed accordingly.
- The city-list for Russia have been sorted such that the largest cities are plotted at the end and can thus not be obscured by other cities.
- The capital cities of the Netherlands have also been shifted to the end of the file for the same reason.

Folders and screenshot are updated

Bolgheri
Posts: 4
Joined: Sun Dec 29, 2013 11:46 am

Re: Improved city-plot in MercatorWorld

Post by Bolgheri »

In your new Version (from 20.1.2013) is a Bug: Wrong Nummer of arguments in function "PLOTCITIES" ,CALL PlotCities.
With best regards

User avatar
Dutchman
Posts: 851
Joined: Mon May 06, 2013 9:21 am
My devices: iMac, iPad Air, iPhone
Location: Netherlands
Flag: Netherlands

Re: Improved city-plot in MercatorWorld

Post by Dutchman »

@Bolgheri » 21 Jan 2014, 19:04
You have probably not updated the complete folder. :o
I have downloaded the folder and had no problem with running the programs.
If I make changes, then often several additional changes are necessary in certain functions and not all changes are mentioned in the update-report.
Sorry for the inconvenience. ;)

User avatar
Mr. Kibernetik
Site Admin
Posts: 4786
Joined: Mon Nov 19, 2012 10:16 pm
My devices: iPhone, iPad, MacBook
Location: Russia
Flag: Russia

Re: Improved city-plot in MercatorWorld

Post by Mr. Kibernetik »

Bolgheri wrote:In your new Version (from 20.1.2013) is a Bug: Wrong Nummer of arguments in function "PLOTCITIES" ,CALL PlotCities.
With best regards
I cannot confirm this. Probably you did not update all files.

Bolgheri
Posts: 4
Joined: Sun Dec 29, 2013 11:46 am

Re: Improved city-plot in MercatorWorld

Post by Bolgheri »

You are right, I deleted all Files and copied them again. Now it works again. Thank you! 8-)

Post Reply