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 / virus pong

Author
Message
Eray
19
Years of Service
User Offline
Joined: 26th Apr 2005
Location: United Kingdom
Posted: 8th May 2005 01:28
hi im eray,
and i have been folowing the tut set down by chris K
and i have come up with this so far and i would like to be showen how to do some of the folowing things
+ win or lose game
+ score boreds
+ propare ai for player 2
+ to make the ball go in different place pershids a straight line
+ add textures instead of colours
+ turn the ball into a spikey thing
+ and make a lil arena so it looks good

you can show me how to do this in stages it would be most helpfull

here is were i am so far:


the point of the game is going to be to defend your hard drive with your bat against the virus (ball) and make sure that your enemys hard drive is wiped ( not realy but u know)

thanxs guys

e-ray has STOPPED talking
NanoBrain
19
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Portland, OR
Posted: 9th May 2005 05:44
eray,

Please edit your post above by adding REM comments to the code, so that we can easily understand the layout of your code. After this, I will help you. Thank you.


+NanoBrain+
Eray
19
Years of Service
User Offline
Joined: 26th Apr 2005
Location: United Kingdom
Posted: 10th May 2005 01:29

there you go all labeled

e-ray has STOPPED talking
Eray
19
Years of Service
User Offline
Joined: 26th Apr 2005
Location: United Kingdom
Posted: 14th May 2005 02:57
HELLLLLLLLLLLLLO some one
any one

TEACH ME !!!!!!!!!!!!!!!

e-ray has STOPPED talking
Vinnie alt
19
Years of Service
User Offline
Joined: 15th May 2005
Location:
Posted: 18th May 2005 23:19
Quote: " win or lose game"


Hi what winning and losing conditions do you want, cause you all ready have the score based winning and losing conditions, so i'm confused.

Quote: " score boreds"

What type of score board do you want, one in the arena, like you see in basket ball games? An on screen score board, or big floating numbers.

Quote: " prepare ai for player 2"

A.I.- what do you want it to do, can you be more specific?
Eray
19
Years of Service
User Offline
Joined: 26th Apr 2005
Location: United Kingdom
Posted: 20th May 2005 03:26
i can and i will

i have a simple win or lose that just ends the program i need it to say play again or somthing like that

i guess i dont rely need a high score bored

the ai just folows the ball and the ball well only ever goes one angle and i can still control it when i dont want to

and also how do u add textures and wat not


if u could talk me though some of this things

e-ray has STOPPED talking
David R
21
Years of Service
User Offline
Joined: 9th Sep 2003
Location: 3.14
Posted: 20th May 2005 03:28
Quote: "e-ray has STOPPED talking "


Too right (Not new here, but I randomly spotted this thread)

[url=www.lightningstudios.co.uk][/url]
Eray
19
Years of Service
User Offline
Joined: 26th Apr 2005
Location: United Kingdom
Posted: 21st May 2005 02:10
thanxs


for nothing


any one can help me ?

e-ray has STOPPED talking
Eray
19
Years of Service
User Offline
Joined: 26th Apr 2005
Location: United Kingdom
Posted: 22nd May 2005 20:36
ok can we start now

is any one can help me with this cause i would
be most happy to listen to any thing u have to
say aslong as it is revalent



im going to get a better web site soon.. so hold on
EvMaster
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: Australia
Posted: 23rd May 2005 17:59 Edited at: 23rd May 2005 18:03
To have a "You WON" or "You LOST" screen at the end would be pretty easy. I'd use the GOTO command like this:

(Click the source button at bottom right corner of post)
NanoBrain
19
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Portland, OR
Posted: 23rd May 2005 23:19
eray,

Sorry for such a delayed response following my last response. I have been quite tied up in several different issues in life. Let's get on to it shall we...finally huh?

I am going to show you a general answer to your questions above. Below is code which uses a "boolean" value variable to only run certain groups of code according to its value. This is a trick I learned when I was in classes learning Visual Basic 6.0.

There are two types of variables VB used, which were labeled focus variables. There was the form focus variable, which identifies which form should currently recieve input from the user. Then, there was the local or cursor focus variable. This variable is used within the form which currently has the focus, it is used to identify what part of the form will recieve input. As to clarify, a text box may have the focus for a user to input text, or a button may have the focus to be activated when the user presses the enter key.

So, here is a quick PONG game used to show this method put to work.



This tutorial is not complete, yet. I must go to work for the day, but I wanted to get something up, at least, so that you may start to study while I'm away. I will finnish this when I get home.


