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 / Need help creating a Block Breaker game

Author
Message
Ad87am
19
Years of Service
User Offline
Joined: 4th Aug 2005
Location: England / London
Posted: 13th Aug 2005 17:53
I have started on a block breaker game and it all went pear shaped so I decided to scrap it and start over again. I need some help with the menu system and linking to the main game.

http://www.Bevansfunbox.com
Louiz ofRohr
19
Years of Service
User Offline
Joined: 11th Nov 2004
Location:
Posted: 13th Aug 2005 19:48 Edited at: 13th Aug 2005 19:49
hehe

do you know what is a label?
hmm.. label is something you use to mark a line of you program..




The command "gosub" makes the program jump to the definied label..
Try to change this:

into this:



And that is all the help I'll give you now.. because "you
can search in these forums for: "menu", "menu system" or
any other similar expression"...

good luck

The worst foe lies within the self...
Ad87am
19
Years of Service
User Offline
Joined: 4th Aug 2005
Location: England / London
Posted: 13th Aug 2005 20:33
Here is my cod so far,

not sure how to make gosubs, also How do i define how for the object can go without it going out of the screen, so that it hits a wall or something

http://www.Bevansfunbox.com
Louiz ofRohr
19
Years of Service
User Offline
Joined: 11th Nov 2004
Location:
Posted: 13th Aug 2005 21:26 Edited at: 13th Aug 2005 21:27
ok..

Quote: "if mousex() => 50 and mousex() =< 50 and mousey() => 275 and mousey() =< 275"


this is your main problem..

look at this:


Notice that the click area is between the 1st point and the 2nd..
You are saying in your code that:
if mousex => 50 AND mousex =<50 (the same point?)
so there will be no space for the mouse click on.. =P

example:


now you have an interval from x1 to x2 (100)
and an interval from y1 to y2 (35)

so it is gonna bring you a imaginary button like this:



so, the code could be:


Programming is very easy.. the secret is to make a clear code..

The worst foe lies within the self...
Louiz ofRohr
19
Years of Service
User Offline
Joined: 11th Nov 2004
Location:
Posted: 13th Aug 2005 21:32 Edited at: 13th Aug 2005 21:34
About your other questions:
http://www.thegamecreators.com/?m=codebase
go there and search for "collision", "collision system",
"collisions".. and the search result will bring simple
examples to you..

HTH

The worst foe lies within the self...
Ad87am
19
Years of Service
User Offline
Joined: 4th Aug 2005
Location: England / London
Posted: 14th Aug 2005 00:01
Its just not working, I have got the rite values to put in but it does not work. I have done a screen dump and got it up on photoshop to get them, I got

x3.07-----------------x17.29
y16.92----------------y17.03
\ \
\ \
x3.07-----------------x17.29
y20.15----------------y20.26


I have attached the file that im using for the background, can you check if i have the rite coorordinates plz

http://www.Bevansfunbox.com

Attachments

Login to view attachments
Louiz ofRohr
19
Years of Service
User Offline
Joined: 11th Nov 2004
Location:
Posted: 14th Aug 2005 01:05 Edited at: 14th Aug 2005 01:54
Omg.. don't worry..

lets go:



I maked an example for you =]
In the top left of the screen there are the cursor's coordinates..
You can just decorate them and use in your own clicks..
Example:
execute the program and position the mouse at the start of
the "EXIT" and decorate the x position of the cursor..
Then position mouse at the end of the "EXIT" and decorate the
current position..
So you have 2 x cordinades:
1st: the start x of the button
2nd: the end x of the button

Go to the code and place the coordinates you know..
Do the same for y..


a function to help you:



to use this function you:
1st: Copy the function and paste some lines after the end of your code..

2nd: Call the function where you whant it.. but don't forget
to change "x1,x2,y1,y2" paramethers into your values..

example:




And it is all..
This is the 2nd easier way to make menu systems..

[EDIT] Use the image in the attachment to see the utility of the
top left [/EDIT]

Ok.. good luck, dude

The worst foe lies within the self..

Attachments

Login to view attachments
Louiz ofRohr
19
Years of Service
User Offline
Joined: 11th Nov 2004
Location:
Posted: 14th Aug 2005 02:20
LEVELS ARE OBJECTS, right?

Just the answer to your question in another thread =D
Of course you can make levels with 3D max.. because
Levels, Items, Characters, Trees, Weapons etc etc
are objects, ok?

The worst foe lies within the self..
Ad87am
19
Years of Service
User Offline
Joined: 4th Aug 2005
Location: England / London
Posted: 14th Aug 2005 02:23
I cant get the code to work, even tho I have got the background image in the same folder it is saying that it cant load it at "line 11" of the big code.

http://www.Bevansfunbox.com
Louiz ofRohr
19
Years of Service
User Offline
Joined: 11th Nov 2004
Location:
Posted: 14th Aug 2005 07:09
Se vira =]
Change the image into your own image blah blah blah
the important is that the image most to have that
black square on the top left =P

The worst foe lies within the self..

Login to post a reply

Server time is: 2024-09-24 01:28:22
Your offset time is: 2024-09-24 01:28:22