video games
[Deleted User]
Posts: 0
hi , any body have any code for some simple video games for the propeller .
Thanks,
·Brian
Thanks,
·Brian
Comments
Surely it can't be far off now?
Does anyone have a status on that particular game?
Pong and Pac Man make me feel like a pre-teen.
I need Hyper-space and negative gravity.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"If you want more fiber, eat the package.· Not enough?· Eat the manual."········
Thank's brian
A lot of people are working on game related projects and firmware as we speak.
I've been writing a sound engine designed for games in mind that will release soon after the Hydra releases.
Truckwiz, your best bet is to play around and see what you can come up with, because it's only a matter of short time before the Propeller retro gaming scene opens up and takes shape. We'll have standardized hardware to work with and firmware that will be openly shared.
The HYDRA release is getting VERY close, an announcement will be made soon once they units are all ready to go.
Everyone will have years of source code to figure out, it will keep everyone very busy [noparse]:)[/noparse]
Andre'
·I'm not using it for a game , i'm just tring to figure out some of the graphics option's , take this program, I can't tell·what line changes color for text & what one changes the screen color , they seem to have a affect on each other ( I marked the 2 lines)
Thank's· Brian
con
· _clkmode = xtal1 + pll16x
· _xinfreq = 5_000_000
· newline = 13
·
obj
· videodisplay: "TV_Terminal"
· kb··· :······ "Keyboard"
pub start
·videodisplay.start(12)
·setscreen
·kb.start(26,27)
·waitcnt (50_000_000 + cnt)
·if kb.present
· videodisplay.str(string( "······BOB & SAM'S COMPUTER!"))
· videodisplay.out(13)
· videodisplay.out(13)
· videodisplay.str(string("············ START TYPING !!···· "))
· videodisplay.out(13)
· videodisplay.out(13)
· repeat
··· videodisplay.out(kb.getkey)
·else
··· videodisplay.str(string(" ERROR : KEYBOARD NOT CONNECTED" ))
pri setscreen
· videodisplay.out(3)·· THIS LINE
· videodisplay.out(5)···& THIS LINE
Post Edited (truckwiz) : 10/21/2006 12:45:42 AM GMT
Andre'
is there away to take this 4 lines of code & make 2
brian
if kb.present
videodisplay.str(string( " BOB & SAM'S COMPUTER!"))
videodisplay.out(13)
videodisplay.out(13)
Andre'
I tried:
videodisplay.str(string( " DA DA DA"13,13))
i get a error
thank's
videodisplay.str(my_string)
DAT
my_string byte "hello world", 13, 13
But, like I said, we haven't ascertained if the str function can handle the special codes or only the out function, you need to look at the function itself to figure that out.
Andre'
Thanks
Brian
Post Edited (truckwiz) : 10/21/2006 1:35:39 AM GMT
Andre'
Eventually I would like to port all of my favorite games - QBASIC Gorillas, Commander Keen, Elite, Oregon Trail...
I have a vector-graphics 3-d space game I wrote in C++ and assembly for CGA graphics; that game would work well on the Propeller, too. It seems like a million years since I wrote the game and none of the code will port directly, of course, but the integer mathematics would and so would the smooth-framerate algorithm. If I am successful in making a vector-graphics engine for the Propeller, then I could represent the graphics as line start->end points and not need a bitmap or the overhead of drawing lines to one (a cog would translate the line data to pixels as the screen scans). An engine that supports triangles would really be nice but I never worked out the math to do surfaces; my 3-d pipeline only handles points and lines. I wrote it in high school and figured out all of the 3-d pipeline math with just what I learned in algebra 1 and using thought experiments and graphs drawn on napkins. I hadn't had trigonometry when I started so I didn't know what the SINE function was - I used another program to generate a table of values that was essentially a sine table; rather than finding sine by trigonometry it actually used a "guess and check" method to fill the table with values that would make the rotation come out right! I also had to "invent" rotation matrices but I didn't think of them as matrices; I just called it "the xness of x' plus the yness of x' " and "the xness of y' plus the yness of y' ".
Linerider would also be a great game to make on the Propeller.
I didn't write a 3D engine for the hydra, but I might in the future. However, the book CD comes with an eCopy of my "Black Art of 3D Game Programming" which covers 3D rasterization, the entire 3D pipeline, poly filling, etc. and was written with DOS in mind, so its very applicable to the propeller. Of course, its all in C and 80xxx ASM, but algorithms are algorithms. In any event though, all the 2D games you mentioned are easy to write with my "HEL" engine or some of·the more advanced 256 color engines we developed. But, asset pipelines are a bit of a problem. I created one tool chain to get bitmaps and tile worlds into the hydra using my engine, but for your engine or the other demo coders engines you have to use other ones.
But, to give you an idea, with my HEL engine or the other engines we made, a 2D game like asteroids, or pacman, etc. takes about a weekend to a week if you code without stopping and have it in your head what you're doing already.
Andre'
Well that's exactly where S-Buffers excel; you break the screen down into horizontal strips, so your polygons get chopped into lines. Do hidden surface removal on those lines, and in the end you get a list of all the horizontal spans you need to draw to the screen buffer. No wasted time, because you don't have to draw a pixel multiple times like you would with the Painter's Algorithm, and as long as you don't have really small polygons, it uses much less RAM than a Z-Buffer. The other nice thing is that you only have to update the list when your scene changes, which doesn't have to be every frame.
Does the Hydra come with a fixed-point math library?
Andre'
·videodisplay.out(3)
Be used to identify a color on a screen?
I think you mean by looking at the color on the screen you can make a list of colors? The best thing to do is run a palette program that shows the whole palette with your TV set to neutral tint. Then make a list of those color words or palette byte descriptions then go into the video display object or whatever you are dealing with and look how it refers to colors / palettes and then change the palette entries to reflect the sub-set of colors you want. There can only be one set of 4 colors per screen tile, so that particular driver "videodisplay" might use the same for all tiles. I haven't played with this one. But, bottom line is there are two ways to determine the ACTUAL colors;
1. Generate a palette on the screen that shows all colors and all shades (which we have done at nurve) and then screen grab them and sit with photoshop and determine the RGB value of each.
2. Make a math model considering that the color burst is phase delayed and broken up into 16 different colors eqidistant, then use the YUV calculations and the intensity values to come up with an RGB model then try a few test points and see if what you put in comes out on the screen. I have done this as well.
IN REALITY though, the TV has different gamma, the phosphors are NOT equally responsive, nor is your eyes, so in the end a hand generated palette taken from actual screen grabs on 3-4 sets was averaged and I created 2 palettes, one that looks "ok" on most things when you do an RGB conversion, and one that looks REALLY good on some stuff, and bad on other stuff. Welcome to the world of color matching in video game / graphics hardware and trying to make what you see on your VGA monitor come out the other end on the NTSC screen [noparse]:)[/noparse]
Andre'
(Man, what an interesting assembly language BTW!)
Seems to me, there are two issues: Color as Parallax did it, and whatever you want to do. It's all software and bandwidth limits. Use one COG, get a few colors or some resolution. Use more than one COG and get more colors, overlays, etc....
Andre: Did you end up programming the equilivent of hardware collision detection? Was picturing one cog drawing a background and another COG doing sprites. As the sprite COG draws, it should be able to read what the other COG has contributed to the video output and detect a collision with drawn pixels. If you ended up doing this, care to comment on how it goes in general?
The engine is a good starting point and shows all the advanced concepts needed to make more advanced engines. It shows how to scanline buffer things, creating a display list of sprite scanlines that need rendering per line, caching techniques to bring in frequently accessed data to localmem, and lots of other things.
The most advanced engines use up to 7 cogs and run in parallel, support, many, many sprites, smooth scrolling, tiles, and 256 colors [noparse]:)[/noparse]
Andre'