Tuesday Discount - Lifetime Access for $20!!!! - Click Here!

Get ready for some RPG style levels. Four new videos added to the Endless Worlds series!

Get ready for some RPG style levels. Four new videos added to the Endless Worlds series!
June 12, 2015 Justin

Get ready for some RPG style levels.

Four new videos added to the Endless Worlds series!

The fun continues! This time we’ll take our Frogger project and convert it to an RPG style game. This time level units (sections basically) will take up the screen width and height (instead of 50px tall rows like in Frogger), and as the character roams around in any direction, our Swift and Sprite Kit code will generate new level units as needed in N, S, E, W and NE, NW, SE, SW directions. Hint, we store the location of each unit in an CGPoint-based array and use that to check if a level unit already exists in that spot. If not, we make a new. Thus creating endless terrain on-the-fly. And via a bool variable we can either toggle on or off, whether or not previously generated, but unseen level units are removed from the world. If this option is turned on, then the character could walk past a section of the level and return to it later with an entirely new appearance.

Each unit can have it’s own physics properties, background images, and a random assortment of objects (for example, rocks, signs, trees might appear in the grassy level units, and lily pads or water plants might appear in the watery level units).

This project sets up countless possible apps. And if you want to see more, watch the free introduction video below…

Never lose your place.

Sign up for the newsletter to get a free CartoonSmart account and track your progress in every course.

I'm cool. Sign me up!




Know what an affiliate program is? You make money just by sharing links to our site! Win. Win.

Earn when you refer any buyer here! 30 day tracking. Commissions are 33%-50% and recur on subscription products!