Random Map Progress

This is a discussion on Random Map Progress within the PHP Language forums, part of the PHP Programming Forums category; I asked for some advice a few months back about how to generate a "random" map for a ...


Go Back   Usenet Forums > PHP Programming Forums > PHP Language

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 10-10-2007
skulkrinbait@googlemail.com
 
Posts: n/a
Default Random Map Progress

I asked for some advice a few months back about how to generate a
"random" map for a game I was writing. I got sidetracked but here is
the latest version of it in case anyone is interested:

http://www.ogreview.org/view_map.php

It's going to need a lot of refirnement before it is going to be good
enough to be useful of course.

Reply With Quote
  #2 (permalink)  
Old 10-10-2007
Tyno Gendo
 
Posts: n/a
Default Re: Random Map Progress

skulkrinbait@googlemail.com wrote:
> I asked for some advice a few months back about how to generate a
> "random" map for a game I was writing. I got sidetracked but here is
> the latest version of it in case anyone is interested:
>
> http://www.ogreview.org/view_map.php
>
> It's going to need a lot of refirnement before it is going to be good
> enough to be useful of course.
>


Looks ok, seemed a little slow, but I don't know what it's doing in
the background :-)

What game are you writing?
Reply With Quote
  #3 (permalink)  
Old 10-11-2007
skulkrinbait@googlemail.com
 
Posts: n/a
Default Re: Random Map Progress

On Oct 10, 4:03 pm, Tyno Gendo <tyno.ge...@example.net> wrote:
> skulkrinb...@googlemail.com wrote:
> > I asked for some advice a few months back about how to generate a
> > "random" map for a game I was writing. I got sidetracked but here is
> > the latest version of it in case anyone is interested:

>
> >http://www.ogreview.org/view_map.php

>
> > It's going to need a lot of refirnement before it is going to be good
> > enough to be useful of course.

>
> Looks ok, seemed a little slow, but I don't know what it's doing in
> the background :-)
>
> What game are you writing?


It is a bit slow but that's not a problem as it will be a turn-based
game where the map will be generated in a way that the players wont
notice, I intend generating maps in 100 x 100 (for example) sized
blocks and then generating a new block whenever a player explores
beyond what is currently generated.

Each block will be in effect an island, to avoid the trouble of having
to make each block match up with it's neighbour.

The game doesn't have a name yet, but it is loosely based on the old
1980's game "Empire" if you're familiar with that. The map is fairly
key to the game so I'm not coding that until I am fairly happy with
the map although most of the ideas are already down on paper.

I'll post updates on here if there is any interest.

Reply With Quote
  #4 (permalink)  
Old 10-11-2007
Franko
 
Posts: n/a
Default Re: Random Map Progress

On 11 okt, 08:11, "skulkrinb...@googlemail.com"
<skulkrinb...@googlemail.com> wrote:
> On Oct 10, 4:03 pm, Tyno Gendo <tyno.ge...@example.net> wrote:
>
> > skulkrinb...@googlemail.com wrote:
> > > I asked for some advice a few months back about how to generate a
> > > "random"mapfor a game I was writing. I got sidetracked but here is
> > > the latest version of it in case anyone is interested:

>
> > >http://www.ogreview.org/view_map.php

>
> > > It's going to need a lot of refirnement before it is going to be good
> > > enough to be useful of course.

>
> > Looks ok, seemed a little slow, but I don't know what it's doing in
> > the background :-)

>
> > What game are you writing?

>
> It is a bit slow but that's not a problem as it will be a turn-based
> game where themapwill be generated in a way that the players wont
> notice, I intend generating maps in 100 x 100 (for example) sized
> blocks and then generating a new block whenever a player explores
> beyond what is currently generated.
>
> Each block will be in effect an island, to avoid the trouble of having
> to make each block match up with it's neighbour.
>
> The game doesn't have a name yet, but it is loosely based on the old
> 1980's game "Empire" if you're familiar with that. Themapis fairly
> key to the game so I'm not coding that until I am fairly happy with
> themapalthough most of the ideas are already down on paper.
>
> I'll post updates on here if there is any interest.


Looks nice! Did you resolve your problems with the 'dead end' lakes? I
would like it if you could post updates.

Reply With Quote
  #5 (permalink)  
Old 10-11-2007
skulkrinbait@googlemail.com
 
Posts: n/a
Default Re: Random Map Progress

On Oct 11, 12:05 pm, Franko <frankkoorns...@gmail.com> wrote:
> On 11 okt, 08:11, "skulkrinb...@googlemail.com"
>
>
>
>
>
> <skulkrinb...@googlemail.com> wrote:
> > On Oct 10, 4:03 pm, Tyno Gendo <tyno.ge...@example.net> wrote:

>
> > > skulkrinb...@googlemail.com wrote:
> > > > I asked for some advice a few months back about how to generate a
> > > > "random"mapfor a game I was writing. I got sidetracked but here is
> > > > the latest version of it in case anyone is interested:

>
> > > >http://www.ogreview.org/view_map.php

