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 / A tutorial to get started

Author
Message
Kieran
18
Years of Service
User Offline
Joined: 6th Aug 2006
Location: Hamilton, New Zealand
Posted: 29th Dec 2006 01:26 Edited at: 18th Jan 2007 07:37
Down For maintenance.....Untill i can fix the problems with it

Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 29th Dec 2006 01:34
It's good that you like to help the community. I personally haven't seen much of you, so I don't know alot about your programming abilities, but, I do know, that if you want to make a tutorial like this, you should go a little more indepth.

When I started programming, I wouldn't be sure at all about your code, and if you showed me:
I would have no idea what the two numbers are at the end.

Kieran
18
Years of Service
User Offline
Joined: 6th Aug 2006
Location: Hamilton, New Zealand
Posted: 29th Dec 2006 01:45 Edited at: 29th Dec 2006 08:14
EDIT: Tutorial II moved to first post

Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 29th Dec 2006 01:47 Edited at: 29th Dec 2006 01:48
Quote: "rotation# = rotation# + 0.01
rotate object 4,0,rotation#,0

If rotation# > 359.9999999999
rotation# = 0
Endif
"


Try just



[edit]
You'll also have to upload the media so that people can try it.

Kieran
18
Years of Service
User Offline
Joined: 6th Aug 2006
Location: Hamilton, New Zealand
Posted: 29th Dec 2006 01:49 Edited at: 29th Dec 2006 08:14
ok thanks zotoaster for the feedback it is appreciated
i find it easier to understand the rotation I did but some may try your way so im cool with that

indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 29th Dec 2006 01:49
good start kieran, dont forget to clean up your code afterwards.
Imagine restarting the level as well, or deleting all media before the program terminates.
this shows whats involved if you have to reload a new level etc..etc.

If you write a really good tute ill make a sticky for you, provided its not already covered by previous coders in the sticky section.

Kieran
18
Years of Service
User Offline
Joined: 6th Aug 2006
Location: Hamilton, New Zealand
Posted: 29th Dec 2006 01:51 Edited at: 29th Dec 2006 08:14
ok thanks indi I thought the code was well organised but thats my opinion maybe some people would like to organise it better so I'll leave it up to them.

Kieran
18
Years of Service
User Offline
Joined: 6th Aug 2006
Location: Hamilton, New Zealand
Posted: 29th Dec 2006 02:13 Edited at: 29th Dec 2006 08:15
EDIT: Tutorial III moved to first post

indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 29th Dec 2006 02:14
Ahh the code is fine, perhaps re write a more indepth component read me with it so your assuming the person has never coded etc..
its a great effort, thanks for trying to make this a better place for new coders, thanks for making our job easier.

Kieran
18
Years of Service
User Offline
Joined: 6th Aug 2006
Location: Hamilton, New Zealand
Posted: 29th Dec 2006 02:18 Edited at: 29th Dec 2006 08:15
no problem indi, I would have made it more in depth if I had the time too but im really busy right now

EDIT: ahh i just realised what you mean when you say
Quote: "Imagine restarting the level as well, or deleting all media before the program terminates.
this shows whats involved if you have to reload a new level etc..etc."


you mean you have to delete media etc so when the next level loads it wont still be there

well I kind of designed this tutorial for like a world with no different levels just one big world at the moment but thats a good point you have I may add that when I add to the tutorial.

indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 29th Dec 2006 02:28
good work mate.
when you get some more free time, Im sure many newcomers would appreciate it in advance.

Kieran
18
Years of Service
User Offline
Joined: 6th Aug 2006
Location: Hamilton, New Zealand
Posted: 29th Dec 2006 09:18
The tutorial is now more in depth so its easier for newcomers

Sixty Squares
18
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 29th Dec 2006 20:03 Edited at: 29th Dec 2006 20:05
Wow, this is a great tutorial for newcomers! I'm sure it'll help them out . Only I'm not sure this whole camera thing would be understandable... I still don't understand it now, lol. Why not use something simpler like SET CAMERA TO FOLLOW?

Quote: "`make the camera follow the sphere
posx#=cos(270-a#) * 30 + object position x(1)
posz#=sin(270-a#) * 30 + object position z(1)
Position Camera posx#,object position y(1)+6,posz#
Point Camera object position x(1),object position y(1)+6,object position z(1)"


Also, maybe you could explain the math behind this a little more or something.

Also, it'd be cool to include some media for it! Then people may be more willing to test it, instead of having to get their own textures and stuff. I know that whenever I look at a tutorial I like to see the final result first, lol.

Just some sugguestions,
-Sixty Squares

