Page 1 of 5

Tile-based tutorials

Posted: Fri Dec 17, 2010 1:34 am
by kikito
I've started writing a new tile-based tutorial. I'm concentrating on having the code done first.

The tutorial will be divided in 'lessons'. At the end, we'll have an RPG-like character moving around through a medium-sized map with collisions and scrolling.

Code is on github: https://github.com/kikito/love-tile-tutorial

And I've arrived to a decision point. I'd like to pick your brain in order to decide.

The thing is that I feel that the code would be cleaner if I just used middleclass. You know, creating a Map class, a Tile class, etc. But then it would not be a LÖVE-only tutorial.

Would it be OK for everyone if I used middleclass on it?

Give your reasons below, or just vote. Thanks!

Re: Tile-based tutorials

Posted: Fri Dec 17, 2010 1:57 am
by TechnoCat
I would advocate OO for any tutorial. OO just makes things easier, and tutorials need easy things.

Re: Tile-based tutorials

Posted: Fri Dec 17, 2010 2:12 am
by Ryne
kikito wrote:I've started writing a new tile-based tutorial. I'm concentrating on having the code done first.

Would it be OK for everyone if I used middleclass on it?

Give your reasons below, or just vote. Thanks!
I think that it would be better for obvious reasons if you DID use middleclass. I haven't used midleclass myself (since it looks complicated, and I'm a noob), but unless the tutorial includes a guide on how to use middleclass, and how it works in depth, then I think it wouldn't be a good idea. That is of course if you want the tutorial to be noob-friendly.

It's up to you though I guess, and I'm glad to hear you're writing the tutorial. I think that a lot of people that want to use love will use it for platformer's, so a well explained tile tutorial would be great.

That being said, if you would like me to draw up some graphics to be used to aid the tutorial I would be happy to.

Re: Tile-based tutorials

Posted: Fri Dec 17, 2010 4:46 am
by icesoldier
Having not used middleclass, but coming from other OO languages, I'd say go ahead with using middleclass, but (like Ryne said) only if you go into how the library works. I'd love to see the tutorial in any case, as JRPGs are my forte.

Re: Tile-based tutorials

Posted: Fri Dec 17, 2010 5:04 am
by TechnoCat
icesoldier wrote:I'd say go ahead with using middleclass, but (like Ryne said) only if you go into how the library works.
I say go ahead only if you go into how to USE the library. People shouldn't care if it was magic or kittens in MiddleClass.lua. (By the way, it is kittens)

Re: Tile-based tutorials

Posted: Fri Dec 17, 2010 6:14 am
by Robin
TechnoCat wrote:
icesoldier wrote:I'd say go ahead with using middleclass, but (like Ryne said) only if you go into how the library works.
I say go ahead only if you go into how to USE the library. People shouldn't care if it was magic or kittens in MiddleClass.lua.
Aye. Explain MiddleClass, but not its deep, voodoo innards. If people want to know, they can venture there themselves if they are brave enough.

Re: Tile-based tutorials

Posted: Fri Dec 17, 2010 3:38 pm
by tentus
Make a big old link to a second tutorial getting into the how and what of middleclass. That way you don't have to interrupt the flow of your tutorial except to cover basic information, but people can still learn what's really going on.

Re: Tile-based tutorials

Posted: Fri Dec 17, 2010 4:08 pm
by Ryne
Robin wrote:
TechnoCat wrote:
icesoldier wrote:I'd say go ahead with using middleclass, but (like Ryne said) only if you go into how the library works.
I say go ahead only if you go into how to USE the library. People shouldn't care if it was magic or kittens in MiddleClass.lua.
Aye. Explain MiddleClass, but not its deep, voodoo innards. If people want to know, they can venture there themselves if they are brave enough.
I think it should depend on WHO the tutorial is meant for. If it's meant for noobs, then it shouldn't contain middleclass. Picture it like this:

1. I'm new to the love forums and want to learn to make a tile based map.
2. Oh SHIT! a tutorial!? SO AWESOME!!!
3. Wait.. wtf is middleclass?
4. Oh crap, now I'm intimidated because I have no programming background and now theres this extra stuff.

When kikito first mentioned creating a tutorial he said this:
kikito wrote:The tile scrolling tutorial isn't really good. It isn't easy enough to be a good tutorial and it isn't flexible enough to be a good building base.

I must create a better one. Soon.
So why make it harder if the original intention was to make an easy to understand and flexible building base?

Re: Tile-based tutorials

Posted: Fri Dec 17, 2010 5:38 pm
by kikito
Ryne wrote:So why make it harder if the original intention was to make an easy to understand and flexible building base?
That is a very good point.

I suspect I will face a trade-off situation sooner or later. I will have to decide between making it "easier to understand", or "easier to extend".

Since it's a tutorial, and not a library, probably "easier to understand" is more important.

I'll try to advance as much as possible without using middleclass, instead of using it from the beginning.

(That said, you particularly would benefit from using it :P)

Thanks for your input.

Re: Tile-based tutorials

Posted: Fri Dec 17, 2010 5:40 pm
by ShadowProtocol
The problem with ALL video game programming tutorials on the web are that they ALL go over the same shit. Without trying hard, I can find another tile map tutorial on the web and have a character moving around it no problem.

What NO tutorial ever does is go to step 2, being how to get to some point on the map, and have you move on to a second map.
Games handle this in different ways:

In some games, you get to a point on the right side of the map, and immediately after you are on the left side of a new map.

In other games, like pokemon, you stay on that side of the map and a new area of a map is visible. You never actually warp to the other side of a new map, it just continues to load in new areas seamlessly.

If you are going to benefit the Love community, PLEASE PLEASE explain how to do this area transfer and area loading technique. It is NOT an easy thing to find, and I'd love you for it forever. I'd LOVE you for it forever.