Shop OBEX P1 Docs P2 Docs Learn Events
Monitor and Graphics — Parallax Forums

Monitor and Graphics

Hey, I'm very new to Spin, and I'm trying to write a video game displayed on a monitor. My problem is that I don't know how to set up the graphics object or how to get the graphics from the buffer on to the screen. I have looked at the graphics demo, but it is for the TV. Any help would be greatly appreciated. Thanks!

Comments

  • The VGA and TV objects work approximately the same. They both display a grid of tiles, which for text usage are the font tiles from the mask ROM. For the graphics object, you create one (or two) big buffer of tiles and put those on the tiled screen. The graphics object can then draw geometry on those. I think there's a VGA version of the graphics demo somewhere on the forum here.

    Note that for most video game purposes, this setup is very inefficient - takes up too much memory, gives terrible color limitations, etc. You can do better with a sprite driver of sorts, but that's quite more complicated to use.

  • Thanks, I just tested out a program I found, and it works. I'm only in ninth grade, just doing this stuff for a hobby, so I need all the help I can get! Much appreciated.

  • Microcontroller games are a great hobby! As a full-time hobbyist (lol), I must know.

    As said, with enough dedication you can pull a lot from the Propeller chip. It's not the most complex game imaginable, but I'm still very fond of this Super Hexagon clone I wrote a while ago:

  • RaymanRayman Posts: 13,805

    The big benefit of the old TV drivers is that the resolution can be very low. This is helpful with the very limited memory of P1.
    If you look closely at the graphics demo, you'll see the resolution is low.

    It also depends on what kind of game you want to make.
    If it's something with simple graphics, like Tetris, for example, XGA mode on a VGA monitor might be good.
    I've got a "Playing Card Game Framework for TV and XGA" posted here:
    https://www.rayslogic.com/propeller/Programming/Programming.htm

    If you want something more like graphics demo, it can be done, but you'd have to either have it not full screen or stretch a smaller image to the full screen, making the pixels bigger.

    Anyway, doing fancy graphics with P1 like @Wuerfel_21 is showing gets to be extremely complex.

  • Thanks a ton, you guys are the best!

  • @amoSpin said:
    Thanks, I just tested out a program I found, and it works. I'm only in ninth grade, just doing this stuff for a hobby, so I need all the help I can get! Much appreciated.

    Oh wow! ninth grade, did not expect that. Way to go! Please do keep with this as part of your hobbies!

Sign In or Register to comment.