Kieran
18
Years of Service
User Offline
Joined: 6th Aug 2006
Location: Hamilton, New Zealand
Posted: 29th Dec 2006 21:18 Edited at: 29th Dec 2006 21:44
Thanks 60[]s not quite sure how the maths works in the camera functions but i understand how the commands work.

I uploaded the media so people can use it

Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 29th Dec 2006 21:43
Put them all into a zip folder

Kieran
18
Years of Service
User Offline
Joined: 6th Aug 2006
Location: Hamilton, New Zealand
Posted: 29th Dec 2006 21:47
thanks zotoaster i should've thought of that lol wasn't thinking straight

Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 29th Dec 2006 21:54
Kieran, there's about 3 textures missing, and an island model

Kieran
18
Years of Service
User Offline
Joined: 6th Aug 2006
Location: Hamilton, New Zealand
Posted: 29th Dec 2006 22:04 Edited at: 29th Dec 2006 22:36
I changed it so now its in a bit more detail and i gave them the island model and the water + sand textures to do the third tutorial (aren't i kind making a model for this ) so tutorial III is now complete and with proper media

Kieran
18
Years of Service
User Offline
Joined: 6th Aug 2006
Location: Hamilton, New Zealand
Posted: 30th Dec 2006 10:44
Tutorial IV now complete. it teaches how to use functions and how to make a monster spawn.

If any1 uses this tutorial and just isn't posting im waiting for feedback before i bother continuing this tutorial otherwise if no1 is using it theres no point

MonT
18
Years of Service
User Offline
Joined: 29th Oct 2006
Location: In your house, waiting for nightime
Posted: 31st Dec 2006 21:18
Kieran, thank you for this wonderful tutorial. It really helped me understand what the commands of Dark basic Pro do, and helped me understand what functions do what.

Two thumbs up.
Kieran
18
Years of Service
User Offline
Joined: 6th Aug 2006
Location: Hamilton, New Zealand
Posted: 12th Jan 2007 08:19 Edited at: 13th Jan 2007 01:02
so no-one found this useful? (apart from MonT)

Kieran
18
Years of Service
User Offline
Joined: 6th Aug 2006
Location: Hamilton, New Zealand
Posted: 13th Jan 2007 01:02
ok MonT no problem im glad someone found it useful, good luck with you game and thanks for the positive feedback

Kieran
18
Years of Service
User Offline
Joined: 6th Aug 2006
Location: Hamilton, New Zealand
Posted: 13th Jan 2007 01:04 Edited at: 13th Jan 2007 01:31
EDIT: World Tutorial V now complete and on first post

Zlatan
17
Years of Service
User Offline
Joined: 2nd Jan 2007
Location: Italy
Posted: 13th Jan 2007 01:13
cool kieran keep it up!

- GameDesigner
Kieran
18
Years of Service
User Offline
Joined: 6th Aug 2006
Location: Hamilton, New Zealand
Posted: 13th Jan 2007 19:53
thx im glad someone likes it, but apparently according to MR TDK my tutorial needs work because its got bad programming habbits so i may remove it until i can fix it.

Dracula
18
Years of Service
User Offline
Joined: 7th Aug 2006
Location: DBP Recreation of Castle Csejthe
Posted: 14th Jan 2007 15:47
Kieran, very nice. Thanks for the water+sand bit. Overall, it's pretty good. I think the only thing that you needed to elaborate on are the maths, like sine and cosine. The other commands with explanations are in the help files and paper docs. Why should you have to explain rotate object 1,90? It's almost self explanatory, and simply opening the user manual or help file will explain it. More complex and less well defined commands like memblocks, maths, vectors, etc., could stand some serious elaboration. Mayube TGC could produce some better docs on these? And maybe I could retake trig and pay more attention, now that I actually have a reason for it, lol...

Thanks again!!
TDK
Retired Moderator
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 14th Jan 2007 21:18 Edited at: 15th Jan 2007 14:04
Quote: "thx im glad someone likes it, but apparently according to MR TDK my tutorial needs work because its got bad programming habbits so i may remove it until i can fix it."


I'm just trying to raise the quality of tutorials. If this happens, everyone will benefit.

I'm not being nasty to people who post 'not so good' tutorials am I? Nowhere do I say "that tutorial is crap". Instead I'm giving constructive criticism and pointing out where they can easily be improved.

BTW: You can't remove it until it's fixed on here - you can only edit.

Badly written tutorials simply look like they have been written by noobs for noobs! If the author gets things wrong, the reader doesn't know any better.

I could outline every single problem in every bad tutorial on the forum, but that would simply antagonise the authors. I'd rather politely point them in the right direction.

But since you still appear to think that I am wrong, I will present my evidence here. If you correct the issues, I will gladly return and remove this post!

A tutorial to get started

The title suggests that it's for someone who's never programmed before and as a total noob to DB, I'm expecting it to hold my hand and 'get me started'.

You then provide a lengthy code snippet which won't even run!

This is because of:

1. A missing label (no colon at the end of heightcap2)

2. Your made-up commands. What exactly is 'Create object cube' in the function SpawnAlpha()??

To be honest it looks like it was written by someone with little programming experience - who didn't even run it before posting it.

* There are two main program Do..Loops
* You jump to a function and never return
* You exit a function with a Goto!
* You use float variables when they should be integers
* You use integers as parameters that the help files state should be floats
* Use of Goto makes it difficult to trace through
* Use of over-complicated sections of code - for example, why use:


rotation# = rotation# + 0.01
rotate object 4,0,rotation#,0
If rotation# > 359.9999999999
rotation# = 0
Endif


when you could put:

Yrotate Object 4,WrapValue(Object Angle Y(4)+0.01)

OK, it's more complicated, but the idea of a tutorial is to explain things like that in a simple way - provided you have the programming experience to know yourself...

Also, why manually calculate the camera position when you have the Set Camera To Follow command?

Reading it as a total noob, my comments would be...

Quote: "we use the command "Load image [Filepath,Image number]""


Where do the [ and ] brackets come into it?

Quote: "xsin# = xsin# + 1
ysin# = 15 * sin (xsin#)
position object 4,0,ysin#,0
"


Eh? What does this do?

So, as I said, it's not a very bad tutorial - it's just not a good one because it shows newcomers how to do the wrong things.

Just a little more work to fix the problems and you're well on the way to having a good tutorial.

TDK_Man

Kieran
18
Years of Service
User Offline
Joined: 6th Aug 2006
Location: Hamilton, New Zealand
Posted: 14th Jan 2007 23:36
ok ill try but my maths teacher hasn't covered trig yet

Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 15th Jan 2007 07:30
Good work kieran.

-db


indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 16th Jan 2007 00:43
Please also be aware TGC'ers that some tutorials by users, while presented in the best attempt to help you might also have issues with coding practices.

Coders who post tutorials might not have practiced all of the commands correctly and therefore you are being taught a hap-hazard approach to something that might be similar.

If a tutorial ends up being adjusted with comments like what TDK is suggesting and the author does nothing about it, it might not be a good place to get started.

Follow the tutorials moderators have made sticky posts as a good start, as they are tested before posting.

I know Kieran is trying to help but be aware, he might not be up to scratch to writing a definitive tutorial as of yet, and a good dose of editing would improve the mistakes laid out by other veteran members.

One Bad tutorial could make it harder for us in regards to even more questions, resulting in a negative aspect of what a tutorial is trying to achieve.

Grog Grueslayer
Valued Member
19
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 17th Jan 2007 10:08
I'm behind TDK and Indi 100%.

Things like this make it even more confusing for newbies (from Kierans first code snip):



Because the rem statement says "background" first then "text color" newbies will assume that the first "rgb()" is the background color and the second "rgb()" is the foreground. They won't know it's actually the opposite till they do their own experiments.

"Goto" must leave and never "return".
Kieran
18
Years of Service
User Offline
Joined: 6th Aug 2006
Location: Hamilton, New Zealand
Posted: 6th Feb 2007 08:10 Edited at: 6th Feb 2007 08:11
okay okay, im sorry for making your lives harder...i'll remove it, i was only trying to help the community

~Kieran
TDK
Retired Moderator
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 6th Feb 2007 08:21
Quote: "i was only trying to help the community"


We realise that - that's why we are offering you advice on how to change what you've written so it does serve the community.

You've not wasted your time - just correct the mistakes and all will be well with the world!

TDK_Man

Kieran
18
Years of Service
User Offline
Joined: 6th Aug 2006
Location: Hamilton, New Zealand
Posted: 6th Feb 2007 08:29
im re-writing the whole thing, 5 hours work and i still think its gonna get flamed like this one lol

~Kieran
Kieran
18
Years of Service
User Offline
Joined: 6th Aug 2006
Location: Hamilton, New Zealand
Posted: 6th Feb 2007 08:42
nvm i probably deserve the flaming i got...its my fault for writing a bad tutorial that got me into it so i deseve it...

~Kieran

Login to post a reply

Server time is: 2024-11-26 00:49:49
Your offset time is: 2024-11-26 00:49:49