pouët.net

If I where to make a demo in VB...

category: general [glöplog]
[Shrugs] i don't get the basic concepts of 3d code or vertex/pixel shaders and i've been doing this shit for close to 20 years. Compression is another matter though... =-)

(i did start writing a demo in Blitz BASIC for a laugh, i'm easily amused... =-)
added on the 2003-10-21 20:21:10 by TMR{C0S} TMR{C0S}
Quote:
Perhaps I'll read some tutorials about graphic buffer in Java and rewrite my effects. However, something fucked up while trying to install an SDK of Sun yesterday. Oh,. I remembered! It was an internet installation, I am offline at home. Ugh,. where can I find a full install of some Java compiler/interpreter? I have to start, can you suggest something I can download and then install offline at home???


You can find Windows offline installation from here:
http://java.sun.com/j2se/1.4.2/download.html
added on the 2003-10-21 20:22:30 by aikarele aikarele
Shiva, cmon man. A good demo doesnt need to contain 3d vertex/pixel shaders at all. A good idea, or thoughtfull message can do the trick. And if thats the game hes at, it makes no difference if it was made in basic, VB, C or asm
added on the 2003-10-21 20:27:54 by NoahR NoahR
Tomaes: I do PHP for a living, but recently (and as a matter of fact I am working on VB as I type) I got involved into a VB project that I would give anything to get out of.

The problem I have been trying to solve all day (just to give you an idea) is that I need a library that does HTTP requests to a server, using POST and has the ability to operate with proxy servers.

- The free ASPTear.dll doesn't do proxy servers
- The WinHTTP and ServerHTTPXML Microsoft libraries do, but they don't support the damn Win9x boxes.
- The Windows port of (GNU)libcurl (which was my first choice btw) is impossible to use under VB. The DLL wrapper functions crash like crazy.

So that's how my life is. Like it?

I think if this thread goes on, I'll explain in great detail the differences of Empty, Nothing and Null constracts of Visual Basic. You have been warned.
added on the 2003-10-21 20:52:10 by moT moT
If a demo is good, it doesn't matter what language was used for coding/scripting/whatevering. However, it's my belief that lower level programming allows for more flexibility.
it's teh man, not teh languaeg...
added on the 2003-10-22 10:20:54 by FooLman FooLman
"If i where to write a prod in VB, would it automatically suck because of it?"

Let's say it's not starting the thing with an advantage on your side. VB produces very slow code, but code tends to be less important in demos nowadays, the most important is the artistic feel behind the production.

Anyway, if you wish to start coding with good tools, i'd advise Visual c++ .net (better C++ langage support than vc6), a profiler like intel VTune performance analyser, a good old assembler (like NASM, still usefull in some cases), and as a "critical part C/C++ compiler for CPU bottleneck situations" i'd advise VectorC 2 by Codeplay: http://www.codeplay.com.
added on the 2003-10-22 10:33:41 by nystep nystep
moT: if you can't find the lib you're looking for maybe you should, OH I DON'T KNOW, write it yourself?
added on the 2003-10-22 13:13:29 by sagacity sagacity
aikarele: Thanks! Do you believe that this is the page I downloaded at first, but didn't see there is also a link "offline installation"? :P
added on the 2003-10-22 17:40:07 by Optimus Optimus
Oh,. quite big! I hate compilers/SDKs which don't fit in one disk :)
added on the 2003-10-22 17:41:34 by Optimus Optimus
I thought I once tried to compile a plasma effect for Powerbasic and it was even slower than Quickbasic. (got half speed). But of course, just a programm using arrays and only integer, I don't know it's speed in other aspects like floating point. Also, it was a version I tried, perhaps even 5 years ago. The nicest feature for me, was that you could easilly use assembly inside your basic code by just putting a ! in front of every asm command. I will download the trial version now and see..
added on the 2003-10-22 17:47:28 by Optimus Optimus
Optimus, no prob. If you decide to install it, feel free to check out our Assembly 03 introAssembly 03 intro, which uses the latest and greatest features of Java 1.4.2 ;-)
added on the 2003-10-22 18:14:21 by aikarele aikarele
Great! That demo was the one I wanted to see but couldn't run on my PC in Greece, because I was simple bored to download a new version of Java. I'll run it at home now, however my PC is quite old to run it at a descent speed :)
added on the 2003-10-22 18:19:34 by Optimus Optimus
Powerbasic seems to include everything I was missing in Quickbasic and not only.

