Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6067921
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T09:39:38+00:00 2026-05-23T09:39:38+00:00

from livewires import games, color #Creating and validating the pygame screen. scrwidth = 640

  • 0
from livewires import games, color

#Creating and validating the pygame screen.
scrwidth = 640
scrheight = 480
fps = 50
myscr = games.Screen(scrwidth, scrheight)
#Loading an image into memory to create an image object
wall_image = games.load_image("wall.jpg", transparent = False)
myscr.set_background (wall_image)
#Printing Arbitary Score
texty = games.Text(value = "Score: 2048321",
                   size = 70,
                   color = color.black,
                   x = 400,
                   y = 30)
myscr.add(texty)
myscr.mainloop()

For some reason, I am unable to print the score string in the position that I’ve assigned it to.

When I did the same thing without assigning variables to the given objects, I was able to do this successfully, but now I’m not that I’ve assigned it to a variable.

Any input would be appreciated. Thanks in advance.

EDIT: As requested, the working code.

from livewires import games, color

games.init(screen_width = 640, screen_height = 480, fps = 50)

wall_image = games.load_image("wall.jpg", transparent = False)
games.screen.background = wall_image

score = games.Text(value = 1756521,
                   size = 60,
                   color = color.black,
                   x = 550,
                   y = 30)
games.screen.add(score)

games.screen.mainloop()

Here we are! Working code:

from livewires import games, color

#Creating and validating the pygame screen.
scrwidth = 640
scrheight = 480
fpsy = 50
games.init(screen_width = scrwidth, screen_height =scrheight, fps = fpsy)
myscr = games.screen
#Loading an image into memory to create an image object
wall_image = games.load_image("wall.jpg", transparent = False)
myscr.background = wall_image
#Printing Arbitary Score
texty = games.Text(value = "Score: 2048321",
                   size = 70,
                   color = color.black,
                   x = 400,
                   y = 30)
myscr.add(texty)
myscr.mainloop()
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T09:39:38+00:00Added an answer on May 23, 2026 at 9:39 am

    I think i know whats happening, if i am not wrong you could be assuming that

    games.init(screen_width = 640, screen_height = 480,
    fps = 50)

    is the same thing as

    scrwidth = 640
    scrheight = 480
    fps = 50
    games.init(scrwidth, scrheight)
    

    But that may not the case, the arguments int Screen look for name=value pairs in no particular order, so just value pairs may not work. You could however do this

    scrwidth = 640
    scrheight = 480
    fps = 50
    games.init(screen_width=scrwidth, screen_height= scrheight, fps=fps)
    myscr = games.screen
    

    I am guessing since your size was not set properly and x,y in text are absolute variables, your text may be messed up

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

from functools import wraps def foo_register(method_name=None): Does stuff. def decorator(method): if method_name is None:
From a web developer point of view, what changes are expected in the development
From a desktop application developer point of view, is there any difference between developing
From what I've read, VS 2008 SP1 and Team Foundation Server SP1 packages are
From time to time I see an enum like the following: [Flags] public enum
From what information I could find, they both solve the same problems - more
From the Immediate Window in Visual Studio: > Path.Combine(@C:\x, y) C:\\x\\y > Path.Combine(@C:\x, @\y)
From time to time I get a System.Threading.ThreadStateException when attempting to restart a thread.
From my understanding the XMPP protocol is based on an always-on connection where you
From what I can gather, there are three categories: Never use GET and use

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.