Gamestudio Links
Zorro Links
Newest Posts
Lapsa's very own thread
by Lapsa. 06/08/26 22:41
Stooq now requires an API key
by VHX. 06/08/26 20:14
ZorroGPT
by TipmyPip. 06/06/26 12:36
Zorro 3.01 recoded MMI function issue
by TipmyPip. 06/04/26 05:44
SGT_FW
by Aku_Aku. 05/31/26 11:05
Issues resuming trades on Demo account
by Martin_HH. 05/22/26 13:31
XTB
by pr0logic. 05/18/26 12:27
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
1 registered members (TipmyPip), 3,586 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Seraphinang, Koti, curry, DeepxKalsi, Samed
19219 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
"Treadmill" Script for infinite outdoor terrain Worlds here #422959
05/21/13 15:18
05/21/13 15:18
Joined: May 2013
Posts: 174
N
NeoDumont Offline OP
Member
NeoDumont  Offline OP
Member
N

Joined: May 2013
Posts: 174
Hi Folks !

After being absent from this forum and game development a while I'm now back and I would like to know if anybody is interested in a "Treadmill" Script.

I wrote a 9-Tile "treadmill" script allowing you to create outdoor worlds of infinite size. Just depending on the number of tile files your directory can handle you can create worlds as big as morrowind or even larger using my script called "Neomill". I wrote versions from a simple "Blockmill" up to the (nearly final) version, which can handle Blocks, Terrains, mdls and sprites.
The package includes tools to instantly create template worlds of very big size, as well as positioning tool scipts for ingame placement of sprites or mdls and fake terrain shadows.
The terrain mill uses a mixed fake hmp/mdl system... ok I stop here.

If anyone is interested in my script i will publish it within the next weeks.

P.S The neomill script until now is written in C-Script, but im planning to convert it to lite-C. You need at least a GST Version with entity Dynamic load
commands like A7 or higher, a PC with something around 1.8 GHZ and a basic knowlege of C-script or lite-C for enhancing the Neomill scrip for a full RPG Game with superlarge worlds.


J.Hunke

Re: "Treadmill" Script for infinite outdoor terrain Worlds here [Re: NeoDumont] #422964
05/21/13 16:25
05/21/13 16:25
Joined: Mar 2006
Posts: 1,993
Karlsruhe
PadMalcom Offline
Serious User
PadMalcom  Offline
Serious User

Joined: Mar 2006
Posts: 1,993
Karlsruhe
Yes yes yes!! That would be great!

Re: "Treadmill" Script for infinite outdoor terrain Worlds here [Re: PadMalcom] #422970
05/21/13 17:26
05/21/13 17:26
Joined: May 2009
Posts: 5,377
Caucasus
3run Offline
Senior Expert
3run  Offline
Senior Expert

Joined: May 2009
Posts: 5,377
Caucasus
NeoDumont@ man, this sounds awesome. I would be glad to see it in action laugh


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: "Treadmill" Script for infinite outdoor terrain Worlds here [Re: 3run] #422971
05/21/13 18:24
05/21/13 18:24
Joined: Nov 2007
Posts: 2,568
Germany, BW, Stuttgart
MasterQ32 Offline
Expert
MasterQ32  Offline
Expert

Joined: Nov 2007
Posts: 2,568
Germany, BW, Stuttgart
could you post some screenshots of the generated world?


Visit my site: www.masterq32.de
Re: "Treadmill" Script for infinite outdoor terrain Worlds here [Re: MasterQ32] #422972
05/21/13 18:48
05/21/13 18:48
Joined: Jul 2001
Posts: 6,904
H
HeelX Offline
Senior Expert
HeelX  Offline
Senior Expert
H

Joined: Jul 2001
Posts: 6,904
Yes, cool - of course we would appreciate that! smile I wrote something similar a while back for a 2.5D sidescroller but I always had akward problems with syncing everything when doing the treadmill-reverse-step (or however it is called smile).

Re: "Treadmill" Script for infinite outdoor terrain Worlds here [Re: HeelX] #423059
05/23/13 14:36
05/23/13 14:36
Joined: May 2013
Posts: 174
N
NeoDumont Offline OP
Member
NeoDumont  Offline OP
Member
N

