🔒 Locked
Loading from a file...
Advertisement
Original Post
Hey,
I was wondering, are there any good tutorials or does anyone have any good tips on how to load levels from a file. I don''t want the actual code itself, just to be pointed in the right direction, so I can learn it myself.
Thanks
I have read those tutorials, like number 10, but they deal with a fps environment, and the game I am currently developing is more of an isometric/3d view. I was wondering if there is a more specific tutorials on the type of game I have.
t''is all the same princlple really, just a different way of presenting the data on screen
Ok, I''ll go study tut 10 again...
You know, I still think that''s kind of complicated. Since my game is simple, couldn''t I just do something like:
(.txt file)
1111111111111
1000000000001
2000000000111
2000000000001
1000000000001
1111111111111
(in code)
if(n==1)
{
drawCement();
}
if(n==2)
{
drawWood();
}
else if(n==0)
{
drawFloor();
}
Would something like that work?
(.txt file)
1111111111111
1000000000001
2000000000111
2000000000001
1000000000001
1111111111111
(in code)
if(n==1)
{
drawCement();
}
if(n==2)
{
drawWood();
}
else if(n==0)
{
drawFloor();
}
Would something like that work?
You''ve discovered tilemapping. Now run with it =)
You''ll find as you try out techniques like this it''ll slowly start to evolve on you (been experiencing this a lot myself). Best way to learn is to try out all your ideas, see what works and what doesn''t, what can be done better, what you should avoid like the plague.
Try that idea, tweak it to your needs, tear it all down if you need to. You''ll gain much more skill working with these things instead of hanging around here =)
You''ll find as you try out techniques like this it''ll slowly start to evolve on you (been experiencing this a lot myself). Best way to learn is to try out all your ideas, see what works and what doesn''t, what can be done better, what you should avoid like the plague.
Try that idea, tweak it to your needs, tear it all down if you need to. You''ll gain much more skill working with these things instead of hanging around here =)
quote:
Original post by PepsiPlease
You know, I still think that''s kind of complicated. Since my game is simple, couldn''t I just do something like:
(.txt file)
1111111111111
1000000000001
2000000000111
2000000000001
1000000000001
1111111111111
(in code)
if(n==1)
{
drawCement();
}
if(n==2)
{
drawWood();
}
else if(n==0)
{
drawFloor();
}
Would something like that work?
yes, in fact this is how the tutorial tells you to do it..
see http://www.gamedev.net/reference/articles/article1256.asp
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement