Wasn't sure as to where to post this: General - Gather information or Projects - Start then gather information.
Long story short. My grandkids have developed an interest in Super Mario Brothers and have hinted at me to make them a game... 'They' think I can do anything... *sigh*
First: Does anyone here actually know how to code a game like this?
There are a couple of 'schools of thinking' when it comes to the mechanics. Pixel perfect side scroll or Tile-based side scroll (add more if you know any) I know how to side scroll star-fields and multi-layered parallax scrolling. But 'Mario Style' - Tiled - not so much...
Out of my depth on this one and could do with some advice...
Pointing to docs, vids and tuts would also be handy.
I am not asking for anyone to code it for me, after all, how much could I learn if I permitted anyone to do that? lol
Hey Johnno, I have been meaning to make a tutorial on this all year. Where has the time gone? I am recording a video on this right now. I will post a link once I upload it.
I'm downloading it and will watch it when it's done.
It's amazing. It used to take me an hour to download 3 MP3 songs on a 14.4 modem and now I can download this 141mb video in less that 3 minutes... Actually. It finished downloading before I finished this post... Man. Blink and miss it....
Time to fire up the coffee machine and the video player.
Many thanks for all your effort. I am sure that this video will be fundamental to my project. Thank you.
I'm about 25 minutes into the video and have successfully displayed the two tiles... This is REALLY easy to follow - even for me... lol
First: WINDOW_CENTERED is brilliant. I have never used it before. I will add this one to my "bas" template!!
Second: I had to add a 'clearcanvas' before displaying the tiles. I noticed that your listing did not have it and your display was fine. Without clearcanvas, the tiles display as they should, but the rest of the canvas is filled with what I call screen artefacts. Bits of the existing screen sliced up and filling the canvas. It's not a drama. Just an observation. Clearing the canvas before displaying fixes it for me. I will try to attach an image...
I'm taking a break... It's 0733 and the temperature out side is already 21C. We are expecting a nice mild 35C. Normally it's nice... but I have to use my push bike to grab a coffee at our local McDonalds (advertising was not intended...) and I would prefer to go this morning while I can... lol
Oh yes... The image...
But, as I mentioned earlier, 'clearcanvas' solved that issue...
All finished! Apart from my usual typos the tutorial produced a very smooth scroll... Very cool...
You mentioned 'tile sheets'.... I am going to assume that trying to import and interpret a 'tmx' file using RC would be a frightful nightmare... and wanting to avoid copious amounts of "if...then"'s, knowing how to "read" or "import" sections of sprite sheets would be good to know....
If you haven't already made a video, don't rush on my account, as I will have plenty of thinking and experimenting to do with what you have provided so far... lol But, a video in the future, would be nice...
By the way... I had no problem following your video... at one point, at least, you had a 'loss of thought' event... but, for me, that was perfectly normal... lol
I am glad you were able to follow it. I will try to get a part 2 up this week to go over tilesheets. That is actually alot easier than the math for scrolling. I was just trying to give you the starts of a super mario game.
The tmx format is actually not a 'frightful nightmare'. Its xml so it has to be parsed but there are a few tmx loading routines written in other languages that can probably be converted to RC or SDL to save some time. The only thing you need is to get the data from the tmx file into your map[] array.
Using you tutorial, I have started recreating a non-interactive level of SMB, which is 224 x 14 tiles. The map only contains two rows (12 and 13) of ground tiles at the moment. So far the movement is very smooth. However this may change as I add other pieces of the scenery... I will send you a sample when I add more stuff. This could take a while... Potentially looking at over 3,000 tiles for the level... *gulp*