Project Perfect Mod Forums
:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: Privacy Policy :: Search :: Memberlist :: Usergroups :: Register :: Profile :: Log in to check your private messages :: Log in ::


The time now is Thu Mar 28, 2024 8:52 am
All times are UTC + 0
otsmapgen testing
Moderators: Judeau
Post new topic   Reply to topic Page 1 of 1 [21 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
Equiredox
Rocket Infantry


Joined: 29 Jun 2005

PostPosted: Sat Aug 04, 2007 10:00 am    Post subject:  otsmapgen testing
Subject description: forum discussing how to create certain types of terrain using otsmapgen
Reply with quote  Mark this post and the followings unread

As you may have been aware, I, Equiredox, have been creating otsmapgen. The map generator may seem limiting, and simple, but given time to play around with it, and understand its workings, it proves somewhat powerful.

To operate this terrain generator, involves supplying a set of basic algorithms, that when 'superimposed' upon each other, form different styles and feels of terrain which can vary radically in behavior. Basically, otsmapgen works by allowing the user to input a list of in-built algorithms (in order) which are to be applied to a surface. Each of these algorithms is "behavior independent" (they each do their own thing which cannot be reproduced by combinations of the other algorithms - think of "linear independence" of a set of vectors but in terms of algorithms and how they affect the terrain). Also the order of the algorithms which are applied matters (not commutative). So there are a lot of different solutions you can get providing on what parameters you supply – and their orders.

I need some people to play around with otsmapgen, using different lists of algorithms and parameters, to try to come up with some funky styles of terrain. The objective is to produce a list of known inputs which create cool and different types of terrain. If you find some inputs which form interesting results, post the details here. People who discover different types of terrain, will be credited to helping with the development of otsmapgen.

I have attached a rar archive file which contains a complied version of otsmapgen v1 beta - for use, and four sample terrain outputs I recently obtained - to show how changing the parameters can vary the behaviour. These are a small set of possible solutions. For usage details of otsmapgen, just run otsmapgen.exe without any args in command prompt, and brief usage details will appear.

In previous cases, I stated that otsmapgen will include the use of a fractal algorithm - however, it had not been implemented yet, and isn't seen as a compulsory "feature / function / requirement" at this stage. Also, I did program a feature that sped up otsmapgen by changing the size of the drawing surface to suit the destination heightmap size - however, it became apparent that if you used the same set of parameters / args on different heightmap sizes, they differed in nature and behaviour because the size of the drawing surface was changed. So that feature was exluded - and no matter the heightmap size, it will draw to a 1024 x 1024 surface then condense it down after the heightmap is generated.

-------------------------------------------------------
EDIT:
-------------------------------------------------------
An optimised version of otsmapgen V1.0B can be download here: http://www.ppmsite.com/forum/download.php?id=17179
Which produces terrain much faster then the standard V1.0B



rock1.png
 Description:
 Filesize:  583.59 KB
 Viewed:  20639 Time(s)

rock1.png



rock2.png
 Description:
 Filesize:  473.91 KB
 Viewed:  20639 Time(s)

rock2.png



canyon_rough2_3D.png
 Description:
otsmapgen.exe canyon_rough.bmp 2 -f 0.1 0.01 500 -s 20 20 -c 8 10 5 1.0 -s 20 20
 Filesize:  187.69 KB
 Viewed:  20639 Time(s)

canyon_rough2_3D.png



canyon_smooth_3D.png
 Description:
otsmapgen.exe canyon_smooth.bmp 2 -f 0.1 0.01 500 -s 40 40 -c 10 20 5 2 -s 20 20
 Filesize:  330.16 KB
 Viewed:  20639 Time(s)

canyon_smooth_3D.png



otsmapgen_v1beta_binary.rar
 Description:
this is the v1 beta version of otsmapgen.exe compiled for win32

Download
 Filename:  otsmapgen_v1beta_binary.rar
 Filesize:  35.5 KB
 Downloaded:  355 Time(s)


Last edited by Equiredox on Mon Aug 06, 2007 2:18 pm; edited 1 time in total

Back to top
View user's profile Send private message Skype Account
DeathRay2K
Commander


Joined: 01 Sep 2002
Location: Canada

PostPosted: Sat Aug 04, 2007 10:40 am    Post subject: Reply with quote  Mark this post and the followings unread

The exe only flashes open and then closed. Wink

_________________

Back to top
View user's profile Send private message Visit poster's website Skype Account
Equiredox
Rocket Infantry


Joined: 29 Jun 2005

PostPosted: Sat Aug 04, 2007 11:41 am    Post subject: Reply with quote  Mark this post and the followings unread

DeathRay2K wrote:
The exe only flashes open and then closed. Wink


It is a command-line / console application - so it needs to be run via command prompt. By default in windows - if you run it by double clicking on it, windows will show the console until the app exits, which I assume is that "flash" you discuss.

To overcome this run otsmapgen via command prompt directly.
Goto Start->Run
Type "cmd"
Hit enter
Now run the application via command prompt directly.



cmd.PNG
 Description:
screenshot - command prompt
 Filesize:  18.86 KB
 Viewed:  20620 Time(s)

cmd.PNG



Back to top
View user's profile Send private message Skype Account
Judeau
Commander


Joined: 28 Feb 2004

PostPosted: Sat Aug 04, 2007 11:42 am    Post subject: Reply with quote  Mark this post and the followings unread

DeathRay2K wrote:
The exe only flashes open and then closed. Wink


it's a command-line utility

_________________
Micro TS
Portable, no campaign, movies or music, just the engine and needed resources for skirmish and lan.

Back to top
View user's profile Send private message Send e-mail Skype Account
DeathRay2K
Commander


Joined: 01 Sep 2002
Location: Canada

PostPosted: Sat Aug 04, 2007 11:59 am    Post subject: Reply with quote  Mark this post and the followings unread

I know its a command-line utility, but that doesn't excuse it from opening via windows; its perfectly possible for them to open just fine.

Ah well, I'll save my rant against command-line programs for another day. Wink

_________________

Back to top
View user's profile Send private message Visit poster's website Skype Account
Banshee
Supreme Banshee


Also Known As: banshee_revora (Steam)
Joined: 15 Aug 2002
Location: Brazil

PostPosted: Sat Aug 04, 2007 5:43 pm    Post subject: Reply with quote  Mark this post and the followings unread

4, 5 minutes to generate a map? That seems to be slow... why does it take so long?

Back to top
View user's profile Send private message Visit poster's website Skype Account
Equiredox
Rocket Infantry


Joined: 29 Jun 2005

PostPosted: Sun Aug 05, 2007 2:07 am    Post subject: Reply with quote  Mark this post and the followings unread

It is only a beta and fairly unoptimised. As an example, if you have my source (in the main topic forum), look at how it draws and compares values against a straight line for fault algorithm generation, total utter crap in terms of optimisation. For every pixel it recalculates the line, and there is a lot of wasted time. I could easily make this run 50x faster - seriously. What about my filter / blur algorithm? - it recalulates tonnes of redudant values for every pixel it processes!

However, "speed" wasn't a primary requirement of these early stages, it came secondary to the quality of the maps it generated - and given my limited time (have to share it with many things) I am trying to focus on the major features first.

Since people keep bringing it up though, I think I will start to look over my code and optimise it.

------------------------------------------------------------------
EDIT:
------------------------------------------------------------------
Anyway, here is the optimised executable running
around 50x faster. It produces the maps in seconds (seriously).
The terrain that took 4-5 minutes to generate, is now taking 5-20 seconds.



otsmapgen_v1beta_binary_optimised_version.rar
 Description:
V1.0 Beta optimised - runs ~50x faster then previous releases

Download
 Filename:  otsmapgen_v1beta_binary_optimised_version.rar
 Filesize:  35.71 KB
 Downloaded:  333 Time(s)


otsmapgen.c
 Description:
V1.0 Beta optimised source: Only otsmapgen.c needed to be changed.

Download
 Filename:  otsmapgen.c
 Filesize:  35.61 KB
 Downloaded:  259 Time(s)


bmpstream.h
 Description:
V1.0 Beta standard bitmap stream source

Download
 Filename:  bmpstream.h
 Filesize:  12.8 KB
 Downloaded:  288 Time(s)


Back to top
View user's profile Send private message Skype Account
Equiredox
Rocket Infantry


Joined: 29 Jun 2005

PostPosted: Tue Aug 07, 2007 2:29 pm    Post subject: Reply with quote  Mark this post and the followings unread

Is this strategy game map material? Any criticism or feedback will be appreciated.

I have attempted to make the maps 'smoother' but tried to make the terrain sort of bumpy - but not too bumpy.



sample_testset_1.PNG
 Description:
sample map set
 Filesize:  463.33 KB
 Viewed:  20498 Time(s)

sample_testset_1.PNG



generate_testset.rar
 Description:
otsmapgen args used

Download
 Filename:  generate_testset.rar
 Filesize:  35.93 KB
 Downloaded:  367 Time(s)


Back to top
View user's profile Send private message Skype Account
Audiopulse
Railgun Soldier


Joined: 08 Jul 2006
Location: in your closet... Post = true

PostPosted: Tue Aug 07, 2007 7:30 pm    Post subject: Reply with quote  Mark this post and the followings unread

Not bad - try to aim for some "characteristic" for your maps. Bottlenecks, cliffs, having a map not just with "ups" and "downs" in a different height.


though I guess youre already moving towards that - but you asked Wink

_________________
audiopulse sagt:
your raging arse is creating storms?
Luke | CCHyper sagt:
yup, neptune size!

Back to top
View user's profile Send private message
Equiredox
Rocket Infantry


Joined: 29 Jun 2005

PostPosted: Thu Aug 09, 2007 2:09 pm    Post subject: Reply with quote  Mark this post and the followings unread

Audiopulse wrote:
Not bad - try to aim for some "characteristic" for your maps. Bottlenecks, cliffs, having a map not just with "ups" and "downs" in a different height.

though I guess youre already moving towards that - but you asked Wink


Thanks for your input. I got a free moment to try out some new input parameters. I used a negative value for the canyon depth flag and got some interesting results. Otsmapgen doesn't currently check for "accessibility" of the map - so it doesn't make 'ramps' that allow access to certain levels / parts of the terrain as of yet.

I have attached the args needed to produce the terrain in this testset. However - be aware that the optimised beta version has issues with its 'filter' feature and doesn't work sometimes if the filter length is less then 50 pixels. As a result - I have used the "slow" version of otsmapgen to produce these results until I have time to correctly go over and fix the optimised filter algorithm - which should be soon.



sample_testset_2.PNG
 Description:
testset 2
 Filesize:  229.04 KB
 Viewed:  20451 Time(s)

sample_testset_2.PNG



generate_testset2.rar
 Description:
args used to produce testset 2

Download
 Filename:  generate_testset2.rar
 Filesize:  35.7 KB
 Downloaded:  332 Time(s)


Back to top
View user's profile Send private message Skype Account
Audiopulse
Railgun Soldier


Joined: 08 Jul 2006
Location: in your closet... Post = true

PostPosted: Thu Aug 09, 2007 8:54 pm    Post subject: Reply with quote  Mark this post and the followings unread

these ones DO look interesting. The one down at the second row at the right would be almost usable.

_________________
audiopulse sagt:
your raging arse is creating storms?
Luke | CCHyper sagt:
yup, neptune size!

Back to top
View user's profile Send private message
VK
Pyro Sniper


Joined: 28 Jul 2005
Location: in GAMEMD.EXE

PostPosted: Fri Aug 10, 2007 7:45 pm    Post subject: Reply with quote  Mark this post and the followings unread

I found small error in your code:
go to bmpstream.h and see this
Code:

typedef unsigned int UINT16; // unsigned int
typedef unsigned long UINT32; // unsigned long
typedef unsigned char UCHAR; // unsigned char (byte)


you type UINT16 still have 32 bits (4bytes) size, isn't it?
(Most of 32bit compilers have int = long)
(try something like printf("%d", sizeof(UINT16))Wink

you should change it to:
Code:

typedef unsigned short UINT16;


also please don't use C99 standart, not all compilers support it.

_________________
ARM forever - x86 sucks

Back to top
View user's profile Send private message Skype Account
Equiredox
Rocket Infantry


Joined: 29 Jun 2005

PostPosted: Sat Aug 11, 2007 12:09 am    Post subject: Reply with quote  Mark this post and the followings unread

Code:

typedef unsigned int UINT16; // unsigned int
typedef unsigned long UINT32; // unsigned long
typedef unsigned char UCHAR; // unsigned char (byte)


The naming scheme refers to ANSI C minimum acceptable values. According to "The C Programming Language by Brian Kernighan and Dennis Ritchie" - in the standards section, the minimum length of int is 16 bits, however it can be 32 bits or greater depending on the compiler etc. I just named it such that "16" represents, that at the least, it is 16 bits.

Also, I tend to do alot of PIC programming, like in CC5X - where an "int" would represent 2 bytes - so I am just use to it.

Quote:
also please don't use C99 standart, not all compilers support it.


Yeah, I know. I am going to brush it up, and actually try to keep to more supported standards. This is just a hobby I do in my free time, and a work in progress, so to speak. But I agree with you totally.

Back to top
View user's profile Send private message Skype Account
VK
Pyro Sniper


Joined: 28 Jul 2005
Location: in GAMEMD.EXE

PostPosted: Sat Aug 11, 2007 10:40 am    Post subject: Reply with quote  Mark this post and the followings unread

Quote:
Also, I tend to do alot of PIC programming, like in CC5X - where an "int" would represent 2 bytes - so I am just use to it.

yes, also MS-DOS and Win16 for example.

Quote:
I just named it such that "16" represents, that at the least, it is 16 bits.

if so, nothing bad here.

but if you in future forget about it and write something like this:
Code:

UINT16* pointer;

int value = *pointer;

Be careful!

_________________
ARM forever - x86 sucks

Back to top
View user's profile Send private message Skype Account
Kiith-Sa
Rocket Cyborg


Joined: 26 Oct 2004

PostPosted: Sat Aug 11, 2007 4:18 pm    Post subject: Reply with quote  Mark this post and the followings unread

Why don't you typedef ints from stdint.h?
You have both exact size ints and fastest,probably exact size ints there.

_________________
Time will tell...
Sooner or later...
Time will tell...

Back to top
View user's profile Send private message
Equiredox
Rocket Infantry


Joined: 29 Jun 2005

PostPosted: Sun Aug 12, 2007 12:45 am    Post subject: Reply with quote  Mark this post and the followings unread

Kiith-Sa wrote:
Why don't you typedef ints from stdint.h?
You have both exact size ints and fastest,probably exact size ints there.


I have just been taking into account the C89 standard libraries (no stdint.h there - C99 thing) - even though I haven't been following the standard entirely, I do plan to conform to that spec (C89) later on - like moving all the variable declarations to the beginning of a function etc.

Back to top
View user's profile Send private message Skype Account
Equiredox
Rocket Infantry


Joined: 29 Jun 2005

PostPosted: Mon Aug 20, 2007 2:38 am    Post subject: Reply with quote  Mark this post and the followings unread

Here are some current sample images taken directly from the GUI program. I note that perhaps around 1 of 3, or even 1 of 2 maps generated looks crap, but you can get some nice ones inbetween - which require just a bit of tweaking to make them playable. Also, upon further testing, using the app during 10am - 10:59am generates the same map it seems - something wrong with the random seed - need to look into it.



terrain_snapshots_leveled_best_out_of_7.PNG
 Description:
 Filesize:  166.39 KB
 Viewed:  20249 Time(s)

terrain_snapshots_leveled_best_out_of_7.PNG



terrain_snapshots2_leveled_best_out_of_7.PNG
 Description:
 Filesize:  149.7 KB
 Viewed:  20250 Time(s)

terrain_snapshots2_leveled_best_out_of_7.PNG



Back to top
View user's profile Send private message Skype Account
Audiopulse
Railgun Soldier


Joined: 08 Jul 2006
Location: in your closet... Post = true

PostPosted: Mon Aug 20, 2007 7:41 pm    Post subject: Reply with quote  Mark this post and the followings unread

I suggest keeping the maps for around 20 years somewhere at a dark cellar to have them riping xD

_________________
audiopulse sagt:
your raging arse is creating storms?
Luke | CCHyper sagt:
yup, neptune size!

Back to top
View user's profile Send private message
Equiredox
Rocket Infantry


Joined: 29 Jun 2005

PostPosted: Tue Aug 21, 2007 1:34 pm    Post subject: Reply with quote  Mark this post and the followings unread

Quote:
I suggest keeping the maps for around 20 years somewhere at a dark cellar to have them riping xD


They do look a 'little' bit green, lol. The colour is just used as a distinction between heights. This colour seemed to make it the easiest to use / visualise.

OTSMAPGEN Summary / Conclusion:
This is probably as far as I will go with otsmapgen - knowing Judeau is writing some pretty spiffy software atm for ots which should blow this thing away. But, it hasn't gone to waste as it may provide a good sample demonstration to my 'software portfolio' to prove I can write in C, use Direct X and spawn child processes in .NET when it comes time for work experience (but needs a bit of cleaning up still).

But then again, what do you expect out of 1.5hrs work a week on it as a hobby? In terms of quality vs. time spent - I think it went reasonable - but still requires some work (is there such a thing as a finished software product?). As a lesson, I should whip out the P.S.P. and try to learn from how I tackled this problem.

I also think, this proves that in iterative software development processes, and in the case of agile development, getting prompt customer feedback and product testing (both in functionality and acceptance) proved very useful in determining the direction and stage of this product (as a form of software measurement/completeness). This otsmapgen project heavily relied on a test driven software development model, and since you can't write a program to evaluate how good terrain is easily - the testing took the form of customer feedback (which is why there was a lot of stuff released in increments).

Anyways, thanks guys for your input. I have seen some of Judeau's work - and it is really good. But I don't want to leak any info Judeau wants to keep secret atm.

Back to top
View user's profile Send private message Skype Account
Banshee
Supreme Banshee


Also Known As: banshee_revora (Steam)
Joined: 15 Aug 2002
Location: Brazil

PostPosted: Mon Aug 27, 2007 2:17 am    Post subject: Reply with quote  Mark this post and the followings unread

I haven't visited this topic for a while, so sorry for the bump. Anyway, as far as I could look at these height maps, most of them lack a space for 'buildable bases'. I think you could make a post processing procedure to add spaces that could qualify as candidates for buildable bases and maybe expansion bases. Remember that the final objective is to get height maps for a playable RTS engine.

Back to top
View user's profile Send private message Visit poster's website Skype Account
Kiith-Sa
Rocket Cyborg


Joined: 26 Oct 2004

PostPosted: Mon Aug 27, 2007 10:08 am    Post subject: Reply with quote  Mark this post and the followings unread

I don't think RMG should be taken so important. It will help mappers to start, but the best maps will still be made from scratch.

_________________
Time will tell...
Sooner or later...
Time will tell...

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [21 Posts] Mark the topic unread ::  View previous topic :: View next topic
 
Share on TwitterShare on FacebookShare on Google+Share on DiggShare on RedditShare on PInterestShare on Del.icio.usShare on Stumble Upon
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © phpBB Group

[ Time: 0.1966s ][ Queries: 22 (0.0219s) ][ Debug on ]