[gameprogrammer] Re: How to have hills in a tiled game
- From: Olof Bjarnason <olof.bjarnason@xxxxxxxxx>
- To: gameprogrammer@xxxxxxxxxxxxx
- Date: Tue, 7 Feb 2006 10:37:43 +0100
good ideas!
if I may give you a humble bit of advice, go for *one* of them in this
project. you've got a lifetime to explore the others. in my
experience, trying to include several new ideas in a project is asking
for trouble :) also, if you choose just one idea, you have a fair bit
of chance actually finishing your project before you get tired of it
/Olof
On 2/7/06, Alan Wolfe <alan.wolfe@xxxxxxxxx> wrote:
> Thanks for the answers Kevin and Olof.
>
> Awesome answers both
>
> In my game, you can have 65535 tile deffinitions (each having something like
> 20 flags/data members you can mess with), and then in the maps themselves
> you just refer to the tile as "tile 208" or "tile 47".
>
> I'm thinking maybe of having it where you can define a line somehow, and
> have that line be the dividing line of the tile, with solid being on one
> side, and empty being on the other.
>
> Then, when a collision w/ a tile is detected, it could check in greater
> detail (one function used througout the entire program!) to see if the
> collision actualy happened or not.
>
> Maybe instead of being able to define a line, it could use some kind of map
> of it's own like having an 8x8 "bitmap" describing the solid and empty parts
> of the time.
>
> Maybe have support for both bitmap and line style detail.
>
> hmmm...
>
> well thanks guys, you've helped me alot (:
>
>
>
> On 2/6/06, Olof Bjarnason <olof.bjarnason@xxxxxxxxx> wrote:
> > On 2/7/06, Olof Bjarnason <olof.bjarnason@xxxxxxxxx> wrote:
> > > you could have a "type" specifier for each tile too, instead of
> > > increasing the granularity.
> > >
> > > type meaning
> > > 0 empty
> > > 1 solid
> > > 2 45 deg slant uphill right /|
> > > 3 45 deg slant uphill left |\
> > > ( 4 45 deg roof slant right \| )
> > > ( 5 45 deg roof slant left |/ )
> > >
> > > .. where 4 and 5 are quite optional.
> > >
> > > Then, to handle collision detection with the background in the game,
> > > build a function
> > >
> > > bool IsSolid(int wx, int wy) {
> > > }
> > >
> > > .. which answers the question "Is the pixel located at
> > > world-pixel-coordinate system coordinate (wx,wy) solid?"
> > >
> > > That question is easy to answer for solid / empty tile types, but just
> > > slightly trickier for the other types. Just keep in mind that the ONLY
> > > way to do collision detection in the game should be via this function,
> > > other the wholy system breaks down.
> > sorry for typo here, I mean "otherwise the whole system breaks down."
> > >
> > > /Olof
> > >
> > > On 2/7/06, Kevin Jenkins < gameprogrammer@xxxxxxxxxx> wrote:
> > > > Increase your granularity. You'll have large blocks of unused data
> but
> > > > that always happens anyway. You should build your map from larger
> > > > building blocks that are instanced to save memory.
> > > >
> > > > Alan Wolfe wrote:
> > > >
> > > > > Hey guys,
> > > > >
> > > > > I'm making a 2d sidescroller and the maps are just tiled in the
> normal
> > > > > fashion like...
> > > > >
> > > > > 1 1 1 1 1 1 1
> > > > > 1 0 0 0 0 0 0
> > > > > 1 0 0 0 0 0 0
> > > > > 1 0 0 0 1 0 0
> > > > > 1 1 1 1 1 1 1
> > > > >
> > > > > where each number has attributes (like if it's solid or not) as well
> as art.
> > > > >
> > > > > This makes for really rectangular map though.
> > > > >
> > > > > Does anyone know how to make hills and slopes in a 2d sidescroller?
> like
> > > > > the techniques generaly used for that, something like how mario 3
> > > > > worked, or just being able to have 45 degree slants would be better
> than
> > > > > nothing.
> > > > >
> > > > > thanks a bunch!
> > > >
> > > >
> > > > ---------------------
> > > > To unsubscribe go to
> http://gameprogrammer.com/mailinglist.html
> > > >
> > > >
> > > >
> > >
> >
> >
> > ---------------------
> > To unsubscribe go to
> http://gameprogrammer.com/mailinglist.html
> >
> >
> >
>
>
---------------------
To unsubscribe go to http://gameprogrammer.com/mailinglist.html
- Follow-Ups:
- [gameprogrammer] Re: How to have hills in a tiled game
- From: Alan Wolfe
- References:
- [gameprogrammer] How to have hills in a tiled game
- From: Alan Wolfe
- [gameprogrammer] Re: How to have hills in a tiled game
- From: Kevin Jenkins
- [gameprogrammer] Re: How to have hills in a tiled game
- From: Olof Bjarnason
- [gameprogrammer] Re: How to have hills in a tiled game
- From: Olof Bjarnason
- [gameprogrammer] Re: How to have hills in a tiled game
- From: Alan Wolfe
Other related posts:
- » [gameprogrammer] How to have hills in a tiled game
- » [gameprogrammer] Re: How to have hills in a tiled game
- » [gameprogrammer] Re: How to have hills in a tiled game
- » [gameprogrammer] Re: How to have hills in a tiled game
- » [gameprogrammer] Re: How to have hills in a tiled game
- » [gameprogrammer] Re: How to have hills in a tiled game
- » [gameprogrammer] Re: How to have hills in a tiled game
- [gameprogrammer] Re: How to have hills in a tiled game
- From: Alan Wolfe
- [gameprogrammer] How to have hills in a tiled game
- From: Alan Wolfe
- [gameprogrammer] Re: How to have hills in a tiled game
- From: Kevin Jenkins
- [gameprogrammer] Re: How to have hills in a tiled game
- From: Olof Bjarnason
- [gameprogrammer] Re: How to have hills in a tiled game
- From: Olof Bjarnason
- [gameprogrammer] Re: How to have hills in a tiled game
- From: Alan Wolfe