Jump to content


Photo

Making Floor Tiles


  • Please log in to reply
9 replies to this topic

#1 tlwll

tlwll

    GMC Member

  • New Member
  • 40 posts

Posted 02 March 2006 - 12:17 PM

In the FPS tutorial availible on this site, there is one continuous floor stretching as far as the room goes. I am wondering how one can get rid of the floor and be able to make separate, floor tiles.

Edited by tlwll, 02 March 2006 - 12:29 PM.

  • 0

#2 ragarnak

ragarnak

    GMC Member

  • GMC Elder
  • 19468 posts
  • Version:GM8

Posted 02 March 2006 - 12:28 PM

In the FPS tutorial on this site, there is one continuous floor. I am wondering how one can get rid of the floor and be able to make separate floor tiles.

<{POST_SNAPBACK}>

Simple answer ? Use floor-part objects (much like walls, but using "d3d_draw_floor(...)" to draw them). :P

Do not try to use tiles as you do in 2D games. It won't work as neat as you expect it to do :

  • When you use the 3D functionality, there are a number of other things that can no longer be used.
  • ....
  • You cannot use tiles anymore. Tiles will most likely no longer match up correctly.

And yes, using a lot of them will slow-down your game. :D :wacko:

Hope that helps.
  • 0

#3 tlwll

tlwll

    GMC Member

  • New Member
  • 40 posts

Posted 02 March 2006 - 12:29 PM

thank you. I will try that!
  • 0

#4 tlwll

tlwll

    GMC Member

  • New Member
  • 40 posts

Posted 02 March 2006 - 12:31 PM

Wait. Do I put the texture where it has the (...)?
  • 0

#5 tlwll

tlwll

    GMC Member

  • New Member
  • 40 posts

Posted 02 March 2006 - 01:00 PM

I tried it, but it didn't work! :P
  • 0

#6 ragarnak

ragarnak

    GMC Member

  • GMC Elder
  • 19468 posts
  • Version:GM8

Posted 02 March 2006 - 01:04 PM

Wait. Do I put the texture where it has the (...)?

<{POST_SNAPBACK}>

That "d3d_draw_floor(...)" is a reference to a GML-comand, and I expect you to open-up GM's help and read all about it :P

Hint : compare the "d3d_draw_wall(...)" with the "d3d_draw_floor(...)" command.

Hope that helps.
  • 0

#7 ragarnak

ragarnak

    GMC Member

  • GMC Elder
  • 19468 posts
  • Version:GM8

Posted 02 March 2006 - 01:07 PM

I tried it, but it didn't work! :wacko:

<{POST_SNAPBACK}>

It does work.


If you think the above is not helpfull at all, why than do you think that an answer like "it does not work" is helpfull to me ?

Mind you : you expect me to give you a solution. How can I, when I do not even know what you did ? :P
  • 0

#8 Edootjuh

Edootjuh

    GMC Member

  • New Member
  • 26 posts

Posted 02 March 2006 - 01:23 PM

Just make an object (obj_floortile)
With in Create event:
z=0
In it's draw event:
d3d_draw_floor(x,y,z,x+32,y+32,z,background_get_texture(tex_floor),1,1)

  • 0

#9 ThatGamesGuy

ThatGamesGuy

    Videogame designer

  • GMC Elder
  • 4766 posts
  • Version:GM8.1

Posted 02 March 2006 - 01:23 PM

If you like, try the "Upward Sliding Doors" tutorial, found on this page. It uses tiles for floors (and ceilings) with code like this:

//draw floor
d3d_draw_floor(x-32,y+32,z,     x+32,y-32,z,        tex,1,1);

//ceiling too
d3d_draw_floor(x-32,y-32,z+128,     x+32,y+32,z+128,        obj_Wall.tex,1,1);
Hope that helps.
  • 0

#10 tlwll

tlwll

    GMC Member

  • New Member
  • 40 posts

Posted 02 March 2006 - 09:59 PM

I got it to work. Thank you.
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users