Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / How do I display a .png Image? Make it spin like a slot machine reel? Making Slot Machine Game

Author
Message
Wizzerd
15
Years of Service
User Offline
Joined: 25th Jan 2011
Location:
Posted: 27th Jan 2011 06:33
I have an image that I want to display but I cannot get it to display.

I open up Darkbasic pro then I type in.

Load Image "reel_normal.png", 1

wait key

But I get an error it says, Runtime Error 506- Could not load image at line 1.

How do I display this image?

How would I make the image spin after loading the image?

The image is a slot machine vertical reel strip.

I want to make a nice slot machine game for my first project. Can anyone help?

I loaded the image on this post

Thanks in advance.
CumQuaT
AGK Master
16
Years of Service
User Offline
Joined: 28th Apr 2010
Location: Tasmania, Australia
Posted: 27th Jan 2011 10:08
Is the PNG you are using interlaced at all? DBpro only supports PNGs without interlacing.

Malevolence: The Sword of Ahkranox
The infinite RPG
http://www.msoa-game.com
Phaelax
DBPro Master
23
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 27th Jan 2011 10:56
Quote: "Is the PNG you are using interlaced at all? DBpro only supports PNGs without interlacing."


DBP supports interlaced PNGs, I just tested it.

"Only the educated are free" ~Epictetus
"Imagination is more important than knowledge..." ~Einstein
HowDo
23
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 27th Jan 2011 11:37
is the image in the same place as the project code?

Dark Physics makes any hot drink go cold.
chafari
Valued Member
20
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 27th Jan 2011 16:27
This use to hapens when we load an Dba instead of an Dbpro. You have to save your Dba, and then when triyng to open the files, answer yes to create a Dbpro file, in order to give the hole path to you Dba to the correc folder. Try again and good luck


cheers.

I'm not a grumpy grandpa
Grog Grueslayer
Valued Member
21
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 27th Jan 2011 18:25 Edited at: 27th Jan 2011 18:36
Loads up just fine for me (see attached image). Although I had to find that file off the internet since it's deleted in your message.

Maybe it'll work if you resave the image from here: http://www.swish-designs.co.uk/images/reeltut/reel_normal.png

Edit: To make it spin you just move the image up but you paste the slot machine over the reel image so the entire image isn't seen. It'll give the illusion of spinning since the user doesn't see the entire reel image.

Wizzerd
15
Years of Service
User Offline
Joined: 25th Jan 2011
Location:
Posted: 27th Jan 2011 23:10
Thanks for the tip I was able to display the image. I am gonna sound like a complete n00b but how would you move the image up to make it seem like it is spinning? How what command do I use to paste an image on top of another image?
Grog Grueslayer
Valued Member
21
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 28th Jan 2011 20:50
The order you paste determines whats on top. You just paste the slot reel image first then paste the other image on top of it. Moving the image up is just moving the y coordinate you paste the image.



Login to post a reply

Server time is: 2026-07-16 12:19:41
Your offset time is: 2026-07-16 12:19:41