Description of the Neomill project for Gamestudio from CONITEC.  From Juergen Hunke, Spring 2013, Updated release version.

What is the Neomill project ?

The Neomill project for CONITEC Gamestudio consist of a set of C-Scripts (Lite-C comes later) and some tools which allow you to create really very large in- or outdoorworlds. Worlds could easily be as large as Bethesdas Morrowind or even very very large up to the size of Asia or USA.

For using this script you need a Gamestudio version which has entity dynamic create and remove commands like GST A7 

1. Introduction to NeoMill  (Version: Neomill4)

The Quantum space of most GST Versions is limited by definition, I assume like all VR Engines. Although the GST provides a very large quantum space today, sufficent for many purposes,  sooner or later you reach the border of the quantum universe and need to load a new level which causes a longer break in gameplay. 
For large outdoorworlds like Gothic or Morrowind we usualy prefer a seamless wide landscape world, which can load and remove the objects dynamically and fast.
The Pro Version of GST provides chunked terrain and may be this is your first choice, if you want to create a large terrain outdoor world. However I only own  the Sybex Extra Version of A7 and I wanted my own endless world engine. 

As a solution for that I programmed  the 9 Tile "Treadmill" in C-Script and it works like this:

2. How the 9 tile "Treadmill" works

Try to imagine 9 wmb tiles of the same size (4096x4096 Quants) layed out in a square, 3 rows and 3 columns in a GST build level with a sycube and one player. The player stands in the middle of the center tile, around him the other 8 tiles.
The center tile is right in the middle of the ACKNEX universe. The other tiles  with the approp. 
distance offset, in this case 4096 Quants each in x,y axis or both.
The player looks to the east and sees the tile he stands on and the 3 tiles of the column on the right side of the 9 tile group.
Now he starts walking to the direction east, the x pos value increases. My neomill script checks always the players position and when the player reaches x > 2048 Quants the following happens:

The player, as well as all other entities (wmb, mdl, sprite) around him, are repositioned by substracting 4096 quants from each's x-postion instantly.
A new set of 3 new tiles for the right column is loaded (with ent_create)
The 3 Tiles of the left column are removed (ent_remove)
The player goes on.

The same happens when the player reaches a border of the center tile to the north, west, or south, but with the difference that sets of north or south rows or west tile column are moved and loaded/reloaded  newly with the appropriate positive or negative offsets.       

Said with simple words: Load in (in certain distance from me) what is in front of me, remove what is behind me. Therefore the name "mill".

In fact, the player, even in advanced versions of the Neomill script, never leaves a square of 4096x4096
Quants, if the tile size is 4096. He is always positioned back with 4096 quants plus or minus when he reaches a 2048 or -2048 border. Instead the world around him is loaded in or removed.

The repositioning all in all goes rather fast, if there are not too much entities used. To avoid any flickering
during the refreshing process I use screen save and load commands fixing the screen while repositioning and other cammands work. All this result in a small hesitation when entering a new tile depending on the speed of your computer and video card. You can find these small reload hesitations in most outdoor RPG Games and they can hardly be avoided.


3. An indexed file system is used by Neomill

Now, where do the tiles come from.
Because all tiles in Neomill are created and removed dynamically they must be available as a file.
My script expects each tile to be loaded in with a certain index filename, like BL3-6.wmb. BL stands for block, the first number represents the x value, the second the y value for the position in an imaginary tile array, or better tile-file x/y array, representing the whole game world. So when the player is on tile number 4/5 (in a xy index arr.) and reaches the eastern border the mill repositioning takes place and the new player global world index position is now 5/5. He now stands on the tile BL5-5.wmb, in front of him in a distance of about 4090 Quants to the east is tile no. BL6-5.wmb. In direction NE is BL6-6.wmb, to strict left is BL6-7.wmb. 

So in a way you are "milling" with 9 visible tiles through an array of  e.g. 60x60 = 3600 Files or tiles.

Because creating 3600 files with filenames from BL1-1.wmb to BL60-60.wmb would be true torture I wrote a tool which can create large numbers of tile index files automatically with the correct filename from a single template file. The tool creates indexed copies from template files like BL0-0.wmb and BL0-0.wmp you first have to create. After that, each indexed wmp tile file can be opened in WED and modified or enhanced with houses, streets or else and then saved back and build as wmb.     

