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 / sprite loops

Author
Message
rockabillypete
21
Years of Service
User Offline
Joined: 3rd Jan 2003
Location:
Posted: 11th Jan 2003 22:01
Hi do u have to put all sprites in the same loop. I have put 2 sprites with different players ie player 1 and two one uses keyboard and the other up down keys. it works or is it better to have sprite 1 gosub player 1 and same for 2 or keep what i got. it seems slow thou. I dont think the manaul is very good for new users and also the examples and user examples is much cope as they are not very eaasy to understand. most people including me need to keep asking question here if help was better then it would make life easier. Are the makers going to bring out a book as i did read that there is one on amazon but i cant find it.

thanx 4 reading cheers
music is life
IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 11th Jan 2003 23:14
You are right about the manual - you will not learn programming from it. I'm afraid I don't know of any books that will teach you, and many example you will see are... erm... not great examples of coding styles.

Just search on Amazon for 'darkbasic' and check the book section. You'll find it's released at the end of February.

As for how to arrange your code, I can only offer my opinions, and many others may disagree.

I like to break my code down into the smallest and most specific parts that I can. This allows each to be individually tested before being inserted into the main project, and also allows you to reuse them for later projects.

Make sure everything is readable. If you can't tell what a variable or function does from its name, you haven't named it right. And when you go back to it in 6 months, you won't have any idea of what it's for.

Then, when everything is working and you find things running too slowly, you first look for faster techniques, and finally rearrange code to make things faster.
rockabillypete
21
Years of Service
User Offline
Joined: 3rd Jan 2003
Location:
Posted: 12th Jan 2003 11:51
Thats really nice of you to take the time thanks alot for the advice. I have looked on co.uk and com but they both comr up with nothing i will still search. thanks again IanM

music is life
rockabillypete
21
Years of Service
User Offline
Joined: 3rd Jan 2003
Location:
Posted: 12th Jan 2003 12:02
which amazon co.uk or com
i still cant find it thanks

music is life
IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 12th Jan 2003 13:58

Login to post a reply

Server time is: 2024-05-17 17:58:52
Your offset time is: 2024-05-17 17:58:52