Wanted to see stars, got snow...
Oldbitcollector (Jeff)
Posts: 8,091
I thought I'd see if Doug's 8x8 driver could be pushed again to create a starfield effect
for a space shoot'em of some sort..
After a few minutes of wanting to see stars, all I'm seeing is falling snow.
It's a neat effect, but.. Oh well. (Sorta that way outside tonight too!)
I thought I'd post this revision because I know there are a couple other
people who are seeking beginner game examples.
I'll be working on this idea more, and perhaps a game will evolve as well.
Suggestions welcome. [noparse]:)[/noparse]
OBC
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
New to the Propeller?
Visit the: The Propeller Pages @ Warranty Void.
for a space shoot'em of some sort..
After a few minutes of wanting to see stars, all I'm seeing is falling snow.
It's a neat effect, but.. Oh well. (Sorta that way outside tonight too!)
I thought I'd post this revision because I know there are a couple other
people who are seeking beginner game examples.
I'll be working on this idea more, and perhaps a game will evolve as well.
Suggestions welcome. [noparse]:)[/noparse]
OBC
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
New to the Propeller?
Visit the: The Propeller Pages @ Warranty Void.
zip
38K
Comments
Looks like snow, or, if it was green, maybe "The Matrix."· Maybe you could save the code for a screen saver later [noparse];)[/noparse]
There are several different ways to achieve a scrolling starfield.· Are you planning on including other 'background elements' (such as planets/planet surfaces/large ships, etc.), or are you just planning on having a few stars scrolling right to left at random vertical position?·
If you are wanting just a few stars randomly appearing, and varying their Y position and possibly their speed, you could manage them in a 'pseudo structure.'· When the Y position is 0, then randomly select a new Y position and speed.· That might work the best in a clear/redraw display strategy that you would use with Potato_Text.
Post Edited (trodoss) : 1/4/2010 10:42:29 PM GMT
[noparse][[/noparse]Edit:] In order to try to explain how the code works, I added additional·comments.· If it makes it more difficult to understand, my apologies.· My hope is though that it makes it easier.
--trodoss
Post Edited (trodoss) : 1/4/2010 10:42:07 PM GMT
I changed the .Zip in my previous post, which provides additional explanation of the 'pseudo structure'·being used. Many thanks to Baggers for showing how to use the technique!
--trodoss
Post Edited (trodoss) : 1/4/2010 10:42:46 PM GMT
It shouldn't take too much to convert this to a vertical scroller either.
Thanks!
OBC
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
New to the Propeller?
Visit the: The Propeller Pages @ Warranty Void.
Did your 'space shoot-em up' concept ever get started, or did you get "stuck" on a particular area (or concept)?· Just curious.·
--trodoss
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Game(s) Mythic Flight (0.9)
Utilities Font Editors (AIGeneric, Potato_Text, etc.)
Got hammered last week "other" stuff.. I'm almost done playing catch-up with everything else, so
I can get both the Chicago expo tied down, my two projects done for the Propeller contest, then
return to the game kit. [noparse]:)[/noparse]
OBC
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
New to the Propeller?
Visit the: The Propeller Pages @ Warranty Void.
Ok, just checking (in case you needed some info/etc.) Sounds like you have more than enough to work on.
I have quite a few 'loose ends' as well (update the FontGenerator, etc.) I have also been tinkering with SPI SRAM (23K256) for a few apps. Certianly comes in handy for buffering.
I will see if I can come up with another annoted example of a 'scrolling background' to add as well. Obviously there are any number of ways it can be done [noparse];)[/noparse]
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Game(s) Mythic Flight (0.9)
Utilities Font Editors (AIGeneric, Potato_Text, etc.)
Attached is another start at a demo (single character moving around the screen).· If you think it is worth the time, I could document it fully.· Also, if you can let me know what is easy/hard to understand about it, it would be appreciated.· I am trying to make the example(s) as simple as possible (sacraficing efficiency for ease of use/understanding).·
Thanks,
--trodoss
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Game(s) Mythic Flight (0.9)
Utilities Font Editors (AIGeneric, Potato_Text, etc.)
OBC
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
New to the Propeller?
Visit the: The Propeller Pages @ Warranty Void.
I updated the previously posted code:
- Uses Potato_Text-like font (so one could actually look at the .spin character definition)
- Changed the DAT section so the map is "viewable" (took out the $20, ...)
- Added/changed descriptions
Ideas?· Thoughts?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Game(s) Mythic Flight
Utilities Font Editors (AIGeneric, Potato_Text, etc.)
Post Edited (trodoss) : 2/4/2010 9:50:16 PM GMT
Yes, an easy example indeed!
OBC
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
New to the Propeller?
Visit the: The Propeller Pages @ Warranty Void.
Hopefully it is useful.
From my experience with Spin, I encountered issues such as:
code indention
long-alignment of VARiables
finding a "structure equivalent" (kind of covered)
Would having further explanation of these be beneficial, or is pointing someone to the "Getting Started and Key Thread Index" (http://forums.parallax.com/forums/default.aspx?f=25&m=335240)
a better solution?
I am working on a "part 2" to this example (adding monsters), but have not posted it yet.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Game(s) Mythic Flight
Utilities Font Editors (AIGeneric, Potato_Text, etc.)
Here's a little modification of your link code.. [noparse]:)[/noparse]
Should I finish it?
OBC
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
New to the Propeller?
Visit the: The Propeller Pages @ Warranty Void.
Looks like you are off to a great start!
Definitely try to finish it, if you have the time.
If I keep going with the "demo" code, I might end up with a passable Zelda clone. If...Zelda had it been made on maybe the 2600 [noparse];)[/noparse]
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Game(s) Mythic Flight
Utilities Font Editors (AIGeneric, Potato_Text, etc.)
Now you've got me hooked again.. [noparse]:)[/noparse] <smirk>
The board is looking good now, not sure how I'll handle the dots yet.. [noparse]:)[/noparse]
OBC
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
New to the Propeller?
Visit the: The Propeller Pages @ Warranty Void.
I posted a slightly altered version of the code, so that pellets can get 'munched'
Primarily, I changed the following:
The "DrawMap" routine was changed so that the 'Pellets' can get drawn as part of the background.· You could add the 'Power Pellets' the same way (with another character)
The "CheckMove" routine was changed so that it tests for 'hitting' a pellet.· When a pellet is encountered, "MunchPellet" is called to remove this from the map.
·"MunchPellet" is pretty self-explanitory.· It is where the pellet is removed from the background map.· You could add to the score here/make a sound when the pellet is "munched."
Hopefully this is enough to get you going.· Next you might want to add your "score" display, and maybe draw your "Power Pellets."
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Game(s) Mythic Flight
Utilities Font Editors (AIGeneric, Potato_Text, etc.)
Something to look forward to tonight after work!
Edit: Quick peek at the code..
I forgot that the DAT section was read once at startup.
Yes, that does make it easy to place the dots in the map.
For some reason my brain was telling me that DAT was set in stone.
OBC
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
New to the Propeller?
Visit the: The Propeller Pages @ Warranty Void.
Post Edited (Oldbitcollector) : 2/8/2010 6:56:46 PM GMT
Could you help with some "WAKA WAKA" sounds using SIDcog? [noparse]:)[/noparse]
OBC
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
New to the Propeller?
Visit the: The Propeller Pages @ Warranty Void.
Ghosts added.. (don't move yet)
Power pellets added (Ghosts turn blue for a short period of time)
Pellet count added. Game resets but pellets don't re-appear. (Can DAT be re-read?)
OBC
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
New to the Propeller?
Visit the: The Propeller Pages @ Warranty Void.
Great progress!
If you are wanting the pellets to 're-appear,' what you could do is read the map into an array and use that instead of accessing the DAT area directly. That way you are working off of a copy instead of the original data.
You could also have multiple maps (levels) and have a 'level pointer,' so you could skip ahead to the next level. If you used that scheme you would not necessarily have to 'reset' (or you could load a particular level into the array--your choice).
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Game(s) Mythic Flight
Utilities Font Editors (AIGeneric, Potato_Text, etc.)
since the procedures DrawBaddie1, DrawBaddie2, DrawBaddie3, and DrawBaddie4 all share very similar code, you could 'roll them up' into a single procedure.
Something like:
---The following is merely a suggestion: Feel free to disregard---
You might put thought to how you are can manage 'like' data. Ghosts currently have the following "like data":
Current X Position
Current Y Position
...and you may want to add later:
Current Action (Moving North, Moving South, Moving East, Moving West)
Current State (Alive, Chomped/Dead)
You can have VAR space declared for each entity, or you could set up a "Pseudo Structure" to manage this data.
The advantage of a "Pseudo Strucutre" would be that you could loop from 1 to MAX_BADDIES, and handle your drawing or movement all in one loop.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Game(s) Mythic Flight
Utilities Font Editors (AIGeneric, Potato_Text, etc.)
Posted a version with the level data being copied into an array (this version does not have the other above mentioned changes in it).
Hopefully it helps you along.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Game(s) Mythic Flight
Utilities Font Editors (AIGeneric, Potato_Text, etc.)
·in your DAT section you would have the first level, followed immediately by the next level under·the same 'mapinfo' label.
Or, you could always load level data from files defined on an SD card (like you were planning on implementing in your "LOADRUNNER" project).
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Game(s) Mythic Flight
Utilities Font Editors (AIGeneric, Potato_Text, etc.)
Post Edited (trodoss) : 2/9/2010 7:18:07 PM GMT