Questions tagged [blit]

BLock Image Transfer - Involves copying one bitmap onto another using a raster operator.

Filter by
Sorted by
Tagged with
0 votes
0 answers
14 views

blit minimal example fails to keep plot visible

I am trying to get the Python maplotlib, Faster rendering by using blotting - Minimal example to work correctly. Faster rendering by using blitting The code from that example is below. The sample code ...
Stuart Lynne's user avatar
1 vote
1 answer
33 views

Is there a way to blit a semi-transparent image to a screen only while collision is occurring?

I have this code for an enemy character that has a hitbox of 20, 20 saved to the Rect obj pursrect. I also have code detailing a 200 pixel box that constantly follows the player around directly on top ...
T3CHN0BL4ST's user avatar
0 votes
0 answers
38 views

QT Mplwidget, plot with blitting

I'm a python beginner, and I'm developing my first GUI using QtDesigner to draw serial port reads to HF data. I have added four widgets to it. I'm using matplotlib.animation class, but I found that if ...
B. L's user avatar
  • 1
0 votes
1 answer
574 views

Graphics.Blit to copy material to texture gives incorrect results

I have a material using a shader I wrote. I am using HDRP. This shader samples a texture, does some manipulation to the texture, and outputs the result. I want to save the the result of this ...
Program232323's user avatar
0 votes
0 answers
343 views

Custom Render Pass Flips Render Texture Upside Down in Unity

I'm currently trying to create a custom render pass in Unity, and I've encountered a problem where the scene appears to be flipped upside down when using the effect I'm trying to achieve, even though ...
Darnell Champen's user avatar
0 votes
1 answer
91 views

PyGame "blit" not working, but there is no error message

For some reason, the PyGame blit command is not working for me. Whenever I run my code, nothing appears on screen, but there is no error message in the console. import pygame pygame.init() screen = ...
Manolo Gonzalez's user avatar
0 votes
2 answers
96 views

Image not rendering .bmp image C++ SDL

I am learning SDL, and I am trying to render a .bmp image, but it just displays a black screen. Here is the code: #include <SDL.h> #include "engine.cpp" #include <iostream> ...
Hudson Rocke's user avatar
1 vote
1 answer
180 views

Live plotting nicely with blit or Animation from matplotlib

Trying to be short and fast . I have a scatter plot I want to do in a for loop in live. So I have this : import numpy as np import matplotlib.pyplot as plt from matplotlib.animation import ...
et11enne's user avatar
  • 387
1 vote
1 answer
57 views

How to save an image after changing its resolution in Pygame?

Currently, I am a beginner when it comes to Pygame, and have been trying to allow the user to hand-draw digits into a canvas. I have managed to get the code to draw and clear the canvas to work. ...
Help_Me_Please's user avatar
0 votes
0 answers
40 views

Dummy camera clears the depth buffer

I have a camera set up to blit a texture to the screen. The camera is set to Don't Clear and has nothing in the Culling Mask. The blit is done with a basic unlit shader with ZWrite Off and ZTest ...
s1ni5t3r's user avatar
  • 701
1 vote
0 answers
160 views

Flickering windows for Matplotlib animation

I'm trying to create a simulator in Python with Matplotlib as the GUI. I'd like to have a number of different figures, all individually animated - i.e. one showing the main simulation window, another ...
Lord Cat's user avatar
  • 426
0 votes
0 answers
32 views

How do detect collisions with a 'Blitted' image [duplicate]

I am making a game where the tiles for the level game are being rendered onto the screen with the blit function and want the player to be able to collide with them. How would I go about doing this? ...
Manolo Gonzalez's user avatar
0 votes
0 answers
35 views

Updating ticks when using blit with Matplotlib

This is my first time asking a question on this platform. Sorry if I make any mistakes. Some context: I have a figure with three axes. The first one holds the video sequence, the second, the ...
José Alejandro Donate's user avatar
0 votes
0 answers
128 views

Funcanimation with bit=True is not updating x axis and not making sense with maximizing the window

I am trying to just have a simple life by getting a real-time plot functionality with blit=True but what I get is a plot with wrong x-axis limits and the plot changes when I maximize the plot window. ...
coder_but_not_smart's user avatar
0 votes
1 answer
149 views

How to matplotlib blit artist outside axes?

https://matplotlib.org/stable/gallery/event_handling/cursor_demo.html Im trying to make a cross hair cursor with a annotation on the right axis to show the Y-value everything works fine except when ...
Beginner's user avatar
0 votes
1 answer
10 views

How to clear screan.blit()

I am doing notification window and I want to do when massage pop up is shows for some time and then it clears it self. I know how to do that it waits with time.sleep() but I dont know how to clear ...
HIpex's user avatar
  • 75
1 vote
2 answers
197 views

blit opencv camera capture with pygame throws TypeError: argument 1 must be pygame.Surface, not cv2.VideoCapture