The most stupid things of Quickbasic are:
* 64kb limitation in arrays (and in the total size of all variables, when not using $dynamic. With $static it's just a bit faster)
* No bit shifting. Fortunatelly, there is an integer division or I can make some precalculated arrays (which will take memory though) for some things, but bit shifting would make everything much easier and faster!
* The most annoying thing is that there is no support of 8bit integers! Only 16bit and 32bit ones. And also, only signed ones. That's very vital for me!
Do you know that most of my effects in quickbasic don't use a buffer? The reason is that for VGA, I would have to use an 8bit array of 64000 bytes for that. The smallest thing that I can use is 16bit integer and a 16bit array with 64000 places is impossible, because it would take 128000bytes and there is an 64kb limitation! I can only have an array of 32000. If I did an effect that needed a buffer (typical 2d effects that writes from up to down to the vram, in a common serial way, can be done without a buffer and look smooth without flickering or anything) then I had to split the screen in 2 arrays, each of 32kb :P Of course, I could use just one 32000 values 16bit array for the whole screen buffer, put two pixels in each 16bit value and then I had to do a lot of operations (and there is no shifting, ugh!!!) just to read or write pixels inside that. Or I can use a lower resolution for my effect, something I did in few effects. Also, another way for having a byte array would be to use chr$ and asc$ but I have tried it with a 320*200 fire effect and it's deadly slow, the conversion actually :P I still can't believe, how much are lost, for that little thing..

There must be more, but I have to go. I just wanted to write some things..
added on the 2003-10-22 18:57:30 by Optimus Optimus
However I just thought that it can be easy to have a VGA buffer by using DEF SEG or VAR PTR and such commands. I'll have to think it at home..
added on the 2003-10-22 19:01:23 by Optimus Optimus
Yep. The essential putpixel in Quickbasic is

DEF SEG = &HA000
POKE x + y*320, pixelcolor

But if you want to use a buffer, then you'd create a dynamic array(64000) of string*1 (char), and set a varptr and def seg to that instead. Copying from the buffer to the screen in QB is the tricky part. I use a memcopy function from an ASM lib for QB (call it cheating if you want, but it works) in this manner:

copy blank 64k buffer to virt scr buffer
poke pixels into virt scr buffer
copy virt scr buffer to vga
repeat

I'd release the source to Smackdown and Cack 2 sometime, but a) they need QBX and various add-on libs to compile and b) maybe 5 people at most would be interested. :)
added on the 2003-10-22 19:30:41 by phoenix phoenix
sagacity: Write a library to do HTTP posts via proxy, one of the most common and boring things in existance, for a shitty commercial database frontend I don't give a crap about, now that's a nice idea indeed. No, I think I'll just have to use VC to make an ActiveX DLL wrapper for libcurl so that VB can talk to it. It's going to complicate things more, but as I said, I don't give a shit.

optimus: in case you haven't heard, the dinosaurs are dead, people don't live in caves any more, WWII is over, and the floppy disk is slowly but steadily replaced by usb flash disks, which are smaller, faster, more reliable, they offer more capacity at about the same price, they look cool and are absolutely silent.

Also, talking about bit-shifting on a bytecode-based language that should have been dead 10 years ago is a sad joke. I say, better stick to trying to reproduce your genes, because I bet that basic bit-shifting is slower than pascal divisions by multiples of 2.
added on the 2003-10-22 19:40:50 by moT moT
When you say bytecode, you mean like the logic of Java? I am not sure if this applied in the compiled result of Quickbasic4.5. Inside the interface it interprets for sure, though outside it compiles in EXE. Still, I had a discussion with some greek sceners about this, because the interpreter could be inside the EXE and the bytecode too. But I asked people most people at forums of the quickbasic scene once and most of them said that compiled quickbasic4.5 code is definitelly machine code and not some kind of interpreter/let's say bytecode. I don't know, it's still a mystery for me, though the people inside the community must know..

I do have a USB memory stick now and yes it's cool :)
But, really, I can't understand why compilers and SDKs have to be so many Megabytes big! Do they have tons of bitmaps, 3d modells, videos and MP3 music??? They are programms. Why programms should also take that much? Of course, you can give me some logical answers to that (lot of libs, support, source files, many editors and other bloated features) but hell, I would like something small, fast and cool when I want to use a programming tool! Perhaps I should code oneday my own compiler, something like a mix of basic and assembly, it's just one of my dreams when we have debates about programming languages and I just feel like I won't be able to get over with C/C++ ever in my life :)
added on the 2003-10-22 19:51:20 by Optimus Optimus
Optimus: Make a simple test. Create a hello.bas in QB45 and write:
10 PRINT "HELLO WORLD"
20 END

compile it and see how big it is. I bet it's going to be around 25K, because the runtime library (= bytecode interpreter) is that much big. Do the same in Pascal without using the crt unit or in C without including any headers and see the difference. After that, write simple bubble sorts in all languages and compare the execution time.

Since you are into old machines, I can tell you how shocked I was seeing Pascal 5.5 run in lightning speed on a 8 MHz PC/XT, compared to everything else I had run on similar machines using QB. btw, that's exactly the reason I stopped using basic almost instantly.

Oh, and development tools are now much bigger because we now have more powerful machines that can solve more problems and noone likes reinventing the wheel (unless he has trouble sleeping of course).
added on the 2003-10-22 20:10:09 by moT moT
>compile it and see how big it is. I bet it's going to be around 25K, because the runtime library (= bytecode interpreter) is that much big.

You seem to be right, I will ask my friends at neozones.
added on the 2003-10-22 20:19:30 by Optimus Optimus
Except if Quickbasic is still machine code compiled, but it just doesn't allow the programmers to compile without libs that are not needed. The fact that such a simple programm doesn't compile in few bytes, doesn't proove for me anything yet. But it's a nice point that I'll ask my friends about at quickbasic forum..
added on the 2003-10-22 20:24:37 by Optimus Optimus
It's strange because even a "nothing.bas" programm I did (a programm where there is no programm, I just tried to compile an empty text :) with an option where brun45.exe is needed external (I guess that's the so called runtime library?), it takes 2752 bytes. That was a funny experiment actually :)
added on the 2003-10-22 20:34:39 by Optimus Optimus
I still hate big bloated development tools :P
added on the 2003-10-22 20:35:22 by Optimus Optimus
that brun45.exe is the basic runtime library, indeed.

But basic has evolved alot since then:
Code:C:\WINNT\system32>dir MSVB* Volume in drive C has no label. Volume Serial Number is 606B-88B2 Directory of C:\WINNT\system32 07/12/1999 03:00p 1.355.776 msvbvm50.dll 19/06/2003 12:05p 1.385.744 MSVBVM60.DLL 2 File(s) 2.741.520 bytes 0 Dir(s) 7.399.907.328 bytes free C:\WINNT\system32>
added on the 2003-10-22 20:45:45 by moT moT
And what really means Runtime Library?
added on the 2003-10-22 20:54:56 by Optimus Optimus

login