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 / Trouble with get image()

Author
Message
Monsieur Mort
19
Years of Service
User Offline
Joined: 12th Feb 2005
Location:
Posted: 19th Feb 2005 23:09
I'm trying to make some text I've stored as a .bmp wobble in a sine wave, just because it'd look cool as a title to stick on the front of the pong game I'm making as practise, but I've having trouble. I can't for the life of me see what's wrong with the code, but it seems that get image() is returning blank images - perhaps capturing from the screen instead of the bitmap?



Why do you sink I ave zees outRAGEOUS accente?!
Gil Galvanti
19
Years of Service
User Offline
Joined: 22nd Dec 2004
Location: Texas, United States
Posted: 20th Feb 2005 02:54
try "load image" instead of "load bitmap"

Video games…they can take you places unreachable, impossible, unfeasible. They put you in the book...they put you in the movie...they put you in a world, a world that before could only be imagined.
Monsieur Mort
19
Years of Service
User Offline
Joined: 12th Feb 2005
Location:
Posted: 20th Feb 2005 03:53
Doesn't help. But then it shouldn't, because GET IMAGE is supposed to take an image from the current bitmap, and if I've loaded an image it can't very well do that.

Why do you sink I ave zees outRAGEOUS accente?!
Dodo
20
Years of Service
User Offline
Joined: 8th Aug 2004
Location: eating lunch
Posted: 20th Feb 2005 04:50
get image is not returning blank images - you just aren't drawing to the screen . Try puuting set current bitmap 0 before the main loop, like this:



Part of solving the problem is actually noticing that the problem is there in the first place

Monsieur Mort
19
Years of Service
User Offline
Joined: 12th Feb 2005
Location:
Posted: 20th Feb 2005 05:03
Lol! Can't believe I didn't see that. That didn't help either though - I was really hoping it would but it doesn't seem. Does the code work for you if you use your own image?

Why do you sink I ave zees outRAGEOUS accente?!
wmf
19
Years of Service
User Offline
Joined: 6th Nov 2004
Location:
Posted: 21st Feb 2005 02:57
try this. moved the sync command and changed the x value because it was printing in the same position. '320-bitmap width(1)/2)+n'
Monsieur Mort
19
Years of Service
User Offline
Joined: 12th Feb 2005
Location:
Posted: 21st Feb 2005 04:04
Moving the sync didn't command, but I'm glad you spotted the missing +n. It's now pasting the image but not waving it. I'll keep trying

Why do you sink I ave zees outRAGEOUS accente?!
Monsieur Mort
19
Years of Service
User Offline
Joined: 12th Feb 2005
Location:
Posted: 21st Feb 2005 04:18
Ok here's a quick update - I've got it doing some precalc to speed things up, and I've decided the (n+i) bit shouldn't have been in brackets. Now the hole image is bouncing up and down as if that y value is the same for every value of n. I don't understand it at all.



Why do you sink I ave zees outRAGEOUS accente?!
wmf
19
Years of Service
User Offline
Joined: 6th Nov 2004
Location:
Posted: 21st Feb 2005 13:04 Edited at: 21st Feb 2005 21:54
this works but the size of the image changes the speed so play around with the values. there is probably a better way of doing it tho.

edit: changed val3 so speed stays the same with screen size changes.
Monsieur Mort
19
Years of Service
User Offline
Joined: 12th Feb 2005
Location:
Posted: 21st Feb 2005 22:49
Yeh, you don't need that for i=1 to 360 loop, just use inc i,10, and use my original paste image line, with 20* or 40* according to preference. I don't understand though, why did you change val3 like that, and why does it work? The weird thing is that I had based my latest version on the following titles screen for a retro pong game I'm making (display mode 320,200,32 for best effect). The titles work fine, but the code's got the same as my version of val3, not yours.



Why do you sink I ave zees outRAGEOUS accente?!

Login to post a reply

Server time is: 2024-09-23 12:16:24
Your offset time is: 2024-09-23 12:16:24