>
> > > > It's going to need a lot of refirnement before it is going to be good
> > > > enough to be useful of course.

>
> > > Looks ok, seemed a little slow, but I don't know what it's doing in
> > > the background :-)

>
> > > What game are you writing?

>
> > It is a bit slow but that's not a problem as it will be a turn-based
> > game where themapwill be generated in a way that the players wont
> > notice, I intend generating maps in 100 x 100 (for example) sized
> > blocks and then generating a new block whenever a player explores
> > beyond what is currently generated.

>
> > Each block will be in effect an island, to avoid the trouble of having
> > to make each block match up with it's neighbour.

>
> > The game doesn't have a name yet, but it is loosely based on the old
> > 1980's game "Empire" if you're familiar with that. Themapis fairly
> > key to the game so I'm not coding that until I am fairly happy with
> > themapalthough most of the ideas are already down on paper.

>
> > I'll post updates on here if there is any interest.

>
> Looks nice! Did you resolve your problems with the 'dead end' lakes? I
> would like it if you could post updates.- Hide quoted text -
>
> - Show quoted text -


I've not started working on rivers/lakes as yet but I do have some
ideas.

However, I've had a completely different idea about how to generate
maps that will work with my game design better as I want it to produce
islands, so I am going to explore that first to see how it turns out.

I'll update here when I've got something worth showing.


Reply With Quote
  #6 (permalink)  
Old 10-11-2007
Franko
 
Posts: n/a
Default Re: Random Map Progress

On 11 okt, 13:18, "skulkrinb...@googlemail.com"
<skulkrinb...@googlemail.com> wrote:
> On Oct 11, 12:05 pm, Franko <frankkoorns...@gmail.com> wrote:
>
>
>
>
>
> > On 11 okt, 08:11, "skulkrinb...@googlemail.com"

>
> > <skulkrinb...@googlemail.com> wrote:
> > > On Oct 10, 4:03 pm, Tyno Gendo <tyno.ge...@example.net> wrote:

>
> > > > skulkrinb...@googlemail.com wrote:
> > > > > I asked for some advice a few months back about how to generate a
> > > > > "random"mapfor a game I was writing. I got sidetracked but here is
> > > > > the latest version of it in case anyone is interested:

>
> > > > >http://www.ogreview.org/view_map.php

>
> > > > > It's going to need a lot of refirnement before it is going to be good
> > > > > enough to be useful of course.

>
> > > > Looks ok, seemed a little slow, but I don't know what it's doing in
> > > > the background :-)

>
> > > > What game are you writing?

>
> > > It is a bit slow but that's not a problem as it will be a turn-based
> > > game where themapwill be generated in a way that the players wont
> > > notice, I intend generating maps in 100 x 100 (for example) sized
> > > blocks and then generating a new block whenever a player explores
> > > beyond what is currently generated.

>
> > > Each block will be in effect an island, to avoid the trouble of having
> > > to make each block match up with it's neighbour.

>
> > > The game doesn't have a name yet, but it is loosely based on the old
> > > 1980's game "Empire" if you're familiar with that. Themapis fairly
> > > key to the game so I'm not coding that until I am fairly happy with
> > > themapalthough most of the ideas are already down on paper.

>
> > > I'll post updates on here if there is any interest.

>
> > Looks nice! Did you resolve your problems with the 'dead end' lakes? I
> > would like it if you could post updates.- Hide quoted text -

>
> > - Show quoted text -

>
> I've not started working on rivers/lakes as yet but I do have some
> ideas.
>
> However, I've had a completely different idea about how to generate
> maps that will work with my game design better as I want it to produce
> islands, so I am going to explore that first to see how it turns out.
>
> I'll update here when I've got something worth showing.- Tekst uit oorspronkelijk bericht niet weergeven -
>
> - Tekst uit oorspronkelijk bericht weergeven -


You could have a look at this http://www.idevgames.com/forum/archi...hp/t-5136.html

Looking at this I also had an idea which is a mix of some of the
others.
1. divide your main area in a number of sub areas (for example 9)
2. assign a random height to each sub area (independent of its
neighbours)
3. go to sub area 1 and divide this into a number of sub sub areas
(again, let's say 9)
4. for each sub sub area that is a neighbour of a sub area (for
instance sub area 2) you could do (height_sa1 + height_sa2) / 2 +
rand(-x, x)
5. repeat 4 for each sub sub area and go on to the next sub area

I haven't realy thought this trough but maybe it helps :)


Reply With Quote
  #7 (permalink)  
Old 11-02-2007
skulkrinbait@googlemail.com
 
Posts: n/a
Default Re: Random Map Progress

If anyone is interested, this is the latest version of the prototype:

http://www.ogreview.org/map/map_viewer.php

There's still a lot of work to do, rivers are not showing up correctly
for example and the coastlines are too straight as well.

I will add a legend at some stage but in essence sea is blue,
mountains grey, hills brown and plains yellow. Sometimes the rivers
show up OK, other times you get a missing image placeholder.

Once I get rivers/lakes working I will add forests and cities.

Thanks!

Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 09:17 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0