It looks like you're new here. If you want to get involved, click one of these buttons!
Ages ago — as in the days when Codea didn’t even have a text function, I started coding a simple roguelike dungeon. But I got involved in other things and never went too far in my effort.
Recently, after allowing Codea to sit idle for a long time, I thought I would play around with the idea again, and a couple of day’s efforts produced this very simple version.
My goal was to use nothing but resources included with Codea, but to produce something both simple enough to pick up immediately and fun enough to generate hours of frustration.
The code is far from pretty at this point, and there’s still a fair list of to do items. But it seemed worth passing along at this point, even it it presses the limits of paste-in code
Apologies for the sheer number of globals and for for a Floor class that’s really carrying more weight than it should. Things will be cleaned up in future versions.
Comments
That’s all, folks.
The program digs out random rooms, then connects them with tunnels. On each level it leaves a treasure chest, a door to the next level, and two keys.
It populates each level with a couple of monsters which wanders aimlessly until the player is near.
To do:
This is so cool @Mark. I hope you don't mind but I'm going to try re-attaching it as a zip here so more people can get it easily
(To open it tap on the zip and then choose
Open in "Codea"
)Thanks, Simeon. I had honestly forgotten you could do that. I had another chance to knock it around today and am almost done. I’ll zip up a new version soon.
This one has an intro screen, multiple avatars, armor that can be purchased for gold, gems that blow up monsters, leveling up, more monsters, and bug fixes. After some testing and code refinement, I may compile this little beastie for the store.
@Mark before you do let me get you on the beta with the newly updated Xcode export (should be ready tonight or tomorrow night)
@Mark that’s great! Did something similar a while back but just focused on the navigation - didn’t progress it past a simple treasure hunt game for my daughter with a fixed map. Love how you’ve packaged up as a fully working game.
https://codea.io/talk/discussion/9197/simple-a-star-path-finding-for-dungeon-crawler-example#latest
@Simeon Thanks. I’ll hang on for the next release.
@West Honestly, your dungeon generator is much better. I just took the simplest possible approach, counting on random room placement to generate a few interesting floor plans. Just about the only thing I spent time on was making sure everything was connected.
very neat, mark!
in the new version, how do i quit the game?
@Mark - thanks, but yours is way more fun!
@RonJeffries I’m using Fullscreen_No_Buttons, so to exit back to the editor you need to leave Codea and come back, the easiest way is to just hit the home button and select the app again.
ah, thanks, that's pretty much what i did
@Mark @RonJeffries Instead of leaving Codea, just grab the screen with 4 fingers and drag the screen a little to one side then back again. The buttons will then show at the bottom of the screen.
PS. If you're in the middle of a long tunnel and you press a key to move, you can't tell that you're moving because nothing seems to change until you come to something else.
@dave1707 Good point. Maybe I should add a little more variation in "texture" to the tiles so that progress is more obvious.
@Mark a quick and dirty way of improving this would be to flip the wall sprites by replacing line 181 in Floor with
@West Thanks. I already implemented some variation in floor shading that gives a good effect, but I think I’ll add this as well.
Updated version. Added some textures and tint changes to better convey movement. Code refactoring. Game balancing. Also played with using music to set the tone
I am having difficulty opening the zip file. When i tap on the .zip file i do not get an option 'open in codea', just the option 'open' and then nothing seems to happen?
@piinthesky Try selecting More then select Copy To Codea.
Hmmm... 'copy to codea' does not appear in either of the 'more lists' that are available?
When I tap on the zip file, I get Open in Codea and a More option. When I select More, I get a bunch of options with one of them being Copy to Codea. Of course I just select Open in Codea. I'm not sure what controls what gets shown when a file name is pressed.
@piinthesky what version of iOS / Codea are you on?
@Simeon i'm on 2.7.5(145) and ios 12.2. I think they are the latest?
@Mark - like the update. A few minor bugs:
“Select an Avatar” overlaps with the selection box on the info screen in landscape mode - simple fix would be to make the absolute offset (-90) relative to the height (as with the other elements of the placing)
One time I respawned on top of a pudding on a new game.
In Monster, line 131 and 135 are no longer needed (displays black text over black background, but one crosses the D pad in landscape mode
In landscape if you move to the far right then there is a grey bar on the far right screen. Simple fix would be to prevent the map from scrolling too far to the right. Alternatively a full column of “filled” bricks would maybe prevent character scrolling past this limit
@piinthesky Those are the latest versions and the same versions that I'm on. I found some results when I did a search, and they were that Apple limits the number of apps that show in the open with list. The solution was to delete apps that show in the list that you don't want until the ones you want do show. The only problem was that when you add the deleted apps back, they'll push the others off the list again. As usual, Apple thinks they know what you want in the list instead of letting you decide what you want.
@dave1707 @piinthesky I think you can scroll to the end of the list and press "More" where you can then re-order (or toggle on/off) the apps which can handle that file type
Edit: here's a video of what I see
@simeon, unfortunately Codea does not appear in my 'more' list so i cannot choose it- dont know why?! (Also I didn't manage to view your video -technology has got the better of me at the moment!)
@piinthesky I couldn’t view the video either. I haven’t been able to change anything in the open with list. I can rearrange them, but I can’t add or delete anything in the list. Are there any apps that show in your list that you can delete from the iPad to see what changes. You can always add the apps back.
I changed the video to a link so the forums doesn't try to embed it (which seems to break it)
@simeon, @dave1707 got it! It works if i enter the codea.io from the safari webpage. If i enter codeo.io directly from the button at the bottom left of the codea main page (my normal way) then it doesn't work!
@piinthesky ah I guess iOS doesn't show it because you are already in the app, hmm. Perhaps the forums button should just launch safari (that way you can put it side-by-side with Codea)
@dave1707 Thanks! Grabbed most of these, and undoubtedly made a half dozen new ones as I fiddle with music, etc.
@Simeon Are we still waiting on an update before going to Xcode?
@Mark yes I'll send it asap
@Mark maybe export a version from the current Codea just in case the new export is.. worse
Updated with some play balance, music, controls, etc. Probably last time it gets more than a bug fix. (Touched up with some bug fixes)
Good job! I like it! And I will try to do something for the hero !
I keep messing with this project whenever I play with Codea. It's a really cool little game @Mark