Latest Uploads
Invasion V ... prototype

rychan

Invasion V ... Prototype

rychan

Shields 64x64

Pakz

Ffs_Spam

Jayenkai

Hives Screen shot

rychan

Rpg Potion Sprites

Pakz

Forum Home

Python Sprites

UserMessage
Posted : Wednesday, 29 April 2015, 08:18 | Permalink
Hotshot


I got myself Raspberry pi 2 and just need 32GB Mirco SD Card

I will be learning about Sprites on the screen then moving round

I learn from this one http://programarcadegames.com/

There is one things that I am stump on is that when I create folder where my code and images in the same folder. It always keep getting error saying it cant find my image!

for example

I decide have know name like background image instead of calling saturnfamily1.jpg!

background_image = pygame.image.load("background.jpg").convert()

What wrong with this one above!?
Posted : Wednesday, 29 April 2015, 08:21 | Permalink
Jayenkai


WW Entries : 106
Is the compiler compiling to the same folder? And if not, does it copy the .jog image to the right folder?

-----
''Load, Next List!''
Homepage : http://AGameAWeek.com
Posted : Wednesday, 29 April 2015, 09:07 | Permalink
Hotshot


Is the compiler compiling to the same folder? Yes
does it copy the .jog image to the right folder? they all are in the same folder....

I think the reason why it got error is because I think the images is too big. The window I put is 800 x 600 where the images is 959 x 732.

I trying to resize the image in grafx2 but I cant seem find any icons that can resize the image!

I going have look gimp if they do it
Posted : Wednesday, 29 April 2015, 09:57 | Permalink
Hotshot


I have try Gimp 2.8 but graphics files is awful as they only save as

XCF Image files!

That suck!

I have notice you can do export files which is good...

I going post the code shortly
Posted : Wednesday, 29 April 2015, 10:01 | Permalink
Jayenkai


WW Entries : 106
Nah, Gimp's better than that. Change the filetype in the file selector.

-----
''Load, Next List!''
Homepage : http://AGameAWeek.com
Posted : Wednesday, 29 April 2015, 10:13 | Permalink
Hotshot


-->

I dont see anythings wrong with the code and graphics, sound, code all in the same folder but still get errors like

Traceback (most recent call last):
File "/home/pi/My Python/Game.py", line 25, in <module>
backgroundimage = pygame.image.load("background.png")
pygame.error: Couldn't open background.png
Posted : Wednesday, 29 April 2015, 10:15 | Permalink
Jayenkai


WW Entries : 106
Im sorry, I honestly can't hazard a guess at what the issue might be. This is one of those "have to be there" issues.

-----
''Load, Next List!''
Homepage : http://AGameAWeek.com
Posted : Wednesday, 29 April 2015, 10:24 | Permalink
Hotshot


FInally got Images on screen !

I used Jpg for background and png for player

I think PNG is better where JPG is image can sometime be blur....
Posted : Wednesday, 29 April 2015, 11:45 | Permalink
rockford


WW Entries : 3
If it's not the path, perhaps it was the case sensitivity of the image's name. Some languages and OSs require specific and exact case matching. Perhaps you tried to load "fred.png" but the file was called "fred.PNG"
-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 670|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
Latest Posts
Favourite Amstrad CPC Games
steve_ancell Sat 21:02
Shoutbox Topic - 319
steve_ancell Sat 20:52
Inside Donald Trump
rockford Sat 12:09
Any Feature Requests?
Jayenkai Sat 09:36
More Monkey Madness - With Ducks
rockford Sat 05:13
Arms on Switch
rockford Sat 05:02
Time for a new Android Test Doohickey
Jayenkai Fri 09:26
CSS-Me-Do - SoCoder2
Jayenkai Fri 06:28
Pillowcases for kids!
rockford Thu 16:15
Manchester Arena Explosion
Jayenkai Thu 02:04
More

Latest Items
Showcase : Hives
zzoom Fri 16:10
Dev-Diary : My Journey into NES Development
rychan Thu 12:31
Showcase : Flappadiddle
Jayenkai Sun 14:39
Snippet : QFind
Jayenkai Sun 13:02
Showcase : Tiny Blocks
Jayenkai Sun 04:08
Showcase : Read Error A
rychan Fri 05:13
Blog : All my makes!
Jayenkai Tue 05:48
Showcase : Infinitron
rychan Mon 18:03
Showcase : Quadoban
rskgames Fri 10:11
Blog : My Arduino experience.
steve_ancell Wed 17:02
Showcase : Roguelike Explorer
Pakz Fri 06:59
News : Newsletter #311
Jayenkai Thu 17:27
Link : Super Shapes Exploration Kit
Andy_A Thu 11:09
Dev-Diary : Sensitive - Arduboy!
rychan Thu 17:27
Snippet : Skylines
steve_ancell Tue 14:25
More

Who's Online
steve_ancell
Sat, at 21:32
9572AD
Sat, at 18:50
therevillsgames
Sat, at 18:00
rockford
Sat, at 16:19
shroom_monk
Sat, at 16:02
Jayenkai
Sat, at 15:42
spinal
Sat, at 12:08
rychan
Sat, at 08:56
rskgames
Sat, at 07:21
Pakz
Sat, at 04:16
Link to this page
Site : Jayenkai 2006-Infinity | MudChat's origins, BBCode's former life, Image Scaler.