Hi!
In this particular computer, here are the specifications:
Operating System
Windows 10 Pro 64-bit
CPU
Intel Core i5 3330 @ 3.00GHz
Ivy Bridge 22nm Technology
RAM
8,00GB Dual-Channel DDR3 @ 798MHz (11-11-11-28)
Motherboard
PEGATRON CORPORATION IPMH61P1 (SOCKET 1155)
Graphics
DELL E1911 (1440x900@64Hz)
Intel Adaptador de Vídeo Básico da Microsoft (Unknown)
PureBasic 5.71 LTS (Windows - x64)
I'm drawing a map that is 20x15 tiles, each tile is 16x16 pixels. The tiles are zoomed by a factor of 2 (making them 32x32 pixels), and the screen resolution is 640x480 pixels. Drawing the 300 tiles in the screen is taking on average 10 ms, which is making the movement sluggish. Here is a link with the source code for download:
https://drive.google.com/open?id=1B5u6M ... LxLOmJL7nr
You can move the sprite with the arrow keys. Why would DisplayTransparentSprite take so long to draw the tiles?
Thanks.
DisplayTransparentSprite is taking too long to process
-
- Enthusiast
- Posts: 115
- Joined: Sat Sep 21, 2019 4:24 pm
DisplayTransparentSprite is taking too long to process
You can check my games at:
https://ricardo-sdl.itch.io/
https://ricardo-sdl.itch.io/
Re: DisplayTransparentSprite is taking too long to process
Are u sure u have the debugger disabled?
For me its faster than 1 ms !
My quick test:
For me its faster than 1 ms !
My quick test:
Code: Select all
Procedure Draw()
Protected clk.q
TimeTaken = 0
clk = ElapsedMilliseconds()
For i.a = 0 To MapWidthInTiles - 1
For j.a = 0 To MapHeightInTiles - 1
DungeonMapSprites(i, j)\DrawSprite(@DungeonMapSprites(i, j))
Next j
Next i
SetWindowTitle(0,Str(ElapsedMilliseconds() - clk))
Heroine\DrawSprite(@Heroine)
For i.a = 0 To 1
For j.a = 0 To 1
PaddlesSprites(i, j)\DrawSprite(@PaddlesSprites(i, j))
Next j
Next i
EndProcedure
Re: DisplayTransparentSprite is taking too long to process
the integrated GFX card is probably very slow, as this is a very basic drawing operation and should be very very fast. Or may be a driver issue. You could try to switch to OpenGL subsystem to see if it does a difference
Re: DisplayTransparentSprite is taking too long to process
he has no driver installed... Normally it's Intel HD Graphics 2500.
Driver (Intel) : https://downloadcenter.intel.com/de/dow ... duct=65509 (Sorry ... german language)
Driver (Intel) : https://downloadcenter.intel.com/de/dow ... duct=65509 (Sorry ... german language)
-
- Enthusiast
- Posts: 115
- Joined: Sat Sep 21, 2019 4:24 pm
Re: DisplayTransparentSprite is taking too long to process
@Mijikai: Debugger or not debugger I got more or less the same result.
@Fred and @Bisonte: It could be some weak ass onboard graphic with no driver issue! I'll try to install the drivers and report back.
Thank you all for now!
@Fred and @Bisonte: It could be some weak ass onboard graphic with no driver issue! I'll try to install the drivers and report back.
Thank you all for now!
You can check my games at:
https://ricardo-sdl.itch.io/
https://ricardo-sdl.itch.io/
-
- Enthusiast
- Posts: 115
- Joined: Sat Sep 21, 2019 4:24 pm
Re: DisplayTransparentSprite is taking too long to process
It was a driver issue! I installed the video drivers as suggested and the rendering is fast now. From now on I might be able to suggest this if someone complains about the slowness. Thanks
You can check my games at:
https://ricardo-sdl.itch.io/
https://ricardo-sdl.itch.io/