+NanoBrain+
NanoBrain
19
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Portland, OR
Posted: 24th May 2005 10:55 Edited at: 24th May 2005 10:56
eray,

Now that I've had the time, I have updated the source code I last posted. It is a bit more advanced, however, easier to skim through and understand its workings. I have placed the text highlighting/non-highlighting in a for next loop, using it along with a text array which holds the menu's text options.



I know you are wanting to know specific answers to specific questions. So, I will answer a few up until my time leaves me. First, you wish for the game to display "Play Again?" when the game ends. Simply, use the method of form focus. Place the group of code below into your code, and have the program give frmfocus the value needed to run it, instead of triggering the game to end. To clarify, the group of code below is set as form # 7, as intitated by the if end statement if frmfocus = 7.



Remember, that when switching forms, you must also reset the lclfocus variable to where you need the focus to be within the next form. For example, in the "Play Again?" menu, lclfocus equalling a value of 1 will cause the word "Yes" to be highlighted. A value of two will highlight "No". So, be mindful of this so to have full control of this method.

In these examples I did not use any functions, which I so dearly love to do, due to their great effieciency. If you wish for me to implement functions into these tutorials, I will do so for you.

About you asking about texturing, are you writing this program in 2D or 3D?


+NanoBrain+
Eray
19
Years of Service
User Offline
Joined: 26th Apr 2005
Location: United Kingdom
Posted: 25th May 2005 01:55

edit it a bit

im going to get a better web site soon.. so hold on
Eray
19
Years of Service
User Offline
Joined: 26th Apr 2005
Location: United Kingdom
Posted: 25th May 2005 01:57
crap my other one did not come on but it was a

THANX U

and ow i made my own title page can i use that and if HOW

im going to get a better web site soon.. so hold on
Eray
19
Years of Service
User Offline
Joined: 26th Apr 2005
Location: United Kingdom
Posted: 25th May 2005 01:58
ow and i understand it but carnt hock it up

dont do it 4 me just tell me how SLOWLY

LOL

E-RAY

im going to get a better web site soon.. so hold on
NanoBrain
19
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Portland, OR
Posted: 25th May 2005 06:10 Edited at: 25th May 2005 06:33
eray,

When you say "title page", do you mean "splash screen", which is an image that will pop up in most programs, that stays on the screen while the program is loading. If so, just use the same method.



Are you not understanding this method called focus? I don't believe you are. Therefore, below is a much more simple program for you to look at, which uses the method.



I hope this helps you to understand.


+NanoBrain+
Eray
19
Years of Service
User Offline
Joined: 26th Apr 2005
Location: United Kingdom
Posted: 26th May 2005 04:36
ok i will take a look at that but just incase could you show me how to link up my code plzzzzzzzzzzzzzzz

and thanxs

im going to get a better web site soon.. so hold on
Eray
19
Years of Service
User Offline
Joined: 26th Apr 2005
Location: United Kingdom
Posted: 26th May 2005 04:38
and also i ment like the main menu* i have now but i have drawn up one i would like to use instead ??????????

im going to get a better web site soon.. so hold on
NanoBrain
19
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Portland, OR
Posted: 26th May 2005 10:39
eray,

Yes, I will definitely show you how to link your code and implement your menu. However, first I need the media that is included in the main menu, and the idea, maybe a picture, of its setup.


+NanoBrain+
Eray
19
Years of Service
User Offline
Joined: 26th Apr 2005
Location: United Kingdom
Posted: 27th May 2005 04:02
can do how do insert pics on this thing ............. AGHHHHH

its just a basic one lol hmmmmmmm

like it has the bats and ball in a cool way then JACK IN and i want to be able to click on that to play and mayb an option to change stuff like the hardness

ok show me how to connect it all up

im going to get a better web site soon.. so hold on
NanoBrain
19
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Portland, OR
Posted: 27th May 2005 10:04
eray,

Well, that is the not the best explanation to go by. If you wish to display an image in your next post to this forum, type the address of your image, where it is on the web. Then, wrap the text in image tags. EX:


What is JACK IN? Please brainstorm your idea for a while, then come to me with a detailed, clear explanation of what you want. Until then, I do not know what to teach you. Sorry.


+NanoBrain+
Eray
19
Years of Service
User Offline
Joined: 26th Apr 2005
Location: United Kingdom
Posted: 30th May 2005 23:13
ok i mean JACK IN as like start the game kinda thing and i will try to put it on the web give me a min.........

and well there