Joined: May 2013
Posts: 174
OK, I'll see what I can do to final it.

I'll try to post a screenshot and some more details on weekend.

Greets

J. Hunke

Re: "Treadmill" Script for infinite outdoor terrain Worlds here [Re: NeoDumont] #423359
05/28/13 14:01
05/28/13 14:01
Joined: May 2013
Posts: 174
N
NeoDumont Offline OP
Member
NeoDumont  Offline OP
Member
N

Joined: May 2013
Posts: 174
Sorry for the long post, but i have no homepage or ftp acces to webspace at the moment. The final version is still in the test phase, but i think i can final it in 2 or three weeks.

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

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 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 BL5-6.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.
Unchunked terrain can not be moved or repositioned in ACKNEX (at least in my A7 Extra version)
So the 9 tile treadmill can't work with 9 hmp tiles. I had to bypass this problem by using mdl terrains for the tiles around the center tile, while the center tile is a true hmp terrain. Don't want go into that deeper, but i use a mixed hmp / mdl system for terrain . This causes a limitation. While you can use detail maps for the center terrain hmp, you can't do this for mdl-terrain surrounding the center hmp. So when you approach a border of the center hmp tile and look at the next tile, which is a mdl, you would see the difference between the detail mapped hmp texture and the plain mdl texture very intensively. So Neomill7 works best with no detail maps for hmps. Create some good terrain textures and use a high video mode and the terrain world can look quite good. If you cannot renounce detail maps for hmps you must find your own solution. Sorry.

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

You also have to create the behaviour Action for your mdl/sprite or wmb and add it to the Neomill main "engine script" called Millcontrol7.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 Millcontrol7.wdl). Because i don't now what you want to let your Actor do, its you to write the action. However there ar three basic choices already. See script.


3. The tools

3.1 The positioning tool script Neomillpos.wdl

The position tool C-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. Millcontrol does that of course for all 9 tiles.
If no MDx-y.dat file can be found 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.

This is it for now, will be continued lated.

Last edited by NeoDumont; 05/28/13 14:45.
Re: "Treadmill" Script for infinite outdoor terrain Worlds here [Re: NeoDumont] #423365
05/28/13 17:41
05/28/13 17:41
Joined: Mar 2011
Posts: 3,150
Budapest
sivan Offline
Expert
sivan  Offline
Expert

Joined: Mar 2011
Posts: 3,150
Budapest
nice concept and description laugh
as I remember in A7 you can modify terrain vertices to move a terrain (but don't know how it is supported by c-script, only know lite-c), or alternatively you can remove it and create again, which is slower.


Free world editor for 3D Gamestudio: MapBuilder Editor
Re: "Treadmill" Script for infinite outdoor terrain Worlds here [Re: sivan] #423371
05/28/13 19:49
05/28/13 19:49
Joined: Feb 2010
Posts: 886
Random Offline
User
Random  Offline
User

Joined: Feb 2010
Posts: 886
Yes, yes, yes!!!
I would love to use such a code ^^



Re: "Treadmill" Script for infinite outdoor terrain Worlds here [Re: Random] #423476
05/30/13 14:46
05/30/13 14:46
Joined: May 2013
Posts: 174
N
NeoDumont Offline OP
Member
NeoDumont  Offline OP
Member
N

Joined: May 2013
Posts: 174
@sivan:

I tried the remove and create method for 9 tile hmps instead of repositioning them, but it didn't work. Once a terrain was created somewhere in the xyz quantum universe and then removed, it kept this position somehow and refused to be created at a different place. At least in my GST Version (or my script ?, dont' know). Looks as if terrain really is not movable, as mentioned in the A7 manual.

Maybe you find some time to test out this problem yourself ? Feel free to write your own mill or modify my script when it is released.

Greets

J.H.

P.S. I am testing the actor following (the player) script at the moment with neomill. Some time ago someone posted his doubts if the actor could follow the player when entering new a tile, but this is no problem, as long as the actor finds some hmp/wmb ground underneath him. He is simply repositioned like all other entities.

BTW. I will email the full Neomill package to the acknex resource site and you can hopefully download it from there.

Last edited by NeoDumont; 05/30/13 15:31.
Page 1 of 2 1 2

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1