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 Professional Discussion / Inventing exotic game interfaces and robotic controllers

Author
Message
magic
18
Years of Service
User Offline
Joined: 14th Jul 2007
Location: Pacific Coast - California
Posted: 13th May 2011 05:36 Edited at: 21st Jul 2011 03:10
It's now quite easy from an electronics tech viewpoint to get a USB interface that makes new kinds of game controllers and I/O possible.

What support does DBPro have for USB? Some of these devices provide their own drivers which perform like serial I/O.

There are several. This is just one --
http://microcontrollershop.com/product_info.php?products_id=2125
KISTech
18
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 13th May 2011 18:35
There is a serial port plugin DLL for DBPro. I use it with the special effects controllers from http://www.efx-tek.com to operate several props and trigger sounds in our Halloween Haunted House.

magic
18
Years of Service
User Offline
Joined: 14th Jul 2007
Location: Pacific Coast - California
Posted: 19th May 2011 00:11 Edited at: 20th May 2011 01:37
"How exciiiting" -- Peter Lorre

I will seek the serial port plugin DLL for DBPro, thank you, and for the links I enjoyed.

It's been many years since I've designed arcade games and home computer games (q.v. my career in the '80s ) but I've never stopped jotting notes and sketches of ideas.

I'm now in a college town (Berkeley CA) where venues with robotic and WWW elements could be creatively showcased. What fun.
magic
18
Years of Service
User Offline
Joined: 14th Jul 2007
Location: Pacific Coast - California
Posted: 19th May 2011 04:36
Say, I noticed that small (12 - 14 point) TrueType fonts don't look as sharp in DarkBasic as they do on a web page or word processor or other application. Maybe I'm handling them wrong? Is this a known issue or a familiar malady for DB Pro beginners like myself?
TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 19th May 2011 12:14
I'm not quite sure, but if you're running the text in a low resolution window in fullscreen (or so it's stretched), the font can be screwed up. Try putting this at the start of your code:

set window on

And see what it looks like when it's not stretched. (If it was stretched)

TheComet

magic
18
Years of Service
User Offline
Joined: 14th Jul 2007
Location: Pacific Coast - California
Posted: 14th Jul 2011 02:42 Edited at: 14th Jul 2011 23:37
Thank you Mr. Comet.

Some True Type Fonts appear OK, others are more raggedy.
Perhaps there are some magic-numbers that fit especially well,
and some testing may turn this up.

My objective is to have text comparable to what's commonly
seen in the accurst "Windows". Not being a fan of any OS,
I'd like to experiment with some non-standard usage and apply
it to user interfaces for real world instrumentation (as well
as innovative game controllers as I began this thread).

I purchased the DB "Dark Ink" add-on for printer support, and
need to become more familiar with the other add-ons.
basjak
16
Years of Service
User Offline
Joined: 16th Apr 2010
Location: feel like signing up for mars
Posted: 16th Jul 2011 03:53
DBpro evolves itself. so if DBpro doesn't support something then find the DLL and embeded within the DBpro library.
magic
18
Years of Service
User Offline
Joined: 14th Jul 2007
Location: Pacific Coast - California
Posted: 19th Jul 2011 00:34 Edited at: 19th Jul 2011 00:51
Basjak, I can't envision the context it would do that, but that's impressive and I'll watch for more info on that.
magic
18
Years of Service
User Offline
Joined: 14th Jul 2007
Location: Pacific Coast - California
Posted: 19th Jul 2011 23:17 Edited at: 21st Jul 2011 04:50
Super Low Cost Touch Sensors

On this favorite topic of mine which could be summed up as "New game I/O", I'll first mention some older methods that continue to have useful potential.

CDS CELLS
These "Cadmium Sulfide" sensors vary resistance with light. They come in a wide range, and many can vary over 1000:1 range like 10 K Ohms to 10 MegOhms, very useful. The right choice will substitute for resistance in joysticks. Others make good "Theremin" musical instruments for both frequency and amplitude.

Add an LED and encapsulate both in light proof resin, and you have an excellent "opto-isolator" capable of adding safety to games or arcade situations like haunted houses.


FORCE SENSING RESISTORS
Something very new, advertised for these exciting applications --

Pressure-sensitive touch user interface
Tactile sensor for robotic appendages
Finger pads for special gloves
Target contact detection

You can Google sources for these. CDS cells are typically under $2, but force sensing resistors are closer to $7.

A much lower cost force sensor can be cobbled together with a high impedance relaxation oscillator and a home brew air-capacitor (about $1) but you'd need tech skills and know-how to make it at all reliable. The force sensing resistors are much easier.
magic
18
Years of Service
User Offline
Joined: 14th Jul 2007
Location: Pacific Coast - California
Posted: 20th Jul 2011 01:42 Edited at: 21st Jul 2011 22:18
Super Low Cost Touch Sensors

CONDUCTIVE FOAM

Neither Force Sensitive Resistors nor Conductive Foam have repeatability good enough to make a scale to weigh things, but both will change their resistance with pressure for a joystick port directly (100K range) or a "biased circuit" (see below).

The foam costs about $11 for 2 square feet, and is used to package ICs in transit. It's a 1/4 inch thick black foam that techs often get free when buying ICs and throw away. Put a facing like aluminum on either side and squeeze, voila, a variable resistor.


BIASING A SENSOR


The game machine or computer will have its specified input, such as zero to 5 volts, or 0-100K Ohms. The latter is typical of Logitec and other joysticks. However, your sensors may not directly work in this range. Foam will be lower, CDS cells won't go so close to zero, and other variations.

To set up more ideal match between your sensor and your game machine (called Biasing), you'll need to understand resistor networks at least, and even better, how to set up "Op Amps" (Operational Amplifiers) such as the classic 741. These can amplify, offset, or attenuate your sensor signal, even invert it if needed, and filter noise (60 Hz is everywhere). They can output either voltage or current and work in a range from plus or minus 5 to 15 volts.

The output of the Op Amp can in turn be put into a device called an "Opto-FET" such as the H11F1 (or H11F2 or H11F3) by Fairchild and others. Like the CDS/LED opto-isolator I described above, this device has an LED, but with an FET serving as the light sensitive variable. It comes in a light tight 8 pin IC package.
They're faster and less temperature sensitive than CDS cells, and cover a very wide range. But they don't go to zero ohms.

Another exciting topic tangent to this but beyond the scope now is "non-linear" electronics. Much of reality has geometric or logarithmic relations, including sensors, which can be dealt with in analog (like Op Amps) or in digital. Beyond the familiar binary digital computation there exists analog computation and profound matrix computation such as optical holographic computing, not very useful for games, but interesting I think.

So if you're using any new sensors in your game design, you'll make a safer product by using opto-isolation (usually can block more than 1000 volts of fault), but your software will have to take their low limits into account. H11F series goes down to around 100-200 Ohms.
magic
18
Years of Service
User Offline
Joined: 14th Jul 2007
Location: Pacific Coast - California
Posted: 20th Jul 2011 01:58 Edited at: 21st Jul 2011 20:42
A little history about "Light Pens" and "Light Guns"

I believe the "light pen" has been banished from PC BIOS circa 1990, but they had a cool potential.

Sculptured Software, known for converting arcade machines into home computer programs back then, had me working with a very special light pen made by Atari.

Note, the way it worked was it contained a FAST photo-transistor. This was before the super fast photo-FET, and after the very slow photosensitive CDS (from the 1960s) I've been mentioning. The phototransistor was built into the tip of the pen, so when you touched the pen to the screen, the flying spot of the CRT raster would eventually pass by and a pulse would be sent back to the hardware. This was built right into the PC, bless the early designers, but I believe removed by some left-brained schlemiel who saw no point to it.

Anyhow, that's how the common light pen worked, but some brainiac with Atari (very respectable company during the Jay Miner computer era) put a tiny telescope in front of a light pen and dressed it up to look like a ray-gun.

Hence, we made games where you could shoot bugs, etc. on the computer screen. I wrote some kernels for it but never completed a game for it. Nevertheless, it's a sensor concept worth mention.

These days one could mount a tiny "Pointer" laser in a gun-like device for a similar effect (opposite in that the sensor is remote and source signal in hand) in an arcade setting. However, the intensity would best be kept low for eye safety, and remote sensors will see it fine. For multi-players, each weapon could have its own pulsing rate (maybe 100 Hz typical) so the software would know who hit what. Even better, a coded pulse train could be used.

Pulsed infrared lasers by the way, are useful for security systems and helped me fend off countless coyotes in a place called Canyon Country in the 1970s. The principle there is like the light beam you interrupt walking into a convenience store, only invisible.
magic
18
Years of Service
User Offline
Joined: 14th Jul 2007
Location: Pacific Coast - California
Posted: 20th Jul 2011 02:25 Edited at: 6th Oct 2011 21:52
A disservice to computer history from PBS that saddens me ...

Public Broadcasting has played innumerable times a "documentary" Tr1umph of the Nerds which contains what I feel is a slight to the great genius and famous IC designer Jay Miner (now deceased) and the fans of those early computers he created.

You'll notice countless images of Bill and Steve's face and their works in that PBS special, but unless it's been edited since for veracity, no pictures of the great 8 bit Atari 800 series, C64, or the 16 bit Amiga computers, or their founder.

This is a disservice to young people understanding where we are now. In contrast of weight of "genius": Jay DESIGNED ICs that blessed artists, and Bill re-branded DOS. Both Bill and Steve snatched the Xerox Star System (of 1977) to be renamed Windows and Apple Classic.
http://toastytech.com/guis/star.html


In fairness, Bill became a worthy philanthropist, though I wonder about the fate of those who fell in the wake of his rise.

My main use for the Amiga was as interface between a Hitachi 1111 (giant draftsman's bitpad) and Kessel, a mainframe we used at Lucasfilm to design games. It felt as good as my Wacom and PC now.

A key point I want to make is that it is worth learning, if you can, both the hardware and software. My work for Disney and Lucasfilm on the 800 series resulted from my DLI assembly code (display line interrupts) where resources were reallocated in between scan lines in real-time. Windows has distanced us from the hardware, though game designers do have golden pathways to things like polygon generators that some of the best video cards now offer.

I studied the design notebooks of both Atari and Amiga systems and they were brilliantly detailed with timing-diagrams and exquisite clarity. I've seen very few computers as well documented before or since.

Compare their game graphics -- the Atari 800 had 256 colors circa 1980 (with display-line-interrupts I used extensively). Amiga had 16,000 colors and 1024 resolution shortly after that. IBM had 4 colors in hi-res, 16 in lo-res, Mac had 2. Apple II had 15-16 colors with dithering. Commodore 64 was a great and comparable machine, but its company politics diminished its potential, a story for another time.

Omitting Jay's masterpieces of design for their time I feel is damage to the historic record, so I felt it worth mention.

Here's the Wiki on Jay Miner, and some of his last words --
http://en.wikipedia.org/wiki/Jay_Miner
http://www.amigahistory.co.uk/comment-5.html
magic
18
Years of Service
User Offline
Joined: 14th Jul 2007
Location: Pacific Coast - California
Posted: 20th Jul 2011 02:34 Edited at: 22nd Jul 2011 02:30
Sprites (such as GIF animation common on Internet, and portable animations we use in games) have one "transparent" color. But some other graphic formats such as PNG have VARIABLE transparency called an "Alpha" layer. I've seen some evidence of this in DBPro game examples, but I ask someone please direct me to any pages/docs that explain how to do this with DBPro sprite capabilities. Any good examples would be interesting too.

For an example of a PNG image with variable transparency, check out the edges of the Paper Doll object on this page (which you can drag and drop about to experience its priority also). The logo and stick figures are GIF with one "transparent background" color.
http://tech.wwwizard.net/spritefun
Mobiius
Valued Member
23
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 20th Jul 2011 19:48 Edited at: 20th Jul 2011 19:52
Quote: "Please, anyone who knows how to embed images in posts on this forum, please enlighten me how to do it ..."

Like this...



*edit* Hmmm, it doesn't seem to be working...

*edit2*

A picture from my own website seems to work fine. Perhaps your website blocks it for some reason as the image path seems to work in the address bar.

My signature is NOT a moderator plaything! Stop changing it!
magic
18
Years of Service
User Offline
Joined: 14th Jul 2007
Location: Pacific Coast - California
Posted: 21st Jul 2011 02:09 Edited at: 21st Jul 2011 21:54
Here's a test with slightly different server connection (failed one was from a subdomain)--


Thanks, Mobiius ! I went back and illustrated my posts above.
magic
18
Years of Service
User Offline
Joined: 14th Jul 2007
Location: Pacific Coast - California
Posted: 25th Jul 2011 00:48 Edited at: 25th Jul 2011 00:51
INFRASONICS

Subsonic audio (20 Hz and lower) is present in some of the best bass and percussion of jazz and rock music, and even classical (1812 Overture for example). It also enriches sound effects of games like explosions, or the Mother Ship (my creation) in Rescue On Fractalis and countless later games.

Rock concerts and clubs have used big woofer arrays and awesome wattage and huge expense. It's not relevant to games but mention belongs in this context.

But for tiny venues like arcades, much less expensive subsonics can be made with horn enclosures comparable to the Klipsch and Electrovoice folded designs. Ordinary bass speaker designs have often boosted efficiency by porting, effectively resulting in a low frequency resonant enclosure with a notch filter (tuned port) at the resonance. This allows cheap speaker designs (higher profit from mfr. viewpoint) to have more oomph. Automobile speakers similarly use resonant enclosures without port. This makes them loud but their bass tends to sound one-note. To serve these ubiquitous designs, much modern music uses a portamento on the bass, guaranteed to hit the resonance of such a car woofer though that frequency varies widely with installation. I don't advocate using these car stereo principles, but car speakers can be useful to line the inside of an arcade game enclosure (as "direct radiators" with infinite baffles) so that sound can be FELT without deafening you or the guy in the game unit beside you.

Sometimes "sub-woofer" add-ons to computer systems, either tuned port cabinets or "infinite baffle" (airtight) make for a quick solution. The infinite baffle is inefficient so a powerful speaker is needed for modest output. However, the incentive to use that is high fidelity and phase coherence of subharmonics and tight pulse response. Things like delays have to be managed and accounted for, but my point is, for a small venue, an infinite baffle subwoofer with a folded horn in front such as a hypex curve, achieves efficiency and richness of sound, though expensive per acoustic watt output.

The above I learned from a physicist friend who did research with Cerwin Vega years ago.

OK, however you do it, some principles will be universal. Bass and subsonics propagate omnidirectionally (higher frequencies are increasingly directional) so they're hard to contain. Our ears respond differently at varying sound pressure (decibel) levels. I've highlighted subsonics (approximated) in purple.


Subsonics are necessary but hard to contain in a crowded gallery. However, it's possible to NULLIFY low frequencies with additional speakers, beyond the scope to explain here, but suffice to say acoustic design is a key subject for gallery designers.

Login to post a reply

Server time is: 2026-07-10 20:58:31
Your offset time is: 2026-07-10 20:58:31