 |
|
 |
| Parallax Forums > Public Forums > HYDRA System & Propeller Game Development > Making a game kit for the Hydra/Demoboard | Forum Quick Jump
|
  |  trodoss Scrub

       Date Joined Aug 2008 Total Posts : 268 | Posted 11/6/2009 9:18 AM (GMT -8) |   | @OBC, If you get to a point and you need help, let me know and I will be more than happy to help as best as I can.
@Baggers, No hurry. I figured it may take some thought/work, and appreciate any time/effort you can put into it.
If it would be any help (probably not) I could pass along what I had come up with. My challenge was that it was requiring a significant amount of bitwise manipulation to determine background position, and what was throwing me was that it was 5 bytes (40 bits), and then 3 additional bytes per line that had to be 'skipped'
If it was simple 1-byte x/y sort of thing I think I coiuld have gotten it to work. | | Back to Top | | |
 |  Baggers Registered Member

       Date Joined Mar 2007 Total Posts : 1773 | Posted 11/6/2009 1:40 PM (GMT -8) |   | | Hi trodoss,
Here's the first pass of the collision for you, I've almost commented it, but I'm off for an early bed tonight, I'm pooped, but wanted to get it to you.
basically there's a PUB called check_collision(x,y,height)
which returns 0 or 1
0 for no collision and 1 for a collision
it checks all background pixels in the height, and gets a mask for X and X+4 and X+7 to do a test on.
There's a bit in Main that checks the bird, and also checks the feet for platform and sets the border to a colour depending on what it's collision is
That should give you enough to play around with now :)
| | Back to Top | | |
 |  trodoss Scrub

       Date Joined Aug 2008 Total Posts : 268 | Posted 11/6/2009 2:04 PM (GMT -8) |   | @Baggers,
Thanks! That should be just what I needed. Also, thanks for re-structuring the config a bit (since that was needed as well). I had not yet set up the NES pad config for Hybrid/Hydra.
Now, to correct those lingering issues... ;) | | Back to Top | | |
 |  Ariba Registered Member

       Date Joined Apr 2007 Total Posts : 495 | Posted 11/6/2009 10:06 PM (GMT -8) |   | OK, here is the demo for the 16color Driver
It shows Sprites on an partly animated background. Every pixel of the Background and the Sprites can have one of 16 different colors, they use the same palette.
The attached pictures shows how the animation is drawn. On every Vertical sync a buffer with the background is copied to the screen, and then the sprites are drawn over that. This must be fast, so I have made an Assemby driver for that. This uses 2 * 6 kByte RAM (for the buffer and the screen), but allows flickerless animation of the background.
This driver also does a collision detection: 1 color of the sprites can be defined as transparent. And some colors of the screen can set to be collision sensitiv. You set just a color limit, all lower color numbers are not collision sensitiv, the higher are. When a not transparent sprite pixel covers a screen pixel, which is collision sensitiv, a collision is detected, and the covered screen color is returned. So you can easy decide which object forced the collision, if you give theme different colors.
All the pictures are made with my Paint program, parts of the background will look familiar ;)
The Demo is a little playable game, you can move the Helicopter around with the cursor keys, and get points if you touch the blue Ball. But be wary of the red Ball !
NOW i will add sound. I try it first with my MIDI synth and hope it fits in the Memory.
Andy
Image Attachment :
 v_sprite.gif 3KB (image/gif)This image has been viewed 28 time(s). | | | |
File Attachment : gamedemo2.zip 23KB (application/x-zip-compressed)This file has been downloaded 12 time(s). | | Back to Top | | |
 |  Baggers Registered Member

       Date Joined Mar 2007 Total Posts : 1773 | Posted 11/7/2009 2:38 AM (GMT -8) |   | | | |
 | 57 posts in this thread. Viewing Page : 1 2 3 | | Forum Information | Currently it is Friday, November 20, 2009 8:35 PM (GMT -8) There are a total of 393,723 posts in 55,520 threads. In the last 3 days there were 84 new threads and 703 reply posts. View Active Threads
| | Who's Online | This forum has 17685 registered members. Please welcome our newest member, Steve H. 59 Guest(s), 5 Registered Member(s) are currently online. Details Mike Green, aconz2, Cluso99, Rich_W8VK, Franklin |
Forum powered by dotNetBB v2.42EC SP2.02 dotNetBB © 2000-2009 |
|
|