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.

Newcomers DBPro Corner / when using load image, my images are flashing. Is it something with my coding wrong, or something unrelated?

Author
Message
cryson101
3
Years of Service
User Offline
Joined: 22nd Jun 2014
Location:
Posted: 27th Jun 2017 17:40
Im trying to work on designing a star wars fan project, a game/application that would make goal setting into a game.
I dont understand fully in my head yet how its all going to work, I have some ideas so far but thats it.

Anyways, when the program first starts, Im trying to load a title screen image. And that part works somewhat, except for the image flashing.
But when you left click, and the next image is supposed to load, it seems like the 2 images kinda merge, and there also flashing.
I want the flashing to stop, and the 2 images to be seperate. Like the one image loads, then a different one loads.
Can anyone help me with this? Thanks

LOAD IMAGE "C:\swgs graphics\titleimg.bmp",1
PASTE IMAGE 1,150,-15
LOAD MUSIC "C:\swgs graphics\into the trap.mp3",1
PLAY MUSIC 1
WAIT MOUSE
IF MOUSECLICK()=1
LOAD IMAGE "C:\swgs graphics\newcontinue.bmp",2
PASTE IMAGE 2,150,0
ELSE
WAIT MOUSE
ENDIF
WAIT KEY
LBFN
10
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 28th Jun 2017 22:19
Why not load your images and music first and then paste the images as you please? I used your program for a base and added my own media and it did work without flashing, though there are some things I would do differently. Putting in the entire address to the file is generally considered a bad idea. All of the references are from within the folder where your DBPro source and project files are located. Also, I would not leave spaces in filenames, but maybe that's just me. An example of what I would do is here:

+ Code Snippet






So many games to code.....so little time.
cryson101
3
Years of Service
User Offline
Joined: 22nd Jun 2014
Location:
Posted: 29th Jun 2017 07:27
I took your advice with the coding from the code snippet, but its still flashing, not as bad as it was before but. It seems like the flashing is alot quicker now, so it seems like its better, but still its flashing.
As far as using the entire adress, I had to. I get an error when I try to just use the filename.

The flashing wouldnt have anything to do with the editing I made to the original image I pulled from google images would it? I used paint shop pro, made an image, copied and pasted the sw image from google, and put wording in it. Im not very knowledgible of paintshop pro, layers and all, but I liked how the image turned out. I wasnt sure that had anything to do with it or not
LBFN
10
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 29th Jun 2017 15:08
I don't think the coding is the problem. I suspect something else is going on with your version of DB Pro. There was another coder that was having trouble with screen flicker recently. Here is a link to that thread. https://forum.thegamecreators.com/thread/219719

Check it out and see if this is something that might help you. If not, you could always search the word 'flicker' and you will get a number of threads where others have experienced a similar issue and you may find something helpful.




So many games to code.....so little time.
cryson101
3
Years of Service
User Offline
Joined: 22nd Jun 2014
Location:
Posted: 30th Jun 2017 04:58 Edited at: 30th Jun 2017 04:58
Ok I fixed the problem with the flicker, but now theres a new problem...I had to load the image, then make it a sprite. That was the only way it seemed to work, but some of the background is blue in the image.
I tried to use COLOR BACKDROP 0, to make the background black, but an error pops up saying

The program cant start bc MSVCR100.dll is missing from your computer. Try reinstalling the program to fix this problem.

It only comes up when I try to use the COLOR Backdrop, any suggestions? I went online and downloaded the dll file, but it didnt fix the error
LBFN
10
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 30th Jun 2017 13:17 Edited at: 30th Jun 2017 13:27
You didn't mention that you used the command BACKDROP ON, but I assume you did. Still, you shouldn't have to make a sprite to keep the screen from flickering, as neither of these programs causes screen flickering for me. I am using DBPro v 1.077 with Windows 10. What version of Windows are you using?


EDIT: You might try downloading and re-installing the DirectX runtime files: Link: https://www.microsoft.com/en-gb/download/details.aspx?id=35&e6b34bbe-475b-1abd-2c51-b5034bcdd6d2=True



So many games to code.....so little time.
cryson101
3
Years of Service
User Offline
Joined: 22nd Jun 2014
Location:
Posted: 30th Jun 2017 17:07
Im using windows 7 PRO, the version of darkbasic pro I downloaded the binary zip from here. https://github.com/LeeBamberTGC/Dark-Basic-Pro/releases
LBFN
10
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 2nd Jul 2017 21:31
cryson101, did you try re-installing the DirectX runtime library?



So many games to code.....so little time.
revenant chaos
Valued Member
10
Years of Service
User Offline
Joined: 21st Mar 2007
Location: Robbinsdale, MN
Posted: 24th Jul 2017 14:10
Hi Cryson, Have you tried enabling manual sync? The problem might be caused by DBPro deciding to perform screen updates when you aren't expecting it.

+ Code Snippet
Green Gandalf
12
Years of Service
User Offline
Joined: 3rd Jan 2005
Location: Cornwall UK
Posted: 26th Jul 2017 13:30
Cryson, You might also need to experiment with the screen settings in the editor "properties" panel. I had to choose fulldesktop to get satisfactory results (fullscreen for example just gives me a black screen ).

I also added a line at the start:

+ Code Snippet

That worked perfectly with my sample images and music.

Login to post a reply

Server time is: 2017-11-24 22:05:44
Your offset time is: 2017-11-24 22:05:44