Gold Hunter - [WIP] - Printable Version
+- iDevGames Forums (http://www.idevgames.com/forums)
+-- Forum: Community Zone (/forum-4.html)
+--- Forum: Work in Progress (/forum-16.html)
+--- Thread: Gold Hunter - [WIP] (/thread-10777.html)
Gold Hunter - [WIP] - EvolPenguin - Oct 25, 2013 11:13 PM
Figured I'd keep a mini blog going on a project I'm working on to do a game inspired by Lode Runner: The Legend Returns (later, Lode Runner Online). I really liked the no direct-combat style of Lode Runner for running around a level and gathering loot, and I'd like to bring a faster level of twitch gameplay to the old school mechanics, as well as a smaller field of view (rather than exposing the entire map to the player) and maybe play around with ideas of lighting/physics to the game. As you can probably tell, I've played a decent amount of the new Spelunky lately, and it's inspired me to make a similar game.
I'll repost blog posts here as well!
My first step this week was to mess around with a random level generator. I'm using SpriteKit (technically a KoboldKit wrapper around it, not sure what advantages KoboldKit has for me just yet. Link for the lazy).
I started with Big Bad Waffle's random cave generator, because it required 0 prep work. I just implemented it in Objective-C (using Objective-C NSMutableArrays, probably not the best for performance reasons so that will probably switch to pure C later). It created some pretty good (importantly: re-producible) results based on a seed value I initially drew it using SKSpriteNodes of different colors, but then figured I'd steal the ever-useful Cute sprites available to make a quick map and off it went! I did a little shift in the y direction to make the ground appear a little bit lower just for fun visual effect.
Here are some examples:
Note: Images used are just for a more interesting rendering of the map, not a decision on style.
I've also been reading into how Spelunky does their code generation and it's pretty interesting. Apparently a simple variety of the Drunken Walk algorithm (or something along those lines). More details here from a guy who ported Spelunky to the web and posted his findings. It's great to create a guaranteed procedural path to an exit. It required a little more setup as you need "rooms" with exits on different sides (and a decent assortment of them as well) in order to get going, but it looks pretty simple and I might give it a try later!
Next up: Making a player able to walk around and blow up walls! Still deciding on top-down, angle, or side view for this game.
RE: Gold Hunter - [WIP] - EvolPenguin - Oct 26, 2013 12:33 PM
Just a quick update here. Added a player to move around the map (he can move sideways and 1 block up as necessary), and he can shoot the ground either down-left or down-right. No fancy animations or anything yet, just playing around with it in my random cave generator. It already brought back memories of planing out how far you’d have to dig out to get to another space in Lode Runner. Although no threats yet to make it interesting. That might be my next plan, is to at least maybe have some random patrolling creatures or two.
I also discovered that you can’t update the image of a SpriteNode in SpriteKit on the fly, you have to remove it and add a new one. I believe you can apply animations to cycle through images and such, but simply changing the image doesn’t work. You can change the Texture Atlas and coordinates though I think, but I haven’t yet set those up.
First Movement Demo
RE: Gold Hunter - [WIP] - EvolPenguin - Oct 28, 2013 09:39 AM
My first physics bodies didn't go so well and led to this reaction:
Still finalizing the feel of the player that I want. I kind of liked the original LodeRunner totally non-physicy falling straight down as it made you plan your falls a little more that you couldn't control in-air. Maybe just remove any in-air impulse control, but we'll see if that's any fun.
RE: Gold Hunter - [WIP] - SethWillits - Oct 29, 2013 01:15 PM
RE: Gold Hunter - [WIP] - GoodDoug - Oct 30, 2013 08:20 AM
That's awesome. I can't wait to see how it goes for you.
RE: Gold Hunter - [WIP] - EvolPenguin - Nov 5, 2013 10:12 AM
Snakes and Ladders, or more just ladders
Spent some time working on ladders! They're procedurally generated from a seed the same as the level is (and obviously need some tweaking). I'm still working on some of the physics of them. SpriteKit is really nice about setting the category, collision and contact bit masks (which call a delegate method), so it was easy to determine when a player was contacting a ladder.
I was hoping to simply set the player's physics body's
Edit: Just a note, I got rid of some of my visually appealing tweaks to the images I was working (so they would overlap etc) to simplify the physics and such for now. Also the red square was leftover from debugging the player's location.
Chris recommended I lower the smoothness, and it does lead to more interesting caves now that I have ladders available.