It looks like you're new here. If you want to get involved, click one of these buttons!
Here is a simple side scroller. It's aimed at helping beginners understand some of the basics involved in meshes, spritesheets and collision detection. It's by no means perfect but hopefully someone will find it useful. I've included a spritesheet which you are free to use, modify, whatever.
Code:https://gist.github.com/Westenburg/5743643
Spritesheet:https://www.dropbox.com/s/ztwc51abhl3ks1k/foggyspritesheet@2x.png
Comments
Cool. I aim to write some tutorials about sidescrollers, so I'll read this with interest.
Cool, but i have only a Blue/withe screen. I have downloaded your Image and put it in the dropbox and activated it in the code.
Try saving it to documents. You also might want to rename the file to something simpler.
@west Very cool. Wish I would have had this to reference on my last side scroller. Really informative!
Cool, it's nice
@West Thank you, it works.
I can't find a exit option to codea.
@ West. Did the image loads and renamed foggyspritesheet. Then copied and pasted into the Document Folder. Jetz it works excellent. Going out with triple tab. Thank you.
Thanks all!
@Elturro you need to tap the screen three times with 3 fingers to bring up the exit (and other) buttons. If you change display mode from FULLSCREEN_NO_BUTTONS to FULLSCREEN then the exit button will always be shown
Thanks again!
Updated to with weather,particles and bonuses. Now contains two tabs - a Particle one and the Main one. Not sure if I've uploaded to GitHub correctly as I'm new to it.
https://gist.github.com/Westenburg/5761018
@West I must say I loved how you posted this with the image assets and suggestions to try an implement. I've been using it to learn more game mechanics. great update, I want to see how close i can get to it before peeking at your new code
@Briarfox - cool - I'm glad you're finding useful! Look forward to seeing your updates- the way I've done it isn't necessarily the best way so would be interested in other people's take on it.
@West, this is one of the coolest games I've seen--made with Codea. In my humble opinion, TLL should use it as a Codea sample program.
@Ric_Esrey - thanks for the kind words
Wow, the update is great. So i can learn more. :-B
Stunning... I love it. You did an unbelievable job incorporating real life photos into a game while keeping it pretty.
One suggestion I have is to warn the player before a spider comes because if you're going fast, you're out of luck. One frame there's no spider, the next you're eaten.
@Elturro, @Zoyt - thanks!
Yeah - the spider is pretty hidden against some of the backdrops - there is also a skull icon on the spritesheet that I had used originally which is a bit easier to see.
I think the way that the horizontal speed is altered needs re-visiting - I think you speed up too fast too quickly when passing through the rings. The speed up bonus doesn't really do too much.
Anyone made it into night time? - I was really happy with the way the stars appear, though the dusk transition could be smoother
I just barely did, then I got hit by a pesky spider. Urg. I suggest you add something like a red arrow pointing to the spider on the right side of the screen a second before it shows upl
Here is my unfinished design. It is interesting to play with your code. Please do not use the design Commercial.
https://www.dropbox.com/s/fkoggeqeevo7y21/Foto 17.06.13 16 56 54.png
https://www.dropbox.com/s/2mzap2zlla27qpf/Foto 17.06.13 16 57 10.jpg
Nice graphics - I like the consistency of your theme
Thanks West. It has to be adapted.
I'm using this for a game! :x
Nice - look forward to it
I made a zip for this project so that people could get it more easily, and not have to download a sprite sheet separately.
It’s still a really cool and helpful project!
It’s also got very detailed comments explaining how it works, so anyone interested in this kind of thing should definitely check it out.
@UberGoober wow - that’s going back a bit! I made a prototype game pushing the idea on a bit with power ups and an end of level boss. Unashamedly riffing off of Apidya from the Amiga days. Unfortunately the zip is coming in at 10MB so too large to post here
Just out of curiosity, how much of that is sounds and graphics?
In theory, one could jerry-rig a “lite“ version using only Codea–native sounds and graphics wherever possible… i’d be willing to take a stab at it if you have a link.
@UberGoober The vast majority will be graphics. I have 90 images - lots of them 200 x 200 (they don't need to be this big, but don't have an easy way to scale them down). This prototype was all about the look rather than the underlying quality code (which is pretty poor).
Do you know if there is a way of viewing the contents of a project's "graphics" folder?
https://apps.apple.com/us/app/zip-viewer-unzip-and-archive/id603570331
When you tap on the zip file, it will show you a Codea file, and when you tap on the Codea file, it will treat it like a folder and show you its contents.
Hmm - don’t think I’ll be able to compress the images down easily. File size limit for the forum is 2MB. Thanks for the link @UberGoober though - told me what I’d suspected in that it is the volume of source files rather than one specific one which is the problem.
Here’s a short video of the game in action
Been a while since I’ve uploaded to YouTube - there’s been a bump in the video quality
Hm any chance you want to share a Dropbox link and I’ll take a swing at chopping it down? I think I’d have to replace some of the art but rom my vantage point, even if it has to have worse graphics, it still would have great value as a guide for others to build off of.
Sure - I’ve sent you a pm. Do think reducing the graphics loses a lot of its value though!
I shrunk down the graphics and put almost all of them on a spritesheet—everything but the the backdrop, we’ll have to fake that, maybe via a grey tint on the builtin clouds.
I haven’t actually implemented any of it, but now the project shrinks to 1.8 MB!
I have included the spritesheet just so you can look at it; it’s actually in the project already, so there’s no need to copy it in.
Whoops I messed up the ant parts, they won’t overlap correctly, as opposed to the other bugs; the others assemble correctly if their sprites are all stacked in the same place. Will fix later.
Okay fixed it, updated the zip and the image above.
If it’s not obvious, this isn’t a playable version, because none of the sprites have been added yet.
Now I’ve got to go look at @dave1707 ’s spritesheet demo!
@UberGoober I don’t see the spritesheet or zip. For the backdrop just use one of the built in environment ones - looks OK
@West odd, they appeared there for me when I edited it, but you’re right, they’re gone now. I just put them back, please let me know if they’re still not visible to you.
Ok - can see them now
Okay here’s something from left field.
I’m getting the sprites up and working, and just for the heck of it I made a version where, every frame, every single sprite randomly changes to any other sprite.
It’s nuts, but kind of fun, and oddly I’m much better at the game in this mode!
I think I did it!
The graphics look 95% as good as the original, I’d say.
This was way too much work, and I really got obsessed with it. I have responsibilities, man! Now my wife is starving, and my children are crying, but who cares? _ I got this Codea project under 2 MB!_ My legacy is secure.
@West, you’ll notice it’s not perfect, there was some scaling and positioning stuff I couldn’t get just right, but I think I got close.
If anyone is interested, and I guess even if no one is, here’s how I did it.
i wish we had a way to give a post thumbs up or a like, so here’s my kudos to you for putting so much work and troubleshooting into this @UberGoober
@UberGoober great job. You have a lot more patience than me on this!
For coding the spritesheet - there was a simple example included within the code itself - the explosion was a sprite sheet in the original.
Set self.invincible to 20000 in the Bee class to give you invulnerability for a longer period of time - that way you can cruise to the cat end of level boss. Unfortunately the sprite for the cat isn’t ported correctly.
Another thing, the order of the power up icons is wrong - the power awarded is still ok, but the symbols are presented in the wrong order.
Now this has moved from being a personal project only on my iPad, there may be issues around attributions of the assets. All the original images were generated by me, sometimes from photos I’d taken, but sometimes curated from the web. (My process was to load into Inkpad, draw round and set a mask) Not sure of the correct attribution for this, but if you see one of your images being used and its an issue let me know (I think it’ll be OK but credit where credit is due).
The explosions were derived from some excellent tutorials here: https://blog.studiominiboss.com/pixelart
@West @UberGoober Amazing work both of you!
I just thought I’d let you know that I’ve added @UberGoober’s latest ‘Foggy From Sprites’ project to the new community repo app I’ve been working on. With zero modifications to the zip it downloads automatically and runs perfectly! As far as I can tell at least…
I’m hoping to have a large assortment of demo projects, programs and games on there in the future but If you do have an issue with it do please let me know and I’ll take it down. Just wanted to make you aware.
Oh and @West I’ve also added your recent ‘Fish’ demo too
Also, as we have seen over the years, updates in Codea can frequently result in incompatible projects. For old timers that's not an issue but for recent or inexperienced forum members that could, later, be an issue (unless author's are willing to update and re-upload).
@West thanks for the invulnerability tip. And the cat tip. I fixed the cat.
I wonder if you could help me fix a couple other things.
There’s also a gameplay bug where once in a while the sprites seem to jump slightly from one place to another. I don’t know why changing art assets should affect that, so I must have accidentally busted something.
Is it possible to get some help on these things?
@Bri_G I get that, I wouldn’t want it to be the only place to find a project but it could help newer users find interesting examples from the community easily without trawling through ancient forum threads. I think some sort of automated test framework could be useful in the long run to spot projects with potential issues after an update to Codea but that’s a job for another day.
For the time being, I’m already doing some automatic substitutions for the old ‘Project:’ asset paths to convert them to the newer ‘asset.’ system. At the same time, the projects this downloads are available exactly the same as any other on Codea so if something is broken it can be edited & fixed.
@UberGoober The dragonflies aren’t invincible. They have 50 “hit points” which are set by self.hp in the Enemy class. Each bullet that hits an enemy removes 1 hp. The third power up along gives duel, triple, etc bullets for each time it is selected. The “super bullet” by holding on to the bee to build it up, then releasing will take a lot more hit points off.
The wing & leg positioning is down to the way I originally designed the assets. Purposefully these images were bigger than they needed to be but were aligned so that they could use a common x and y position. When you have ported them into a single sprite sheet you have lost this implicit relative position information. You will probably now need to add it explicitly back in by adding the appropriate offsets to each image. The attached small program allows you to explore the offsetting for the wasp and its wings. The legs will be similar.
For the butterflies and dragonflies, the wing movement is faked by squashing and expanding the image along one axis to give the impression of the wing coming out of the screen.
Having said that the original code is HORRIBLE! It worked to allow me to the rapid prototyping and exploring, but I never originally intended it to be shared. If investing any time in it, I would be looking at refactoring it first, and if I were doing it, I would go back to my original, non-sprite sheet version. The only reason for putting it into a spritesheet was to share on the forums, and specifically to fit within the 2MB limit. Chasing down bad code seems to be counterproductive, and you have the original up and running and don’t think there is the wider demand.
However, if you are learning stuff and it gives you a springboard - fill your boots and I’m happy to help.
Lastly, yes there are probably a few additional sprites which were never used. I remember the honeycomb being some crazy idea I had for a maze tunnel bonus section.
@Steppers - no problem sharing it on the repo - is there a size constraint like to forum, or could I post larger projects to it? I’ve not had the time to look at it, but will hopefully get time over the weekend