I'm new to pygame and never used it before and wanted to know how I can blit or display my webcam into the surface by using pygame and opencv but I keep getting the message: Traceback (most recent ...
Saltbottle's user avatar
1 vote
1 answer
50 views

Python: why the surface.blit function doesn't display all inputs?

I am trying to write a little digits game using pygame. The idea of the game is to guess the four-digit number randomly chosen by computer. But I am stuck at the very beginning I started by creating ...
Zhan's user avatar
  • 11
1 vote
0 answers
52 views

Can't update plot annotations while Blitting is True, but it's too slow when Blitting is False

import numpy as np import matplotlib.pyplot as plt import pandas as pd import matplotlib.animation as animation data = pd.read_csv('simulation_data_7.csv', index_col = 0, header=0) frames, bins = ...
SuperUser_Vermeylen's user avatar
0 votes
1 answer
157 views

Pygame text isn't showing up using blit or sysfont

I've been trying to put text over a sprite (a dialogue box I imported) but no text comes up. The current code is me trying to blit the text onto the screen but it isn't working. The code works on a ...
MidHat's user avatar
  • 1
1 vote
1 answer
50 views

The Objects placed in the background are flickering every tick instead of being placed at one place pygame pyhton

I am working on a game using pygame , I filled the background with a color and I want the background not to be boring and empty so i made some art and loaded it into the code using pygame.image.load() ...
Harsshavardhan Kannan's user avatar
3 votes
1 answer
187 views

Resolving multisample array textures

I'm currently trying to implement cascaded multisampled variance shadow maps. While my non-multisampled maps appear to be working fine, I'm having issues with resolving the multisampled array textures....
Adam Leach's user avatar
0 votes
0 answers
48 views

How to blit and move big images in python efficiently? [duplicate]

When i try to blit images for a parallax background in my game i run into FPS issues. I tried .convert(), .convert_alpha(), i made sure that the images are loaded and transformed just once - not in ...
vuvuwe's user avatar
  • 9
0 votes
2 answers
269 views

pygame Splitting sprite sheet then displaying each one not displaying all sprites

I am working on grabbing a sprite sheet and just automating cutting each sprite out and I was wanting to just display each on on my screen to make sure I am grabbing them properly but it will only ...
LostSilverCoin's user avatar
0 votes
0 answers
99 views

SDL2/C : How am i suppose to blit and refresh textures?

I'm trying to develop a platformer-like, but i'm stuck in the way i'm displaying all my textures. Pseudo-code: Texture background = bg.png Texture player = player.png display(background) while (run) ...
Zecksidd's user avatar
0 votes
1 answer
177 views

Pygame error: name 'blit' is not defined when trying to blit image onto rectangle [duplicate]

I am trying to edit this project: https://inventwithpython.com/pygame/chapter5.html. I wanted to change the rectangles to images, and I read that using the blit function is the way to do that. Here's ...
 0427092's user avatar
2 votes
2 answers
182 views

Image not printing to screen using 'Blit' Pygame

I am trying to make an Undertale like game in python - However I have a problem. When I try to 'blit' an image to the screen it doesn't show. I am 'blitting' a heart and I have rescaled it to an ...
Joshilovessnow's user avatar
0 votes
2 answers
57 views

Displaying an image with pygame

I am having a problem with displaying an image in pygame. The image is in the same directory/folder but it still has an error. This error popped out of the blue and I'm not sure how to fix it... My ...
Dev Andra's user avatar
0 votes
1 answer
514 views

how can we get rid of the blur in pygame image?

import pygame as pygame , sys pygame.init() size = (700,500) window_game = pygame.display.set_mode(size) print(pygame.mouse.get_cursor()) _run_ = True class ...
thenoober's user avatar
1 vote
1 answer
186 views

How to make text-rects appear one after another, after a delay in pygame

hoping to get some help regarding blitting text-rects in a sequence, a small delay of about a second between them. I've managed to get pretty close however my most recent attempt repeats the process ...
JoelGR's user avatar
  • 25
0 votes
1 answer
94 views

pygame "invalid position for blit"

I am trying to make a game but when I run the code the game makes 5 enemies appear on the screen. It says "invalid position for blit". However, I don't know where to put the blit otherwise. ...
The Amazing Spiderman's user avatar
0 votes
1 answer
221 views

Pygame TypeError: invalid destination position for blit

I'm starting to learn pygame and today I get "TypeError: invalid destination position for blit" and I don't know how to repair my code. If someone know where I missed, please help me! Python ...
kapurdok's user avatar
0 votes
1 answer
18 views

Each blitted image in list disappear instead of remaining on screen. I wanted to fill up the whole screen with image as it blits on random locations