www.freewebs.com/beanius there click that and go down until you find news

and thats what i want

im going to get a better web site soon.. so hold on
NanoBrain
19
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Portland, OR
Posted: 31st May 2005 09:14 Edited at: 31st May 2005 09:16
eray,

I checked your site around the only area which held the word 'news', and I am still confounded by what design you want. Is it your webpage, its design in particular, for a menu?

About JACK IN, use the frmfocus method. If you have to, then throw in some other useful variables which are handled in the same way. Like a 'setup' variable, placed in an IF statement, which will load images or makes sprites, or load sounds, etc...given it is at a certain state(EX:if setup = 1).




+NanoBrain+
Eray
19
Years of Service
User Offline
Joined: 26th Apr 2005
Location: United Kingdom
Posted: 1st Jun 2005 21:20
ok its not working hmmm u got an email i can send my main menu page to ?

and well after that we can get started i guess lol

im going to get a better web site soon.. so hold on
NanoBrain
19
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Portland, OR
Posted: 2nd Jun 2005 22:44
eray,

techi@easy.com


+NanoBrain+
Eray
19
Years of Service
User Offline
Joined: 26th Apr 2005
Location: United Kingdom
Posted: 4th Jun 2005 02:24
ok

sooo u need to know wat that is b4 we can get started OK

im going to get a better web site soon.. so hold on
Eray
19
Years of Service
User Offline
Joined: 26th Apr 2005
Location: United Kingdom
Posted: 6th Jun 2005 02:58
did u get it :/

im going to get a better web site soon.. so hold on
NanoBrain
19
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Portland, OR
Posted: 6th Jun 2005 04:25
eray,

Yes, I did recieve it. How would you like the user to be able to select a menu option? By using the up and down arrows and pressing RETURN. Or, by the use of the mouse?


+NanoBrain+
NanoBrain
19
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Portland, OR
Posted: 6th Jun 2005 04:26 Edited at: 6th Jun 2005 06:33
eray,

Below is a screenshot of a 3D version of your menu image you sent to me in email. If you agree, it is the image I will use as the background of your in-game main menu. The image below is a .jpg that holds the attribute of "lossy-compression", so for game sake, use one of the high quality images within the attachtment, for the game menu background.


Click on the image above to view it at full scale

Let me know what you think.


+NanoBrain+

Attachments

Login to view attachments
Eray
19
Years of Service
User Offline
Joined: 26th Apr 2005
Location: United Kingdom
Posted: 7th Jun 2005 04:23
woooooooooooooooooooooooooooooooooooow i belevie is the word

hmm how u do that

and yes mouse plz

and WOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOWWWWWW

lol

im going to get a better web site soon.. so hold on
NanoBrain
19
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Portland, OR
Posted: 7th Jun 2005 08:31
eray,

I am pleased you liked the image. I had fun creating it. I used BLENDER Modeler, a FREE open-source 3D game and post-production modeler. The image above is an example of post-produced rendered image. Blender also shares the ability to create low poly models and movie clips in several different formats.

I suppose I will code the interface and then post it with a tutorial on how I created it. Give me about a day, due to my job schedule.


+NanoBrain+
Eray
19
Years of Service
User Offline
Joined: 26th Apr 2005
Location: United Kingdom
Posted: 8th Jun 2005 01:11
ok then thanxs

and were can i get this program ????

thanxs again

im going to get a better web site soon.. so hold on
Robot
20
Years of Service
User Offline
Joined: 27th May 2004
Location:
Posted: 8th Jun 2005 02:22
Try here http://www.blender3d.com/cms/Home.2.0.html

The happenings of tommorow are behind us now
Eray
19
Years of Service
User Offline
Joined: 26th Apr 2005
Location: United Kingdom
Posted: 9th Jun 2005 05:24
thanxs

can u get that for free ?

im going to get a better web site soon.. so hold on
NanoBrain
19
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Portland, OR
Posted: 9th Jun 2005 12:21
eray,

Quote: "I used BLENDER Modeler, a FREE open-source 3D game and post-production modeler."



+NanoBrain+
Eray
19
Years of Service
User Offline
Joined: 26th Apr 2005
Location: United Kingdom
Posted: 10th Jun 2005 00:58
oooooooook i got it now lol

but it looks hard :/

confusing lol ill try to make sense of it

how are u doin with that tutorial

bi Xx

im going to get a better web site soon.. so hold on
NanoBrain
19
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Portland, OR
Posted: 10th Jun 2005 11:18
eray,

