rough beta project Grid Edit info for your amusement

a "Flower Power" community that may be interested in ANY part of aircraft sim creation ..... from creating models all the way to creating code
Post Reply
RAF_Roy
Flight Sergeant
Flight Sergeant
Posts: 1015
Joined: Sat May 01, 2004 9:01 pm
Location: So. California , USA
Contact:

rough beta project Grid Edit info for your amusement

Post by RAF_Roy »

I posted my very rough beta project Grid Edit here:
http://mogggy.org/TheGen/viewtopic.php?t=5366

(You would need access to the EAW code forum to get into the url, and the file on the ftp)

Hopefully someone may find it useful. The program is by no means a working copy, it is just a rough incomplete at this point. Hope any experienced programmers here tolerate my feeble programming if they look inside, and not rip me too much.
Also my long winded an somewhat annoying ramblings.. lol
The programming is in AutoIT3 a very nice and free scripting language that is very powerful, and if you have never looked at it you should as quickly allows you to access to Windows programming, GDI, WinAPI etc.

The point why I post the info here so maybe someone can use the idea, in your "Flower Power" Programming Realms..
Also probaly otherwise it will be overlooked, and frankly I always want to share my programs and whatever knowledge I have when I can to others.

per the program: overlook the semantics of the code, language, whatever distractions and let me describe what the intention is, and the intended functionality.
My forte is theory, that is ideas, not formulae, nor how exactly to implement those ideas.. so follow:

The program inteded as a graphic placement tool for EAW target objects (aka tmods) originally but in essense it is just a way to tranfer data information in a sensible way to any other storage and thus is you can grasp it (would be - not is it is an idea just no) a database migration tool, and possible query tools, etc. You should be able to similar for any game also, or many other kinds of data.

First look at the program, or visualize the interface. A simple grid, with the icons for the tmods you want to place. you select the icon (drag and drop not functioning yet so it is click and select, same to place) put the mouse on the grid and click. there is the tmod, next various options, for now only rotate, then last 'set' the object i.e to place it aka ok.

now the data I should describe: the idea this intially the x and y simply a 256 x 256 , the intention in EAW to free the tmods from a locked system.
Now to take the reasoning further it is because now the tmod can be placed anyway, in any part of the world, or any game. Why? well simply that is all needed the 256 (or 0-255h if you prefer) for x and 256 for Y.
the data storage not sure what best but for now simply a text file , .csv for example (you advanced people might prefer xml or whatever)
The way I move these later can be as simple as a folder system - in the case of EAW describe to you why and how;
first EAW world (very short analogy skip gory details)
640x * 320y (think of it as .bmp bitmap data without header)
total of 204,800 pixels (terrain tiles locations in EAW)
now that can subdivide many ways but consider stick to Eaw ways;
40x * 20y and each of these contain 256 Tiles = 204,800
now another detail each tile or pixel is what the my program 256x and 256y would code for, i.e a single tile or terrain square.
so if I have a csv or text data or other migratory 'unlocked' data storage.
To place my object(s) anywhere on the map with folder system is easy if a bit unwieldy (due to nuumber of folders) but makes the point I think:
40x folders * 20y folders, (or within that a single csv (or array)) wherein controls 256 possible tile locations. depending on where in those 1 or 256 folders or array where I place my individual csv with it's (1 of ) 256x and (1 of) 256y now my object data is represented.
So can place for example in the very firt folders and be top left of map 1x 1y and within that 1 of 256 and there read my csv and find the 2 numbers to place the object on the tile i.e. 256x and 256y.
Obviously more than a single tmod or object is needed, but you can follow..
OK so now the Game or Program we want to read in that data must be coded for the same system.Providing it does, and in EAW case it will in time (already EAW uses a sytem tht is compatible to this easily) then we have a new system, no more do the scenario makers have to use strange files and similar inconveniences. Now also entire campiagn tmod objects can be easily preserved in text file, xml, webpage, whatever.
The objects can be combined into any other objects.
the way to do that is with the 'relational" or 'local' csv , many ways to do that but in my primary example above it is the ones that controls a 256 tile area woul be in example.
(Sorry really bad explaination but follow me)
OK so think now of this: My grid Edit program. It needs the various settings to zoom or expand the region coding. the intial is close up, a single tile or even zoomed closer (but the data x,y again just 256x 256y)
Ok so when I want to load objects I just 'walk' the program over the world. When in a certain region (one of 40x * 20y folders) it consults the 'local' region file (controls a 256 tile region) and within that the specific (if exists) tile contains objects csv consults that, places the object on the grid.

You get the idea.

Ok then in the program only other features are building various means to switch loading or saving various files or projects/ subprojects, (maybe 'local' data collections, 'folders' etc.) and other than that some query actual programming "objects" to load the data from the (aka folders) and csvs data into arrays so better to do the deeds.. i.e Query the object and it returns the specific part of the array needed.

(btw: AutoIt3 can easily build powerful real "Objects" like that under Windows, or be made as a .dll to intergrate with C or other code, or vice versa,.AutoIT3 is also the fastest and easiest was to build Windows GUI programs, and almost anything else that can be done on a Windows Machine)

Cheers!
Roy
RAF_Roy
Flight Sergeant
Flight Sergeant
Posts: 1015
Joined: Sat May 01, 2004 9:01 pm
Location: So. California , USA
Contact:

Post by RAF_Roy »

Maybe bad explanation to follow but think about it. I'm not needed to convince anyone, just letting you know what I do.
It is the simple which is easiest to overlook.
When I first learned computing it seemed so simple the /path/folder/file and that systems are simply filing cabinets, but that is the most important key.
This I described above is really just the same thing.
Well except maybe the voice commands to pop the filing cabinet drawer open when you walk near it, which may be handy to implement, I forgot to mention.. yes AutoIT3 can do that too...
sydbod
Flight Sergeant
Flight Sergeant
Posts: 1678
Joined: Sat Aug 13, 2005 12:39 pm
Location: Sydney,NSW,Australia

Post by sydbod »

Hi Roy,

An interesting project you are working on.
I for one will be interested to see how it progresses.
I have never heard of AutoIt3 before. Thanks for bringing it to peoples attention. Must have a look at it also. :)

Regards
Syddy
Syddy........Just another breed of COOL CAT
RAF_Roy
Flight Sergeant
Flight Sergeant
Posts: 1015
Joined: Sat May 01, 2004 9:01 pm
Location: So. California , USA
Contact:

Post by RAF_Roy »

rgr syd,

OT but here's an example of some stuff way over my head, but might be useful to you,
"3D Axis is designed to draw graphs of almost any trigonometric functions that can be specified as a single function"
in game tools or designs, a real wiz named Yashied does some awesome work:
Image

http://www.autoitscript.com/forum/index ... 07180&st=0

just for anyone to fool around with there is a binary (.exe) there you can download and try with an example.
Post Reply