-------------------------------------------------------------------------------------------------------------------------------------------
4. Millcontrol7.wdl of  Neomill7, a combined terrain tile engine with surface entities created from a txt file. 

Neomill7 is the latest Version of Neomill and can handle terrain, wmbs, mdls or sprites.
Although unchunked terrain cannot be moved in ACKNEX (at least in my A7 Extra version), they can be repositioned, as I found out now, via deleting and recreating. So neomill7 provides you a combined detail terrain .hmp, wmb, mdl, and .dat 9 tile treadmill for high quality infinite terrain. You may also customise the script for your purposes for mdl-mill or sprite- or wmb-mills only.


You have to add the file names of your surface mdl/sprite or wmbs in the positioning script in the definition segment, see the remarks in Neomillpos7.wdl.

You also have to create  the behaviour Action for your mdl/sprite or wmb and add it to the Neomill main engine script called Mill_control7.wdl. The positioning script only saves an index number for the Action you want for your entity. Depending on that number the ent_create command chooses the Action for it (have a look at the script Mill_control7.wdl). Because I don't now what you want to let your Actor do, its you to write the action. However there ar five basic choices already. See script mill_control7.wdl. 


3. The tools

3.1 The positioning tool script Neomillpos7.wdl

The position tool wdl-script included in Neomill7 allows you to walk over  terrain in ACKNEX and place an entity right where the players position is. You can select a mdl or sprite or another wmb via a small selector as well as an Action index number for the Action which will be created for the entity at this position.
The entity's name, the xyz position, it's horizontal angle and the Action index number are saved to a small txt file which also has an index file name like MD6-8.dat, containing the list of all entities to be created on your terrain or wmb tiles. You can edit this text file with a simple text editor anytime if necessary.
The script creates a new indexed file for every tile the player stands on. The entities, however, will be created the next time you start the world. Mill_control7 does that of course for all 9 visible tiles.  
If no MDx-y.dat file can be found by mill_control7 no surface stuff will be created. 

3.2 The marking tool. Helps to place faked shadows on your terrain texture.

After having placed all your entities for your tile, you can use the marking tool. This programm allows you to load a texture .bmp for your hmp or terrain mdl. After that you open a MDx-y.dat file. All xy positions of the file will be read and plotted on the texture as a single pixel in a color you choose from the menu. Copy the bmp to your favourite paint/photo program via clipboard. Now you can spray or paint a simple shadow on the texture at every  pixel mark. Save the picture bmp and put it back on your hmp and terrain MDL.
 This let the scenario look much more realistically. Pseudo shadows have been used in many games. Try to use it with trees or stones, makes the GST world look much better.

3.3 The Tile array creator TILE1.exe creates lots of wmb, hmp or mdl (for pseudo terrain) files instantly.

The Tile array creator. Mentioned above. Create a single block wmb of exactly x/y 4096x4096 size in WED, texture it and for the first try set all textures on flat shaded. Save it as BL0-0.wmp and build it as a map entity
named BL0-0.wmb.

Put TILE1.exe in the same direcrory. Start TILE1. Set the checkbox to wmb+wmp. Enter the x and y dimension of your tile array. Note: If you enter 100x100 tiles TILE1 will start to create 2x10000 cloned files beginning with BL1-1.wmb and the last name BL100-100.wmb and also for the wmp maps. That can take some time. Make up your mind, if you think you can design a big world like this. Better start with 20x20 tiles. I recommend it.
 Anyway, you can now open any BLx-y.wmp and edit it. That means you can not only put some houses on your tile block, but you can rework the block itself, hollow parts of it, add steps or pools or streets. As long as you build it as one map entity (wmb) it will be displayed in a tile square of your tile array world. However you can not build a wmb with mdls or sprites or sub-wmbs. They will not be displayd.

Note: There is no "file exist ?" checking implemented in Mill_control7
until now, for speed reasons. An error message will appear if Mill_control7 does not find the .hmp or .wmb tile it expects. Feel free to implement some checking routines in the script if you want.

Usage of Neomillpos7: (See also Working_with.txt)
Keys:
n and m selects file name of entity
v and b selects Action ID Number for the Action to be attached to the entity. See Mill_control7.wdl also.
1 saves entity filename, position, direction and Action ID
2 and 3 hop to next tile in x axis
4 and 5 hop to next tile in y axis 


 

         

       