From them who have used other modelers than Blender as their preffered modeler, they say that BLENDER has a tough interface. However, BLENDER is truly my first modeler to use. Therefore, without previous knowledge, it is just like learning anything else. It takes time and practice.

About the turtorial, I am now working a graveyard shift...eww, so it will not be until the weekend that I have this tutorial complete.


+NanoBrain+
Eray
19
Years of Service
User Offline
Joined: 26th Apr 2005
Location: United Kingdom
Posted: 11th Jun 2005 01:23
okkk then lol

ill have to look at the tuts for blender
and thanxs

im going to get a better web site soon.. so hold on
NanoBrain
19
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Portland, OR
Posted: 11th Jun 2005 10:32
eray,

I have attached to this post a .zip file which includes 4 images, a logo.x model, and source code of the menu. Open and run it and study it for now. When I have a bit of time, I will try to write up a short tutorial. For now, enjoy and tell me what you think.




+NanoBrain+

Attachments

Login to view attachments
Eray
19
Years of Service
User Offline
Joined: 26th Apr 2005
Location: United Kingdom
Posted: 12th Jun 2005 00:10
ok i will study it thanxs

today the web site is active www.kinggamers.co.uk WILL BE UP SOON come and be a member
NanoBrain
19
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Portland, OR
Posted: 12th Jun 2005 05:22 Edited at: 12th Jun 2005 09:03
eray,

There are only a few sections of this code that I feel the need to explain their workings to you. At the top of the program there is declared a text array, which is filled with the text that will be placed beside the clickable options sprite images. As you will see, this array allows for a much more efficient way of coding this part of the menu.



Skip down a few lines from the above group of code to notice that I have included two background images, instead of just one. This is because these two images are smaller cutouts from the original fullscreen background image, I sent you some time ago. Open them in an image viewer to see what I mean. By changing the 3D backdrop's color to the color of the background in the images, you can create the same effect, but with higher framerate.

I have created and loaded two images as the buttons the user will press to select an menu option. The first is the button in the 'off' state, and the second in the 'on' state.

Next, the button images are made to be sprite images, and are all aligned to the fiftieth pixel on the x axis, and then placed directly below eachother, starting from the three hundreth pixel, then down. Since the images are each fifty pixels tall, I have given the for next loop a step value of fifty. There are five buttons total. Notice, how there are also five menu text array options. These two will coincide together within the main loop of the program.



Next, the 3D virus pong logo is loaded and the camera is placed in a location, as to make the logo appear in the upper-righthand corner of the screen. During the main loop, it is simply made to spin on its y axis indefinitely, using a single wrapped angle variable, incremented once per loop.

At the beginning of the main loop the background images are pasted to the screen. Pay attention, because their time of pasting is important. If I pasted them later in the code, if they came after the drawing of the text options to the screen, then part of the text options would be covered up by them. Also, usually when using images as a background, with this method, you would find the need to use the draw to back command. However, given that the images do not fill the screen, our 3D object is never covered up. I decided to leave this command out, due to the possibility of a faster framerate.



Now, we have come to the most tricky part of the main menu. At least, what can seem to be tough. Overall, I have used a for next loop to check for collision of the mouse and any one of the sprite images. If there is a collision, then the image of the sprite collided with, is changed to the 'on' state. Also, the sprites cooresponding text menu array slot's text is highlighted. If there is no collision, then the image is turned to the 'of' state, and its text is dimmed.




+NanoBrain+
Eray
19
Years of Service
User Offline
Joined: 26th Apr 2005
Location: United Kingdom
Posted: 12th Jun 2005 19:26
hmmmmm i get it

now do i use goto commands to link these to the main game ???
IF
so how ?


today the web site is active www.kinggamers.co.uk WILL BE UP SOON come and be a member
NanoBrain
19
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Portland, OR
Posted: 13th Jun 2005 11:44 Edited at: 13th Jun 2005 11:47
eray,

After all this time, you have not figured this out? Even after what all I have shown you? Its not that hard, just put some thought into it. I will not code everything for you. Below is my code including your code, showing you a method in linkng the two. It is messy, however, I am not working for perfection right now. I have also included two neat sounds for the menu. I have attached the sounds to this post in zip format. Simply, unzip this file to within the same location that the code below will be.



Below are a few code snippets showing the extra code thrown in.

The lines of code below are within the if statement, that if there has been collision with the mouse and a sprite button image.



The lines of code below show what happens to prepare the menu. One variable is used to determine if the menu needs to be setup(setup$). This section of code will unhide the button sprites and the logo, which are hidden when an option is selected from the menu.



