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! / wait key?

Author
Message
Morloc
21
Years of Service
User Offline
Joined: 21st Mar 2004
Location: UK
Posted: 10th Apr 2004 22:26
ive got the wait key function at the beginning of my code,, which in theort just waits for a key yo be pressed then carries on. Ive found though that its not that responsive and sometimes you can press any key about 5 times before it registers and contines the code.

any ideas?

Morloc
Pincho Paxton
22
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 10th Apr 2004 22:34
Must be something wrong with your code, but you haven't posted it.

Morloc
21
Years of Service
User Offline
Joined: 21st Mar 2004
Location: UK
Posted: 10th Apr 2004 23:58
sorry didnt think i needed to

basically i wont paste all my code but ive got


it shows a splash screen then plays a sound then waits for a key to be pressed.

Cant see how anything else can effect it as its not in a loop or anything its at the top of my code after all the images are loaded.

Morloc
Pincho Paxton
22
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 11th Apr 2004 00:50
My test code works fine. Maybe the sound effect is causing a pause. Try my test code, and see if it works properly. If it does work OK, you'll have to put something after the sound effect. Maybe just a wait 1000 will cure it.






set display mode 800,600,16

do


wait key

print "hello"


loop

Morloc
21
Years of Service
User Offline
Joined: 21st Mar 2004
Location: UK
Posted: 11th Apr 2004 01:53
Hiya

Your code works fine.

Ive tried a wait and still no luck. remmed out sound and still the same. maybe its the backgrouns sprite im loading. I'll try it with other images and see. very strange though.

Morloc
Pincho Paxton
22
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 11th Apr 2004 02:37
Try Sync On that speeds up your code a bit. What is that sprite for at 0,0 anyway? Maybe you don't even need it there at all.

Morloc
21
Years of Service
User Offline
Joined: 21st Mar 2004
Location: UK
Posted: 11th Apr 2004 03:12
its just a splash type screen so it takes up the whole screen. is there a better way todo this? sync on is on btw.

Morloc
Pincho Paxton
22
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 11th Apr 2004 03:23 Edited at: 11th Apr 2004 03:24
There's a load Bitmap command that I use for screen pics.

Load Bitmap "Screen.bmp"

Doesn't have to be a .bmp it can be all of the usual image types.

It's just one line of code so saves making a sprite. Unless you go 3D then you use a plain.

Login to post a reply

Server time is: 2025-05-14 06:32:01
Your offset time is: 2025-05-14 06:32:01