Jump to content


Photo

Tiles In 3d?


  • Please log in to reply
9 replies to this topic

#1 Alvare

Alvare

    Allrounder

  • GMC Member
  • 1347 posts
  • Version:GM:Studio

Posted 17 December 2009 - 07:24 PM

Hello,
It's me again.
I know tiles in the room editor can't work with 3D.
But why?
And aren't there any methods so that i can make stone or sand path floor objects overlap eachother without causing any z-buffer problems.
I'd like to know.
  • 0

#2 link3000

link3000

    Link3000

  • GMC Member
  • 1130 posts
  • Version:GM8

Posted 17 December 2009 - 08:01 PM

give them different z values by a slight amount, like .05 or something else in proportion to your current dimensions.
  • 0

#3 frankpiet

frankpiet

    ^destroyed evil chicken^

  • New Member
  • 760 posts

Posted 17 December 2009 - 09:48 PM

It is possible.

http://gmc.yoyogames...howtopic=397571

I cant remember why you need to do it via gml, it was posted a while back.
  • 0

#4 Alvare

Alvare

    Allrounder

  • GMC Member
  • 1347 posts
  • Version:GM:Studio

Posted 18 December 2009 - 07:18 AM

give them different z values by a slight amount, like .05 or something else in proportion to your current dimensions.

I know.
But that will be noticable in the end.

It is possible.

http://gmc.yoyogames...howtopic=397571

I cant remember why you need to do it via gml, it was posted a while back.

I'll have a look at it.
Thanks.

EDIT -
I've checked the file.
And it's total chaos.
Un use able. :)

Edited by THE_GAME_EDITOR, 18 December 2009 - 10:52 AM.

  • 0

#5 link3000

link3000

    Link3000

  • GMC Member
  • 1130 posts
  • Version:GM8

Posted 18 December 2009 - 11:16 AM

I don't think so.. It seems they just used objects to define where they want everything, and then they translated those into tiles. Each tile then draws itself if it is close to the camera.
  • 0

#6 Alvare

Alvare

    Allrounder

  • GMC Member
  • 1347 posts
  • Version:GM:Studio

Posted 18 December 2009 - 12:08 PM

I don't think so.. It seems they just used objects to define where they want everything, and then they translated those into tiles. Each tile then draws itself if it is close to the camera.

I know that.
But i was talking about the codes and scripts.
There are just so many of them. (With many comments and stuff.)
And I can't pick out the right ones without getting errors.
Even when i start the their tile engine.. the car seems to go mad.
That's what i ment with 'un use able'

EDIT -
Hehehe.
I found out the physics only go mad on the school computers.
No suprise at all.

Anyway.. i found something i'm not happy with.
map = ds_map_create();
ds_map_add( map, sm_road_ul, bkg_road_ul);
ds_map_add( map, sm_road_dl, bkg_road_dl);
ds_map_add( map, sm_road_dr, bkg_road_dr);
ds_map_add( map, sm_road_ur, bkg_road_ur);
ds_map_add( map, sm_road_h, bkg_road_h);
ds_map_add( map, sm_road_v, bkg_road_v);
ds_map_add( map, sm_tiles, bkg_tiles);
ds_map_add( map, sm_crossing_l, bkg_crossing_l);
ds_map_add( map, sm_crossing_d, bkg_crossing_d);
ds_map_add( map, sm_crossing_h, bkg_crossing_h);
ds_map_add( map, sm_crossing_u, bkg_crossing_u);
ds_map_add( map, sm_intersection, bkg_intersection);
ds_map_add( map, sm_threeway_u, bkg_threeway_u);
ds_map_add( map, sm_threeway_d, bkg_threeway_d);
ds_map_add( map, sm_threeway_l, bkg_threeway_l);
ds_map_add( map, sm_threeway_r, bkg_threeway_r);
ds_map_add( map, sm_big_turn_ul, bkg_big_turn_ul);
ds_map_add( map, sm_big_turn_dl, bkg_big_turn_dl);
ds_map_add( map, sm_big_turn_dr, bkg_big_turn_dr);
ds_map_add( map, sm_big_turn_ur, bkg_big_turn_ur);
ds_map_add( map, sm_grass, bkg_grass);
ds_map_add( map, sm_normal_h, bkg_normal_h);
ds_map_add( map, sm_normal_v, bkg_normal_v);
ds_map_add( map, sm_cracked_h, bkg_cracked_h);
ds_map_add( map, sm_cracked_v, bkg_cracked_v);
ds_map_add( map, sm_water, bkg_water);
In the room editor of their engine all the tiles and objects are smaller than they really are (ingame).
So they replaced the small ones with the big ones.
But the problem is that i wan't the ingame tiles to have the same size as in the room editor.
And when i remove those lines i get an error. And it will look messed up in the engine.

Edited by THE_GAME_EDITOR, 18 December 2009 - 12:11 PM.

  • 0

#7 frankpiet

frankpiet

    ^destroyed evil chicken^

  • New Member
  • 760 posts

Posted 18 December 2009 - 11:31 PM

you should be able to make a system using ds grids/maps/lists to do this.

Otherwise, you could make a background of the tiles(in 2d) and draw that(in 3d)

there is another example somewhere, ive just forgotten where it is!
  • 0

#8 Alvare

Alvare

    Allrounder

  • GMC Member
  • 1347 posts
  • Version:GM:Studio

Posted 19 December 2009 - 11:30 AM

you should be able to make a system using ds grids/maps/lists to do this.

Otherwise, you could make a background of the tiles(in 2d) and draw that(in 3d)

there is another example somewhere, ive just forgotten where it is!

Hmm... too bad. :whistle:

Otherwise, you could make a background of the tiles(in 2d) and draw that(in 3d)

Do you know how to do that?

give them different z values by a slight amount, like .05 or something else in proportion to your current dimensions.

I think this is the most simple thing to solve this.
But this idea is feasible.

Should i try this with if place_meeting(x,y, ?
Or different?

EDIT -
I found out d3d_set_hidden solves z-buffer problems too. :GM070:
But it would be so nice to have tiles instead of objects.
It's much more optimized and them i'm be able to draw the sand and stone paths in the far distance.

Edited by THE_GAME_EDITOR, 19 December 2009 - 12:52 PM.

  • 0

#9 Boreal

Boreal

    C++ Wackjob

  • GMC Member
  • 417 posts
  • Version:None

Posted 19 December 2009 - 12:55 PM

Make a game with no objects or code whatsoever, put the tiles in and save a screenshot. Voila, you have your texture.
Be sure to make it a square texture with sides of a power of 2 or it will not show up correctly on many computers.
  • 0

#10 Alvare

Alvare

    Allrounder

  • GMC Member
  • 1347 posts
  • Version:GM:Studio

Posted 19 December 2009 - 02:00 PM

Make a game with no objects or code whatsoever, put the tiles in and save a screenshot. Voila, you have your texture.
Be sure to make it a square texture with sides of a power of 2 or it will not show up correctly on many computers.

Lol.. pretty good idea you have there. :whistle:
I will try that.

EDIT -
I couldn't do that because the room had an awful size.
But nice idea anyway.

I did try'd to draw all the sand paths with an array.

Edited by THE_GAME_EDITOR, 06 January 2010 - 12:04 PM.

  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users