There are a few things you should notice. I am using the focus method I tried to teach you. First, all of the code, excluding the intitial setups(look below(1)), are placed within a single repeat until loop. Then, each group of code(in this case we have two, one to run the menu and one to run the gameplay) is placed within repeat until loops. Then, frmfocus is used to enwrap those individual groups and their repeat loops. The frmfocus if statement is placed right before the setup$ if statement in each group(look below for a pusedo code example(2)).

1.)


2.)


Maybe with the code directly above, you will understand this method. Enjoy, and don't forget to get the attached sounds.


+NanoBrain+

Attachments

Login to view attachments
Eray
19
Years of Service
User Offline
Joined: 26th Apr 2005
Location: United Kingdom
Posted: 14th Jun 2005 04:44
dont get me wrong i am not trying to be lazey and i understand must of what your explaining

i understand that the game and the menu are in two different loops and why the menu had to be split up

and i will go though it bit by bit till i understand any over Q's i will post on this form

c ya (soon)

today the web site is active www.kinggamers.co.uk WILL BE UP SOON come and be a member
Eray
19
Years of Service
User Offline
Joined: 26th Apr 2005
Location: United Kingdom
Posted: 14th Jun 2005 04:53
i hate to come and complain so soon but in the main game loop its not how i created it the bat seems to be the ball and the ball just sits there and the other bat isint there but it still thinks its there :/ and well LOL LOL ROFL sorry but its pretty funny


just thought u better see cause i hate to complain

thanxs again

today the web site is active www.kinggamers.co.uk WILL BE UP SOON come and be a member
NanoBrain
19
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Portland, OR
Posted: 14th Jun 2005 10:36 Edited at: 14th Jun 2005 10:38
eray,



I have gone through the code quickly, and fixed it up to make it run semi-correctly. The objects now control correctly, and I have edited your print commands, and replaced them with text and center text commands, leaving the program with less code to have to run through. For example, you had three set cursor commands and three print commands, just to print the players' scores with a hyphen between them, to the screen. I have replaced this with:



This creates the same effect, but neater if I might say, and with less code. It is neater, because no matter how wide the text is, it will stay centered on the screen. I have also changed the 'end of gameplay' text, where when a player wins, text is presented on the screen for a period of time. There are a few other minor details I have fixed. So, look through the code.

Lastly, sorry to make you feel uncomfortable to ask me questions. I do not mean for you to feel this way. So, ignore the introductory lines of my last post.


+NanoBrain+
Eray
19
Years of Service
User Offline
Joined: 26th Apr 2005
Location: United Kingdom
Posted: 15th Jun 2005 03:46
ok i understand i am a bit of a slow learner but i thanx u and if theres any way i can re-pay u just ask like if u need an idea for a project im very good at coming up with games and application just not making them yet

so thanxs and i will go though it

cya soon

today the web site is active www.kinggamers.co.uk WILL BE UP SOON come and be a member
Eray
19
Years of Service
User Offline
Joined: 26th Apr 2005
Location: United Kingdom
Posted: 16th Jun 2005 02:19
ok it all looks in order and i have read it though again and again this is the part were i tell u i dont get somthing but guess wat i dont need to say that now

sooo ok when it comes up with the you lose thing can i do a little effect there were the screen kinda melts or somthing to do with the virus getting to your comp so u lose and somthing happends wen u win but wat effects can i have ????

and i need to make music ? any program ideas

i enjoy reading this forum and you are very nice to help me

today the web site is active www.kinggamers.co.uk WILL BE UP SOON come and be a member
NanoBrain
19
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Portland, OR
Posted: 16th Jun 2005 18:18
eray,

There are a few ways to create a melting effect. They will just take some thought. Think of what you would like to look like it is melting, and then figure how to achieve that look, via special movement of characters, or .avi clips, stretching of bitmaps, etc. I don't have much time to ponder right now.


+NanoBrain+
Eray
19
Years of Service
User Offline
Joined: 26th Apr 2005
Location: United Kingdom
Posted: 17th Jun 2005 03:27
ok then hmmm

well as i only have writing can it kinda slowly and randomly drop letter by letter like a sort of gungey effect

only if lose

if win play sound

hmmm but how ?

today the web site is active www.kinggamers.co.uk WILL BE UP SOON come and be a member

Login to post a reply

Server time is: 2024-09-23 23:24:02
Your offset time is: 2024-09-23 23:24:02