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 / Does anyone here know blitzbasic?

Author
Message
Static
20
Years of Service
User Offline
Joined: 4th Apr 2004
Location: United Kingdom
Posted: 4th Apr 2004 11:06
Hi guys
I've just bought DarkBASIC pro but have only ever used Blitzbasic. I'd like to create an asteroids game. I know i could do it in blitzbasic but i'm not sure about DarkBASIC. Could any one here tell me the differences between the two.
Thanks
Julian
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 4th Apr 2004 13:38 Edited at: 4th Apr 2004 13:38
Hmmm, does the phrase 'red rag to a bull' mean anything to you?

Anyway, the obvious difference is that BB uses a handle-based system while DBPro uses an indexed system ... in other words you tell it object numbers rather than asking for them, or image numbers, or sound numbers.

Evaluation of expressions will be different, so I suggest that you enclose all parts of your expressions with brackets. ie, not v+5*x, but v+(5*x), to ensure that you get the evaluation your are expecting.

Beyond that, I don't think you'll have any problems.



@Everyone else, I've set the tone, please stick to it. If you go off topic I'll delete your post. This thread is not going to turn into an 'us' vs 'them' flame

*** Coming soon - Network Plug-in - Check my site for info ***
For free Plug-ins, source and the Interface library for Visual C++ 6, .NET and now for Dev-C++ http://www.matrix1.demon.co.uk
BearCDPOLD
20
Years of Service
User Offline
Joined: 16th Oct 2003
Location: AZ,USA
Posted: 5th Apr 2004 08:20
I remember using BB, overall I liked DB better once I switched, but the one thing I really liked was that handle system. I've since written some functions so DB starts to feel a little more like Blitz.



Then you could type it like myobj=LoadObject("stuff.x")

Crazy Donut Productions, Current Project: KillZone
Web Site Button Does Not Work, Visit Here: http://www.geocities.com/crazydonutproductions/index.html
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 5th Apr 2004 15:46
There is a plug-in on my site that does this kind of thing for you - it's the Extend1 plug-in. I'd rewrite your code like this:



It would run faster too as it picks a random start-point for the search for a free object.

*** Coming soon - Network Plug-in - Check my site for info ***
For free Plug-ins, source and the Interface library for Visual C++ 6, .NET and now for Dev-C++ http://www.matrix1.demon.co.uk
Monty87
20
Years of Service
User Offline
Joined: 8th Dec 2003
Location: not very deep in the west country, eng
Posted: 6th Apr 2004 00:20
just incase you could do with some help with your asteriods game, heres a code for "one i made earlier". to make it run you will need to save three different coloured circles (as bitmaps) in the same folder, under the names "gold.bmp","blue.bmp","red.bmp", and one equally small star shaped one as "spiky.bmp". unfortunatly its DBC code so you it might not work. if so could some kind soul translate it for him?

Monty
Monty87
20
Years of Service
User Offline
Joined: 8th Dec 2003
Location: not very deep in the west country, eng
Posted: 6th Apr 2004 00:25
its in that little yellow triangular source button because i messed the code snippet thing up.

Monty
BearCDPOLD
20
Years of Service
User Offline
Joined: 16th Oct 2003
Location: AZ,USA
Posted: 6th Apr 2004 09:26
IanM, your code looks beautiful. But, I noticed a C++ style variable declaration so...I assume you're talking DBPro, unfortunately I'm a Classic user at the moment--finishing up one project in Classic then upgrading.

Crazy Donut Productions, Current Project: KillZone
Web Site Button Does Not Work, Visit Here: http://www.geocities.com/crazydonutproductions/index.html
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 6th Apr 2004 17:01
Quote: "your code looks beautiful"


Stop it, you'll make me blush. But yes, the code and plug-in is for DBPro.

You could do the equivalent for DBC though - the FIND FREE OBJECT function picks a random starting point and searches from there for a free object number. It would still be faster than a sequential search. If you decide to do that, remember that the RND function only returns numbers from 0 to 32767

*** Coming soon - Network Plug-in - Check my site for info ***
For free Plug-ins, source and the Interface library for Visual C++ 6, .NET and now for Dev-C++ http://www.matrix1.demon.co.uk
Static
20
Years of Service
User Offline
Joined: 4th Apr 2004
Location: United Kingdom
Posted: 7th Apr 2004 14:01
Hey can you use Types in Dark BASIC pro like in blitzbasic or do you store everything in arrays?
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 7th Apr 2004 15:44
Yes, you can use types and you can store them in arrays.

Currently you cannot create a type dynamically and access it via a pointer, but that can be simulated using arrays, albeit not as cleanly as dynamic allocation.

*** Coming soon - Network Plug-in - Check my site for info ***
For free Plug-ins, source and the Interface library for Visual C++ 6, .NET and now for Dev-C++ http://www.matrix1.demon.co.uk
Static
20
Years of Service
User Offline
Joined: 4th Apr 2004
Location: United Kingdom
Posted: 7th Apr 2004 17:49
I also noticed that the TYPE and ENDTYPE commands are not in the command reference. Why?
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 7th Apr 2004 21:02
Select Help->Contents, select the Principles link, followed by Datatypes and Variables, and you'll find the information about types there near the end of the page.

*** Coming soon - Network Plug-in - Check my site for info ***
For free Plug-ins, source and the Interface library for Visual C++ 6, .NET and now for Dev-C++ http://www.matrix1.demon.co.uk

Login to post a reply

Server time is: 2024-09-22 04:26:52
Your offset time is: 2024-09-22 04:26:52