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 / getting the picure to the screen.

Author
Message
Anti Human
18
Years of Service
User Offline
Joined: 8th Oct 2005
Location: Good ol\' West Virginia
Posted: 16th Aug 2008 11:08
i'v done the drill, but instead of not finding anything usefull, i'm finding too much and getting even more confused then i was when i realized i have no idea how to get anything to the screen without 'print' or 'text'.

if some one would take the time (not sure how much) to type out what i need to do in the order i need to do it in, it might be enough to get me started.

i'v made 32x32 terrain images in ms paint, was planning on using a array + for/next loop to test out making a 10x10 grid map. But now i can't find any of the posts about it. I DIM'ed the array, placed values (0-2) in to it (0=Ocean, 1=sea, 2=plains); started on the nested for/next loops and froze..."how do i do that?".

i know it is a very noobish question, and i'm sorry (feeling more stupid atm then sorry, but i'm still feeling remorse for putting you all through this).

thanks for any help.
Anti

Today is a good day, at least compared to tomorrow.
And every day is a good day to die, because then, there is no tomorrow
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 16th Aug 2008 16:13
If it's just getting loaded images to the screen then the simplest way is to use the PASTE IMAGE command:


Does that help?

Anti Human
18
Years of Service
User Offline
Joined: 8th Oct 2005
Location: Good ol\' West Virginia
Posted: 16th Aug 2008 22:26
it should, am wondering though, is the '100, 100' the pixel count on where the top-left corner is? (like text 100,100)

thanks IanM

Today is a good day, at least compared to tomorrow.
And every day is a good day to die, because then, there is no tomorrow
DB PROgrammer
17
Years of Service
User Offline
Joined: 9th Feb 2007
Location: Nowhere But Everywhere
Posted: 18th Aug 2008 10:13
Yes images use the top-left corner like text does. If you don't want that you could look into the commands "sprite", "paste sprite", and "offset sprite"


I'm Pro grammer.
Anti Human
18
Years of Service
User Offline
Joined: 8th Oct 2005
Location: Good ol\' West Virginia
Posted: 18th Aug 2008 22:00
sorry it's been a couple of days since i'v replied, but thank you all for the help.

now that i'v actually had time to mess with it, i'v gotten pictures on the screen!

then i hit yet another snag.


i'm getting the 'image number illegal at line 41'.
line 41=Paste Image Map(x,y),a,b

now, i haven't changed that, but i did change For values. started with 3 for x and y, thought i'd check something out (randomize start at 0 or 1?)

i do have all the bmp's i'm loading (first time i'v used bmp with out talking about the russian APC in awhile). of the bitmaps, i'v seen oceans 0-2, plains 0-2, and barrens 0-2. but since none of them are being used, just ocean unless randomize starts at 1 (which this was suppose to test).

i'l mess with it a bit later, right now i'm going back to bed.

thanks again,
Anti

Today is a good day, at least compared to tomorrow.
And every day is a good day to die, because then, there is no tomorrow
DB PROgrammer
17
Years of Service
User Offline
Joined: 9th Feb 2007
Location: Nowhere But Everywhere
Posted: 19th Aug 2008 17:23
Quote: "That doesn't make any sense. Positions are the same and always start with 0,0 in the upper-left corner. It doesn't matter whether it's text, an image or a sprite."


"offset sprite" can change that.


I'm Pro grammer.

Login to post a reply

Server time is: 2024-09-27 18:23:47
Your offset time is: 2024-09-27 18:23:47