6 Replies - 666 Views - Last Post: 19 June 2013 - 07:42 AM

#1 gashking  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 18-June 13

Hey anyone able to help?

Posted 18 June 2013 - 12:19 AM

Hey guys new to the forum as well as coding altogether.. been doing it for a few weeks now really enjoying it but its a lot to get your head around... some days i'll be stuck doing the same thing for hours and hours...

Well anyway.. I'm trying to work out the basics of a tile based map, past few days i've been using Tiled map editor but eveeery single tutorial/loader i've used to get the map into XNA is a pain in the ass and doesnt work.. I had this idea of just using 2-3 'images' as layers of a huge map, place a grid and code my game over the top of it, would this work?

protected override void Draw(GameTime gameTime)
        {
            graphics.GraphicsDevice.Clear(Color.CornflowerBlue);

            spriteBatch.Begin();

            mSprite.Draw(this.spriteBatch);
            mSpritetwo.Draw(this.spriteBatch);

            spriteBatch.End();



can anyone give me a hand at figuring out how to add in layer depths? i can't work out all the guides i find on google..

Is This A Good Question/Topic? 0
  • +

Replies To: Hey anyone able to help?

#2 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 8937
  • View blog
  • Posts: 33,473
  • Joined: 12-June 08

Re: Hey anyone able to help?

Posted 18 June 2013 - 06:47 AM

Quote

past few days i've been using Tiled map editor but eveeery single tutorial/loader i've used to get the map into XNA is a pain in the ass and doesnt work..

Doesn't work.. how?

Quote

I had this idea of just using 2-3 'images' as layers of a huge map, place a grid and code my game over the top of it, would this work?

Sure.. stacking semi transparent layers works pretty well.

How about working with an array.. a number array. Each number corresponds to a tile you want drawn. The worst it will be is in the draw you use two for loops to go through all the rows and columns and draw the tile the number corresponds to.

When you get that working think about using an array of objects - from a custom class you will write - that holds multiple values to draw.

Quote

can anyone give me a hand at figuring out how to add in layer depths?

What do you mean?


Quote

i can't work out all the guides i find on google..

Explain this. I don't know if it is your "new to [...] coding altogether" or something else.
Was This Post Helpful? 1
  • +
  • -

#3 gashking  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 18-June 13

Re: Hey anyone able to help?

Posted 18 June 2013 - 06:47 PM

Sorry about not being clear in the previous post i was somewhat half asleep...
Yeah i'll try the array out thanks for that tip.

I'm new to coding altogether haha.. roughly 3-4 months experience,
I'm basically trying to make a game like this.. www.tibia.com
any ideas on how they set up the tiles?

obviously not trying to get to that stage of development, just want to make a very basic version of it for self experience...

by layer depth i meant have several layers of the map eg background and then another layer over the top of the character eg like behind trees or walls..

Thank you for replying to my thread also.. 44 views and only one reply :(
Was This Post Helpful? 0
  • +
  • -

#4 oyyou  Icon User is offline

  • D.I.C Head

Reputation: 27
  • View blog
  • Posts: 182
  • Joined: 26-April 10

Re: Hey anyone able to help?

Posted 19 June 2013 - 01:12 AM

Hey man, I think with the little amount of experience you have, what you're going for might be bit of a reach.
There are sooo many different things you need to understand about programming before you can get close to anything like that.

I have a Tutorial that could give a basic understand of 2D arrays for a tile map (This isn't the best way, but it's a start).

There is also this Tile Engine Tutorial Series that you can look at. It's a bit iffy, since you'll be using a newer version of XNA, but if you sit through it (And try doing it yourself) you will definitely learn something.
Was This Post Helpful? 0
  • +
  • -

#5 BBeck  Icon User is online

  • Here to help.
  • member icon


Reputation: 560
  • View blog
  • Posts: 1,260
  • Joined: 24-April 12

Re: Hey anyone able to help?

Posted 19 June 2013 - 03:26 AM

You might read my rather long winded explanation of tile arrays under last week's post of "Tile Collision". I think its somewhat similar to what you are talking about.
Was This Post Helpful? 0
  • +
  • -

#6 oyyou  Icon User is offline

  • D.I.C Head

Reputation: 27
  • View blog
  • Posts: 182
  • Joined: 26-April 10

Re: Hey anyone able to help?

Posted 19 June 2013 - 04:40 AM

And for a long, detailed explanation, you could go through this.
I usually get to part 4/31 before I give up.. But it teaches a lot of good things in there as well as the tile junk.
Was This Post Helpful? 0
  • +
  • -

#7 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 8937
  • View blog
  • Posts: 33,473
  • Joined: 12-June 08

Re: Hey anyone able to help?

Posted 19 June 2013 - 07:42 AM

Quote

I'm new to coding altogether haha.. roughly 3-4 months experience,
I'm basically trying to make a game like this.. www.tibia.com
any ideas on how they set up the tiles?

obviously not trying to get to that stage of development, just want to make a very basic version of it for self experience...

by layer depth i meant have several layers of the map eg background and then another layer over the top of the character eg like behind trees or walls..

Sure.. but again - start with making a single tile game. Can you do that? Let's see you do that first then we can worry about depth of tiles, transparency, etc.


Quote

Thank you for replying to my thread also.. 44 views and only one reply :(

It's not like folks haven't heard the "I just started programming, but want to make a clone of XXXX MMORPG game!" thread a few thousand times.. expecially one peppered with half-asleep questions. ;)
Was This Post Helpful? 1
  • +
  • -

Page 1 of 1