import pygame import random pygame.init() screen = pygame.display.set_mode((476,800)) clock = pygame.time.Clock() win = pygame.display.set_mode((500, 600)) pygame.display.set_caption("DOGGO GAME&...
ranranran001's user avatar
1 vote
1 answer
38 views

pygame display becomes unresponsive when clicking outside of the display

I am very new to using the pygame library, and graphics in general. I have a recursive function that is solving a sudoku puzzle by means of backtracking. I'm trying to use pygame to visualize this ...
NewBoard's user avatar
  • 184
0 votes
1 answer
109 views

Pyton - Pygame - stuck refreshing blitting image on screen [duplicate]

Hi there and thank you for your time reading this. This is related to the project I'm making. It's a reaction test game. Basically, Arcade buttons with LEDs light up, and players need to press them to ...
monchmercader's user avatar
1 vote
1 answer
540 views

Previous screen is not clearing in pygame [duplicate]

Here I'm trying move which is blotted on the screen but the image moving without clearing the previous one balloon=pygame.image.load("BALLON 1".png) Bal_x=0 while true: for event ...
raju's user avatar
  • 33
1 vote
1 answer
47 views

Pygame animation doesnt work for the left movements, only right movements work

I have this pygame program where I animate the character's movement, everytime i press A or D, the x coordinate changes and the character blits an image of itself moving. The right movement, jump and ...
captainchungus's user avatar
1 vote
1 answer
173 views

Pygame: font.render() gives "TypeError: Invalid foreground RGBA argument"

I tried to make a total clicks bar with screen.blit() (also i want it to update the text when you click), I tried text = font.render('Your total clicks are',totalbal, True, WHITE) but it doesn't ...
Zgn's user avatar
  • 132
0 votes
0 answers
55 views

Blit function in python

Is it posible to write a function like this in python, but without the blit function? def display(self): x_pos = [50, screen_x-250] comb = zip(self.spaceships, x_pos) for s,x ...
hee's user avatar
  • 1
3 votes
0 answers
206 views

Stitch multiple pngs with Jimp

I need to stitch multiple pngs into a long png, and I believe I can use Jimp's blit method: // blit the image with another Jimp image at x, y, optionally cropped. image.blit( src, x, y, [srcx, srcy, ...
pangpp's user avatar
  • 165
1 vote
1 answer
63 views

How to show text when true

I want to show a text on the screen when a variable changes to True. The Text "Game Over" is show for a very short period of time with this code but I disappears after less than one second. ...
Doritito's user avatar
2 votes
1 answer
502 views

How to draw object on screen?

I want to display an each object of the class "Obstacle" on the screen. The objects are stored in the list obstacle_list. I dont get an error message, but the window just freezes and no ...
Doritito's user avatar
2 votes
1 answer
84 views

pygame : Trying to use the "area" tag in Surface.blit()

I'm trying to figure out how to use the area argument one can pass when blitting a pygame surface. Picture a isometric rpg view where the camera is following the character. My code is working fine as ...
Zelus's user avatar
  • 23
0 votes
1 answer
614 views

Pygame: invalid destination position for blit [duplicate]

First, let me to preface this by saying I am a beginner with Python, only made a few programs, so this code probably looks very messy. I am trying to familiarize with pygame by making a small pacman ...
Mudalin's user avatar
  • 23
4 votes
1 answer
797 views

How to animate Poly3DCollection using FuncAnimation with blit=True?

I'm trying to animate a rotating cube. For that I use Poly3DCollection and animate it using FuncAnimation: anim = animation.FuncAnimation(fig, visualize_rotation, fargs=[collection], ...
fdermishin's user avatar
  • 3,570
1 vote
1 answer
204 views

Pygame rotozoom rescaling the image out of bounds

I want to display an image of a star that grows bigger by 1% every second. I use the pygame.transform.rotozoom function to do so. When using rotozoom, the star indeed grows bigger, but its drawing ...
Zene0's user avatar
  • 25
1 vote
1 answer
122 views

Pygame surface resize

When I make window resize, surfaces boundaries not resizing as window do. Text render at main surface in starting window boundaries (600x340). Why? Also a render images (I cut this code part to ...
RedSubmarine's user avatar
2 votes
1 answer
778 views

Double buffering in x86 VGA

To bring back some memories I decided to sit down and code a little assembler game in VGA mode 13h - until the point I realized the visual output is flickering as hell. At first I suspected it might ...
obscure's user avatar
  • 12.1k
1 vote
1 answer
151 views

How to make an imported module blit onto a surface from the main script?

In my main file I have a surface called win. I import a module like so from draw import *. def draw(image,x,y): win.blit(image,(x,y)) This is a function from draw. It doesn't work because win is ...
bad_coder's user avatar
1 vote
1 answer
169 views

how to clear text on a window in pygame

In my game That I am making. I am trying to resolve this problem that I Have with the game over screen. the problem is when you die it says 'You died' then I put 'Play again' or 'Quit'. If you press ...
Zina's user avatar
  • 159

1
2 3 4 5 6