Page 2 of 6 FirstFirst 123456 LastLast
Results 11 to 20 of 54

Thread: Points Cont'd, Asteroids Game in C#

  1. #11
    Join Date
    Dec 2006
    Location
    Netherlands
    Posts
    964

    Default

    Quote Originally Posted by mikkojay View Post
    Here is what any program will do:
    1) Save all video written to the screen as a collection of "line" objects, each of which contains 2 points and a color.
    2) Be written to insert proper blank lines to the collection when appropriate
    3) Iterate thru the collection and write to an ilda frame
    4) Send frame to appropriate destination
    Check the code that I sent you, the LaserOutput class does 2,3 and 4. There is a laserLine funcion that will take care of 1.

    I agree totally with you that we should aim for reusable classes. Probably the first and most important step is to define an interface to the class that handles the output. LaserOutput is a start, we can take it from there.

    EDIT: Mike, I just reread your post, in my enthusiasm I was a litte quick to reply, my approach differs a little from your 4 step plan. Basically what my code does is:
    1) create 'framelets' at startup. Each framelet is a onscreen object represented by a series of points like in an ilda frame.
    2) the framelets are sent to LaserOutput and stored in an array or vector.
    3) LaserOutput combines the framelets into a frame. Each framelet gets an offset generated by the program so they can actually move in time. (much like sprites)

    It would be great if we can establish a common base for game development. The LaserOut class is typically written for Easylase. When we define a good interface for the output class, similar classes with the same interface can be written for other hardware ..

    cheers
    Last edited by Zoof; 10-18-2007 at 06:34.

  2. #12
    Join Date
    Sep 2007
    Location
    Omaha, NE
    Posts
    769

    Default

    Cool-
    You know what would also be good, is a class that would write canned text/characters. The one I am using just has really basic block letters that could be improved immensely. Also, canned polygon objects would be nice. You could have circle, sphere, rectangle, cube etc... The constructor might be like center point, diameter/width/height, and color.
    I found an interesting site on some basic game coding concepts HERE
    I really like the reusability concept. Maybe if this gets rolling we can build a suite of games with a common console. Having options to output to common boards would be great as well.
    When I first started programming about 8 years ago, my first VB program was a memory game. I found that making something fun allows me to learn at a faster rate. The only negative effect is that sometimes I cannot stop and I wind up staying up waaaaay too late!
    -Mike


  3. #13
    Join Date
    Sep 2007
    Location
    Omaha, NE
    Posts
    769

    Default

    Here is a zipped up package of C# pong from the above link-
    It is really well documented
    Attached Files Attached Files


  4. #14
    Join Date
    Oct 2006
    Location
    Central Florida
    Posts
    7,067

    Question

    Quote Originally Posted by mikkojay View Post
    Also, canned polygon objects would be nice. You could have circle, sphere, rectangle, cube etc... The constructor might be like center point, diameter/width/height, and color.
    Doesn't OpenGL have a lot of functions that do that? What is it the GNU.lib or something... It has been a while since I coded anything.

  5. #15
    Join Date
    Dec 2006
    Location
    Netherlands
    Posts
    964

    Default

    Quote Originally Posted by mikkojay View Post
    sometimes I cannot stop and I wind up staying up waaaaay too late!
    -Mike
    I sooo know that feeling

    great links btw

  6. #16
    Join Date
    Dec 2006
    Location
    Netherlands
    Posts
    964

    Default

    Just had a chance to look at your asteroids ilda frames: VERY impressive.

  7. #17
    Join Date
    Apr 2006
    Location
    Wirral, UK
    Posts
    191

    Default

    Talking of Asteroids - I got the FPGAarcade VHDL simulation of the original Asteroids Deluxe hardware working on a Spartan 3 dev board. A few R2R DACs later and I had Asteroids Deluxe on a scope (no blanking I/P on the scope)
    Unfortunately it was too fast to project with my galvos.
    I'll give the original Asteroids a go - I think the vectors were drawn slower on that.....
    Attached Thumbnails Attached Thumbnails Asteroids.jpg  


  8. #18
    Join Date
    Sep 2007
    Location
    Omaha, NE
    Posts
    769

    Default

    Cool! I have an xy scope, but only one probe- I ordered 2 more off ebay this week. Hey Zoof, did you try shooting them at the wall?
    Here is a screenshot from when I was experimenting with guide points on the blanking lines. I think I will omit the leading zeros on the score- no sense in slowing things down for zeros that aren't really needed. I am currently looking for some source code for that old game BattleZone.
    -Mike
    Attached Thumbnails Attached Thumbnails aster.bmp  



  9. #19
    Join Date
    Dec 2006
    Location
    Netherlands
    Posts
    964

    Default

    Yeah beamed it onto the waal. Looks good, evean at 20K. I think you maybe adding to many anchor points on the astroids themselves. The explosion of the ships really slows things down. But other than that no probs. You may want to look into sorting astroids to optimize blanking distance. Keep it up

  10. #20
    Join Date
    Apr 2007
    Location
    Leicestershire, UK
    Posts
    137

    Default

    I'm quite excited by this stuff! I'd love to see the old classics on the laser! I wish I could help i some way but my programming is limited to a bit of picaxe microcontroller and a small amount of bbc basic! hmph. How about the old BBC favorite "Elite" I'm sure it was available on other machines too. I think that was all done with vector graphics.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •