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.

DarkBASIC Discussion / Some good tutorials

Author
Message
Nunez12
19
Years of Service
User Offline
Joined: 29th Dec 2005
Location:
Posted: 13th Feb 2006 03:54
I am very new to programming, and i need some very simple tutorials, that explain everything in detail. But are very simple and step by step. I don't care how long they are, just if there self explanatory or not. I want them to be, so....anyone know of these kind of tutorials. Also, I should note that I would like this tutorial to be more like a guide, what I mean is......I want it to go from the very start to advanced programming. Kind of like an all in one guide. So, my standards may seem kind of high, so it doesn't have to be perfect. Just try to tell me of a guide that you think suits my description best.
The Lone Programmer
22
Years of Service
User Offline
Joined: 29th Jan 2003
Location: California, USA
Posted: 13th Feb 2006 08:43
I have read some of your recent posts, and I would like to try and help you out.

I do not know of any tutorials because I did not go by one to learn what I know. I posted in these forums and in various instant messengers such as AIM or MSN Messenger.

What you should do is set a very small goal on what you would like to complete. Maybe for example you want to create a simple pong game or a program that does your math homework. I don't know. You should reply to this post with an answer for me on a very small and easy goal. Something that you wouldn't mind learning about. I will try to guide you through this small project, and I am sure many others will also.

I have school during the week, so the best time to get help from me is on the weekends.

Follow my instructions and we shall start from there.

The Lone Programmer

"Is The Juice Worth The Squeeze"
-The Girl Next Door
Nunez12
19
Years of Service
User Offline
Joined: 29th Dec 2005
Location:
Posted: 15th Feb 2006 03:24
I'm trying to get into programming small, but later build it up to be able to make games. So I would be interested in the pong game more, but do you think it is wise to start off with a game. Even a small one at that, I always thought you'd start off with something like the math homework, so you could understand the system. But if it was my choice, I would probably learn quicker with the pong....since that's what interests me.
P.S. thank you for being so helpful.
BearCDPOLD
21
Years of Service
User Offline
Joined: 16th Oct 2003
Location: AZ,USA
Posted: 16th Feb 2006 05:25
Pong is about math, linear equations to make the ball bounce and such.

Definitely try some basic games and non-game applications and without just copy-pasting a bunch of code, write them, think about what each part of the program does, and how it works to accomplish the overall goal. By starting small you'll be exposed to a few initially basic commands, and you'll learn how those work in and out, and as you branch out you'll find the need to research more different or advanced commands and your understanding will increase with each step you take.


I'm going to eat you!
The Lone Programmer
22
Years of Service
User Offline
Joined: 29th Jan 2003
Location: California, USA
Posted: 18th Feb 2006 01:11
Nunez
If pong is what is interesting to you then we should work on that one.
What was your Dark Basic version? Pro or Classic?

Anyways,
I should hope you know these commands

Those commands decide whether any of those keys are being pressed.
You might use them in a code such as


The 2D graphic commands you should become familiar with are:

Your paddles will be boxes and your ball will be a circle. For example the paddle may be


From now on I am going to add comments into the code. Hopefully you know what they are and how to use them. Comment with the ` key and REM. Some times I may get carried away and use //. If I use // just think of it a comment that you cannot use in Dark Basic.

Anyways so we know how to make our paddles and ball, along with how to detect if an arrow key was pressed.

Now lets sum it up a bit into a little piece of code:


That little piece of code will make a paddle and ball. It will then get moved when you push up or down. The reason I did paddleY-20 and paddleY+20 is so that when I move the paddle up and down the core of the paddle will be the center. That becomes more helpful when we come down to collision.

Now it may or may not get difficult for you. It is time for collision between our ball and paddle.


We want to make sure that the ball touches the paddle on both the x-axis and y-axis. Then we just tell the ball to do something else. Here is maybe a final code:


What that code does is when the ball hits the paddle, it bounces the other direction at an up diagnal direction. The ball speed x no longer matches the ball speed y so it is slanted.

I hope you get the idea a little.

Post back with your thoughts so far and we will continue.


The Lone Programmer

"Is The Juice Worth The Squeeze"
-The Girl Next Door

Login to post a reply

Server time is: 2025-05-23 16:54:56
Your offset time is: 2025-05-23 16:54:56