Jump to content
TheDurabun

Displaying icons in playfield?

Recommended Posts

Posted (edited)

Hi everyone, I was looking to learn how to display icons in the play field in a game I am developing. I want to be able to display different symbols on the side of the screen (similar to the trophy symbol in Haunted house). I tried displaying a sprite in the playfield I don't want it to be super stretched out like that. Does anyone have any suggestions on rendering icons?

hauntedHouse.jpg

display.png(this is a small test I was working on to render the icon at the top)

Edited by TheDurabun

Share this post


Link to post
Share on other sites

To be clear on terminology, are you using "playfield" to mean the game area? Normally it refers to the chunky blocks that often make up a game board or the like. The walls in the Haunted House example would be playfield pixels.

 

Are you using playfield pixels to make your icon in your screenshot? I'm assuming that's why it's chunky, and repeated on the other side. You will instead probably want to use one of the two player objects for this, as you can have a narrower horizontal resolution.

Share this post


Link to post
Share on other sites

I understand. I was using the playfield elements (PF1) to draw the icon, which is why it ends up being so chunky.

 

If I was already rendering player0 and player1, could I try to use one of the player objects to render the icons on the side of the screen as well? Would that involve flickering? I apologize, I am pretty new to programming for the Atari. Thanks!

Share this post


Link to post
Share on other sites
2 hours ago, TheDurabun said:

I understand. I was using the playfield elements (PF1) to draw the icon, which is why it ends up being so chunky.

 

If I was already rendering player0 and player1, could I try to use one of the player objects to render the icons on the side of the screen as well? Would that involve flickering? I apologize, I am pretty new to programming for the Atari. Thanks!

No apologies needed. 🙂 

 

You would indeed have to flicker the player objects if more than two of them existed on a horizontal line. That's why the bottom of the screen outside of the play area is generally a better idea - you could reposition the player object once you are beyond the play area to be able to reuse it at the bottom without having to flicker the player object.

  • Thanks 1

Share this post


Link to post
Share on other sites

Perfect! So I could render the player objects in the play area and then use the objects to display icons on the bottom or side, right? Thank you for the advice!

Share this post


Link to post
Share on other sites

It helps to look at other games using Stella's Fixed Debug Colors mode, which will color each object with a specific color, in order to see how things can be done:

 

2006939702_ScreenShot2021-05-20at5_54_30PM.png.43c9e4e92c1909a1e8ed6ac16b96a2d8.png

 

If we look at Haunted House:

 

249729323_HauntedHouse(1982)(Atari)_dbg_8bfff66d.thumb.png.276147afadec7e68779a78a029e2c569.png

 

in debug color mode:

 

250966375_HauntedHouse(1982)(Atari)_dbg_8c00128b.thumb.png.8cd5d7c71d3f4d94969afcefa31717ac.png

 

We can see the ghost is drawn using player0, the eyes are drawn using player1.  Then both objects are reused again in the status area.

 

  • Like 1

Share this post


Link to post
Share on other sites

I had no idea Stella could display debug colors like that. That is really useful. Thank you for detailing this!

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...