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.

2D All the way! / Problem with Sprite not showing.

Author
Message
Davecgt
20
Years of Service
User Offline
Joined: 6th Feb 2004
Location:
Posted: 20th Feb 2004 23:37
Hey All,
Work continues on the Zelda clone - i'm doin ok; i've switched from static screens to a scrolling screen setup but in the transition, for some reason my main sprite is'nt showing up. Any ideas?

Cheers All,
Dave
Pincho Paxton
21
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 20th Feb 2004 23:46
LOAD IMAGE "Sprite.bmp",20
GET IMAGE 20,0,0,32,32

You don't load an image, and then get an image. You are actually grabbing nothing.

Remove the get image.

Davecgt
20
Years of Service
User Offline
Joined: 6th Feb 2004
Location:
Posted: 20th Feb 2004 23:55
Yeah, i only had the GET IMAGE in as an afterthought, coz it still does'nt work when i delete it. I'm kinda thinking that the scenery tiles are being displayed on top of my avatar - what d'ya think?

Cya,
Dave.
Pincho Paxton
21
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 21st Feb 2004 00:11
Sprites are supposed to be on top of everything. I can see some odd programming, like all the CLS 50, but I can't figure out what is causing your problem. Maybe using load inside a function, that's unusual, try a subroutine.

PowerFang
20
Years of Service
User Offline
Joined: 6th Feb 2004
Location: Australia (But currently in the USA)
Posted: 21st Feb 2004 00:17
the problem is you are trying to put the main sprite at location
1600,1600
*********************
px = 1600
py = 1600

DO
SPRITE 1,px,py,20
*************************


That is no doubt off the screen.......try making px = 0 and py = 0 and you will no doubt see the sprite again.

Oh and obviosuly get rid of the get image
Davecgt
20
Years of Service
User Offline
Joined: 6th Feb 2004
Location:
Posted: 21st Feb 2004 01:20
Cheers all,

I set the sprite to appear at px = 0 : py = 0, and it did the trick! The help is much appreciated.

Bye,
Dave
Code Stealer
20
Years of Service
User Offline
Joined: 12th Feb 2004
Location:
Posted: 21st Feb 2004 01:24
Im trying to learn how to do the top down map, like Zelda. Can you shed some light on this most allusive of code problems?

GIve me more power!
PowerFang
20
Years of Service
User Offline
Joined: 6th Feb 2004
Location: Australia (But currently in the USA)
Posted: 21st Feb 2004 14:19
something like this?

http://www.geocities.com/baskers2000/demo.jpg

Thats a pic of my gameworld using my map editor.....you can enter the buildings and such. (old pic though)

Login to post a reply

Server time is: 2024-05-17 04:23:30
Your offset time is: 2024-05-17 04:23:30