Hi....
Can any 1 give me a small example of VB game... so i'll get idea about how 2 make game in VB....
thnx
Printable View
Hi....
Can any 1 give me a small example of VB game... so i'll get idea about how 2 make game in VB....
thnx
Best game ever:
VB Code:
Do If Int(Rnd * 10 + 1) = InputBox("I've choosen a number from 1 to 10, guess it.", "Guess the number") Then MsgBox "Right!" Else MsgBox "Wrong!" End If Loop Until vbNo = MsgBox("Play again?", vbYesNo, "Guessing game")
lol!
ßädbö¥: you reckon if you made a game anyone would run it?? http://www.vbforums.com/showthread.p...hreadid=254491
Not this type of game a graphical game may be by using Direct X....or something like that.....
Atleast he doesn't use as many accented characters.Quote:
Originally posted by Electroman
ßädbö¥: you reckon if you made a game anyone would run it?? http://www.vbforums.com/showthread.p...hreadid=254491
;)
Well, you better get comfy. :D I estimate that it will take about 1000 lines for C++ (depending on depth and what you are doing,) so I'm thinking about 750 for VB.
How about Tetris? That sounds simple until you realize that it takes on average about 4500 lines. (Source: Game Programming for Dummies )
My point: games are not simple.
What kind of game do you want to make.... if you want to learn DX you should learn DX before trying to make a game in it..;)
Here is a small unfinished game I made in Dx when I started...;)....look at it...the code is kind of crap, but should give you an idea...think it is about 1000 lines....if I am not remembering wrong...
http://vbforums.com/showthread.php?s...light=opinions
I have one on 65000 lines to not using Dx if you are intrested...:D
Thnx Guys.... but i need source code...
NoteMe if u give it to me then i think it will b very usefull for me
thnx again....
Why don't you try the tutorial that comes with DirectX?
It only took me 1113 lines :)Quote:
Originally posted by Darkwraith
How about Tetris? That sounds simple until you realize that it takes on average about 4500 lines. (Source: Game Programming for Dummies )
Depends how many ":"'s you use ;)Quote:
Originally posted by robbedaya
It only took me 1113 lines :)
hes like this in all his other posts aswell...
BadBoy i dont believe your an adult
no ":"s, don't like them.Quote:
Originally posted by Electroman
Depends how many ":"'s you use ;)
Quote:
Originally posted by ßädbö¥
Thnx Guys.... but i need source code...
NoteMe if u give it to me then i think it will b very usefull for me
thnx again....
Oooops....I though the source was there....I will post it as soon as I find it...;)
Thnx NoteMe.... :) waiting 4 ur reply...:)
Here it is...I didn't test it...so I hope all the files are here.....I also found a couple of other more or less finished games that I have added. Feel free to learn from them but don't copy the source or sell it or what ever....
http://www.klubbscenen.com/bergen/div/Defender.zip
http://www.klubbscenen.com/bergen/div/SnakeDX.zip
http://www.klubbscenen.com/bergen/div/Ladybug.zip
Thnx NoteMe.... ;)
I think this will help me....
Should he be an adult??? If He's not, i think it"s great that he's allready interested in programming. I think you'd be surprised how many non-adults are on this forum.Quote:
Originally posted by LITHIA
BadBoy i dont believe your an adult
I don't look at my self as an adult...:D
Why would it matter if he's an adult or not?Quote:
BadBoy i dont believe your an adult
if u had read previous posts with him, alot of other peeps and me, u wud understand
I don't want to crap on the forum, but if you're seriously considering making games, SDL + C++ all the way!
DirectX relies on hardware way to much which can cause soo many problems, OpenGL is just alot better and more stable.
SDL is a library/DLL you can incorporate with your C++ projects that make OpenGL sooooo much easier. With not alot of code, you can make things move on the screen with a background images with opengl.
Sounds to me you just want source code to play with and modify, which won't teach you want you need to know and you'll get into the habit of copying and pasting code others have done and then say you made a game.
I just don't think VB and computers themselves are good enough to code games in VB right now. The VB language is just so much slower and not as optimized as C++, as well as the .NET crap that will slow everything down.
Just a thought :)
But I still think that game programming in VB can be a good way to start.....you will never see Doom 3 in VB, but if you want to learn you can learn a lot by starting off in VB.
OGL is a gret thing, but you have to use other libraries for sound, multiplayer etc. You don't need that with DX. An other thing that is great with DX is that there is one new version more or less every year. Can you say the same thing woth OGL.
And you are talking about that you don't have to write that many lines to make something move on the screen. But what will that help. If you want to make a real game, you will have to have the same planning and just as many lines of code in the end. In DX you have a lot of initialization in the start of the code. But that is code that you write and forget. If you have written it once you don't have to write it any more. Just copy paste. If you hate this so much why don't leave C++ and Vb alone and start with DarkBasic in stead...but once again. The finished game will have more or less the same amount of lines in the end....;)
Yes VB can be a good way to start off, but if he ever wants to be a game designer/programmer later on as a job, he will need to learn C++ and VB could get bad habits stuck in his head..... some people are like that and others have no problems going form VB to C++.... just really depends on the person.
DX has alot of capabilities, but if a problem happens, it could take a good while to figure it out and it won't work on all video cards. While you may need other libraries to do other things in OpenGL, you can just use SDL which allows OpenGL to be implimented and used so easily as well as having many video, sound and input capabilities. Would be nice if SDL was usable with VB, that would be something neat to play around with...
Not exactly sure why you say this though....
Quote:
If you hate this so much why don't leave C++ and Vb alone and start with DarkBasic in stead
Well, this is getting heated. :( Oh well, time to enter the fray. :D
I agree that DirectGraphics relies on hardware a lot more than OpenGL, but if you are on a Windows platform and you have the latest drivers, then its no problem.Quote:
DirectX relies on hardware way to much which can cause soo many problems, OpenGL is just alot better and more stable.
Remember when DX 8 came out and combined everything into one. After that version, hardware rendering for newer objects did not work on my Voodoo 5. OpenGL (at version 1.4 but I heard that there is a 2 in the works) still works on my system.Quote:
An other thing that is great with DX is that there is one new version more or less every year. Can you say the same thing woth OGL.
The moral of the story: (1) newer does not mean better and (2) work within the systems of your target audience.
Finally,
Its the tradeoff between implementation speed and processor cycles. They are usually inversely proportional. If you are a novice to game design, I would say VB is the way to go because it is easier to use. If you are serious in your undertaking, then machine code is the limit! :)Quote:
And you are talking about that you don't have to write that many lines to make something move on the screen. But what will that help.
Quote:
Originally posted by kasracer
Not exactly sure why you say this though....
What did you not get??? It's the truth...
If you were doing this in C++, wouldn't you use an Object Oriented Design?Quote:
In DX you have a lot of initialization in the start of the code. But that is code that you write and forget. If you have written it once you don't have to write it any more. Just copy paste.
Also, what is DarkBasic? :confused:
It sounded like you thought I really hated C++ and VB and was just whinning.....Quote:
Originally posted by NoteMe
What did you not get??? It's the truth...
Nope then you got it wrong....but you did whine (SP?) about all the extra code before anything happend on the screen. Yes you will have some lines in DX....but you also have a lot of lines in C++, and if you can't handle these small lines then why not just use DarkBasic....;)
Quote:
Originally posted by Darkwraith
If you were doing this in C++, wouldn't you use an Object Oriented Design?
Also, what is DarkBasic? :confused:
Of course you would make it OOP, C++ is OOP and you would be a foul if you didn't take advantage out of it...then the game developers could have stayed with C. But if you are making a big game in VB you should to take advantage of OOP. If not the game will be so big and difficult to handle and the programming will go slower and slower every day.....
[Edit]
DarkBasic is a "VB/DX-language" clone, that made only to make games. It combines the best from both worlds, and is only meant to be used on games. But what is the purpose of a language like that....:confused:
I don't like DarkBASIC that much, I tried it once (quite a while ago) and I didn't like the way it works its much easier to use normal VB and Dx then DarkBASIC. If your confident with VB then it would be a step backwards to use DarkBASIC, just my opinion ;).
I know there was a lot of issues in the start with the language. But after the professional version came out, it has become a great language for game developers. Jonatan S. Harbour has written a book on it (the same author as the DX book for VB) so there is probably something to get out of it....but a language that is only meant to be made games with is silly in my opinion....
Yea I think the version I used seemed to be a lot like VB5 and there were little things that you couldn't do that you could in VB, I suppose it is a ok way to learn game programming but I get want you mean by it being a silly idea :).
i hated dark basic when i tryed it.
Its interface sucked (it was full screen)
I didnt like the way you used it
And in general I hated it
And i am talking in past tense because i dont know what it is like today, unlikely to be much different if u ask me... stick with VB
If you didn't use the professional version....It's diffrent...;)....trust me....
how different? Was it full screen?
Personally, I like C++ for game programming because it is quick (albeit a little laborious at times.) Also, C++ has the feature of dropping into assembler to crank out even more speed.
DarkBasic looks like it might be good for game programming theory, but it does not look like something that I would take great strides to learn. :(
I don't think that I'll ever get as comfortable with C as I am with VB. Making big programs in it is really a pain, nevermind a game. :(
Agreed, I'll give it a good go tho :)Quote:
Originally posted by Venom555
I don't think that I'll ever get as comfortable with C as I am with VB. Making big programs in it is really a pain, nevermind a game. :(
I don't see any difference in developing large versus small programs in VB or C++. They are both managable in the same way..... so :confused:Quote:
Originally posted by Venom555
I don't think that I'll ever get as comfortable with C as I am with VB. Making big programs in it is really a pain, nevermind a game. :(
I think it all depends on what you're "used" to using.
I'd probably try using VB/.NET and put all the big number crunching functions into a C++ DLL ... isn't that quite a common approach?
Brings me to a question :D where is VB.NET in terms of speed compared to C++? or VB6 for that matter ? I've read somewhere that VB6's loops and the way it does its maths can be slow etc (??). Just wondering if there are benchmarks or something similar available?
I saw a bench mark test on the three once....but I can't remember where...but I remember that C++ was faster in most cases. But not all. And I remember that VB.Net was faster then VB6 in 50-60 % of the cases. But the big improvement in speed in .NET was when you where warking with Classes and Objects. .NET is much faster then VB6 on that.
Last benchmark test was someting like C++ and VB both trying to find the first 500,000 prime numbers and C++ did it in about 8 seconds while VB did it in 11.Quote:
Originally posted by tailz
Brings me to a question :D where is VB.NET in terms of speed compared to C++? or VB6 for that matter ? I've read somewhere that VB6's loops and the way it does its maths can be slow etc (??). Just wondering if there are benchmarks or something similar available?
I've NEVER seen a case where VB was faster than C++, it's pretty much impossible if the program was made correctly
It's not about the apps...it's about the functions...;)
ok, cool answers. 11 seconds over 8 is much closer than I expected.
thanx
See i really dont understand the fuss about VB -vs- C++!
For a few reasons:
1. VB can do everything we need it to unless creating an OS.
____(I know i dont plan on doing this so :) )
2. VB can be used to create Applications with simplicity.
3. C++, I might as well go use MASM32 or HLA with a visual
IDE.
4. VB properly optimized can be very outgoing.
5. IMO, y go backwards, VC++ does not even come close to VB
to me as far as its IDE, and the abilty to create software with
such ease.
I have experience with ASM, C, C++, & VB and over all of them
I choose VB.
When i get real bored and feel like doing things to really get
my brain smoken i'll play around with the other langs.
But i think the future will bring us something along the lines
of what vb is looking like, only better for example we could use
the real english structure to program with. As far as .Net goes
I refuse to get it. I have the framework and an IDE but patooie,
i dont like it i still prefer VB6.
My opinion is using the right tool for the right job.
VB is great for simple applications in which speed and resources is not an issue. This is why a lot of game development tools (map editors, scriptors, etc.) are built in VB.
C++ is great for intensive applications in which speed and resources are seen as a limited resource. This is why games are written in C / C++.
Assembler is great for situations where speed / resourses are seen to be valuable. This is why optimizations are done in assembler.
I have a vague understanding of .NET and the only thing that I heard about it is its ability to take 120938 programming languages and make 1 program out of them (IMO, a very bad idea.)
If you are looking for a PL that looks like english, then check out COBOL.
hey! try 3d lingo! ahihihi..keep ur cool peeps...
IMO ... LeRoi, .NET is far superior to vb6, I suggest you try it out :D
As for speed, hasn't vb always gone through several call's to get to whats its actually supposed to be doing unlike C where it just asks mr.processor for the result, hence Lower and Higher-Level etc
I'm never gonna be writing unreal3 by meself or anything that serious and tbh with the processors nowadays... anything I do that can only run (according to blokey above) 8/11ths of the speed... I'm not gonna give a toss about... is anyone else here?
I really like vb6 and i luv vb.nets' interface. I dont see why being able to have 120938 languages is a prob cause isn't it converting it to machine jargon anyway? from the looks of it, its just bringing C and VB closer together anyway, isn't it called C# now?
nuff rambling
NOTE: 120938 is just a number I threw up there. I really do not know the exact number of languages that you can combine.
Combining several languages together in one program is a bad idea. It hurts readablility. For example, can you understand:
This is a mismatch of LISP, C / C++, COBOL, and 80x86 assembler. Its very confusing to the person who does not know these instruction sets. This is the fact so much so that this piece of code will have to be rewritten so that the original intent coudl be seen.Code:
(DEFUN myFun (lis1 lis2)
switch (lis1[0])
{
case '1':
{
char *lis1 = &lis1;
listlen = strlen(listlen);
for counter := 1 step 1 until listlen do
MOV AX, 09
MOV DX, lis1
INT 21h
end;
}
default:
break;
}
)
If I was to write this (or at least what I intended :) ) in just C / C++, it would probably look like:
Furthermore, while programming like this, you will have to question what a LISP atom actually is and how it should be treated as such. Also, how would LISP (a functional programming language) and C / COBOL (procedural programming languages) would interact if they were combined?Code:
void myFun(string lis1, string lis2)
{
switch (lis[0])
{
case '1':
for (int I = 0; lis1.length(); ++I)
cout << lis1;
default:
break;
}
}
The solution becomes very complicated and vague very quickly. This is why combining programming languages is bad. (NOTE: Because C++ was made to be backward compatable with C, C++ suffers from this defect. This causes programmers to utilize different aspects of the langugage causing confusion, albeit not too severe.)
lol, it doesnt combine languages like that anyway (does it ??) i'm sure its just developed the current vb language and also created this C# lingo (btw I havent dived into the C# side much :)).
being able to do what you wrote would be EVIL and anyone who wrote code like that for me would be shot.
example, it takes across some good features from C into the vb world such as c=+1 (which I hated vb for not allowing)
does vb.net allow for ASM ?
btw. I realise that 120938 was a made up number :P
btw I've had pub luncheon so apologies for any tryping errors
Like I said, I really do not know much about .NET other than the fact that they combine PLs together into one language.
If someone as a sample of .NET code in which the programmer is using two PLs, post it or a link please. :)