[DEVICE] Radio transmitter/receiver

All discussions related to the DCPU and in game hardware (equipment, vehicles)

[DEVICE] Radio transmitter/receiver

Postby ubernox » Tue Mar 18, 2014 6:14 am

Heyoo! New device for y'all's lookin'. We'll be in dire need for stuff like this in the future, so I figure we ought to pin down an 'original' before we have like 50 different ones and an emulator for each.
http://pastebin.com/raw.php?i=Khn4Be44
Thoughts?
Last edited by ubernox on Sun Mar 23, 2014 6:38 am, edited 2 times in total.
...fatty.
User avatar
ubernox
 
Posts: 17
Joined: Wed Nov 27, 2013 1:54 am

Re: [DEVICE] Radio transmitter/receiver

Postby ConnorY71 » Tue Mar 18, 2014 8:54 am

What I've always wondered is how the game will handle a radio wave sent off into space... will ships on the other side of the solar system be able to pick it up a certain number of minutes later?
ConnorY71
 
Posts: 115
Joined: Sun Dec 15, 2013 3:37 pm
Location: Ireland

Re: [DEVICE] Radio transmitter/receiver

Postby Zardoz » Tue Mar 18, 2014 2:42 pm

0x000a | Sets the operating frequency to A * B. Maximum 4.294967296 GHz, minimum 9 kHz.


Umm... think that the transmission frequency are related with the max bandwidth and the max transmission speed.
In this case, assuming a 9KHz bandwidth wit ha ASK or FSK transmission scheme, we should have 9000 bauds/s (~ 1,098 KiB/s)

http://www.slideshare.net/soumya604159/ch-05
Yep, I have a blog : http://zardoz.es
Emulator DCPU-16 VM
User avatar
Zardoz
 
Posts: 359
Joined: Mon Aug 12, 2013 8:54 pm
Location: Spain

Re: [DEVICE] Radio transmitter/receiver

Postby ubernox » Wed Mar 19, 2014 12:13 am

Zardoz wrote:
0x000a | Sets the operating frequency to A * B. Maximum 4.294967296 GHz, minimum 9 kHz.


Umm... think that the transmission frequency are related with the max bandwidth and the max transmission speed.
In this case, assuming a 9KHz bandwidth wit ha ASK or FSK transmission scheme, we should have 9000 bauds/s (~ 1,098 KiB/s)

http://www.slideshare.net/soumya604159/ch-05

I think it would be less than optimum to simulate the sine waves, however I am now realizing that 4 GHz is faster than most processors. I'll switch it around.
...fatty.
User avatar
ubernox
 
Posts: 17
Joined: Wed Nov 27, 2013 1:54 am

Re: [DEVICE] Radio transmitter/receiver

Postby ubernox » Wed Mar 19, 2014 1:23 am

Ok I'm going to have the baud rate fixed at 8000 bauds. It'll just set the bits per baud accordingly, and it'll save programmers a lot of headaches if and when they need to implement this. Also removed all mention of DMA since I've noticed it's not necessary.
...fatty.
User avatar
ubernox
 
Posts: 17
Joined: Wed Nov 27, 2013 1:54 am

Re: [DEVICE] Radio transmitter/receiver

Postby croxis » Fri Mar 21, 2014 9:27 pm

ConnorY71 wrote:What I've always wondered is how the game will handle a radio wave sent off into space... will ships on the other side of the solar system be able to pick it up a certain number of minutes later?


This is what I came up with:
Ship to ship communication

Ship to ship communication, from hardcore server chatting to remote piloting, require some external modules. Transceivers are single units that have higher power costs per unit range/bandwidth than dedicated transmitters and receivers. Omnidirectional units also have higher power costs per range/bandwidth than directional units (with conal spread). Full/multiband receivers also have higher costs per range/bandwidth than single band systems.

There are also hyperverse modules which can communicate with the real internet but have incredible power cost. This can range from http post/get to advanced systems that can do xmpp or irc.

A computer sends data as a string to the transmitter. If a receiver isn’t in range or not in the transmission cone then it does not pick up the signal. A signal has an initial power component, decay rate, em frequence, and travels at light speed. When a signal is sent the game engine will track the point of origin, initial power, frequency, and omni or direction. It will use collision detection to determine if a receiver gets the signal at the appropriate time. It will also determine if the receiver is sensitive enough and listening on the right frequency to pick up the signal. Weak signals might have data loss. Once a signal has reached a lower limit (maybe make this a server setting for performance tuning) the signal is removed from game memory.

It will be up to the playerbase if they wish to develop a packet/data system, such as tcp/udp or something more esoteric.
croxis
 
Posts: 282
Joined: Tue Aug 13, 2013 1:37 am

Re: [DEVICE] Radio transmitter/receiver

Postby ConnorY71 » Fri Mar 21, 2014 10:19 pm

croxis wrote:Once a signal has reached a lower limit (maybe make this a server setting for performance tuning) the signal is removed from game memory.


Radio waves are one thing, but what if I shot a laser off into space? There's very little probability that it will hit something, so it could easily make it across the map without dying out. Is there a way for the game to deal with this without shitting itself and going into meltdown?
Last edited by ConnorY71 on Sat Mar 22, 2014 4:37 pm, edited 1 time in total.
ConnorY71
 
Posts: 115
Joined: Sun Dec 15, 2013 3:37 pm
Location: Ireland

Re: [DEVICE] Radio transmitter/receiver

Postby Zardoz » Sat Mar 22, 2014 12:02 am

Limited range.
Yep, I have a blog : http://zardoz.es
Emulator DCPU-16 VM
User avatar
Zardoz
 
Posts: 359
Joined: Mon Aug 12, 2013 8:54 pm
Location: Spain

Re: [DEVICE] Radio transmitter/receiver

Postby Nadrieril » Sat Mar 22, 2014 9:28 am

The universe can't be truly infinite anyway, so you just destroy any projectile that hits the boundary
User avatar
Nadrieril
 
Posts: 13
Joined: Mon Mar 03, 2014 10:56 am

Re: [DEVICE] Radio transmitter/receiver

Postby croxis » Sat Mar 22, 2014 4:06 pm

ConnorY71 wrote:
croxis wrote:Once a signal has reached a lower limit (maybe make this a server setting for performance tuning) the signal is removed from game memory.


Radio waves are one thing, but what if I shot a laser off into space? There's very little probability that it will hit something, so it could easily make it across the map without dying out. Is there a way for the game to deal with this without shitting itself and going into meltdown?[/quote]

Depending how one wants to model it, a laser still spreads. IIRC the lasers we shoot at the moon for measurement spread to about a 3kmish diameter beam. Iirc its something like 4 times the area at twice the distance. Still super small at our scale but pointing a laser at jupiter is still a healthy spread. It could operate under the same cone mechanics as a dish, just a very tight spread.

Laser based comms can be balanced so that they only make up a small percentage of communication so even with cross-system range they wont consume that many server resources. Ships are not going to magically know where other ships are, the virtual computer has to either have predetermined position data or calculate it using a telescope or some other active/passive sensor system. This alone will probably limit long range coms to stationary bases or orbital stations. Short range comms for ships on the same grid can probably use ray based collisions. If there is a collision then the comm wont be stored in memory.

It isn't going to be possible to make this 100% realistic. Even if light waves were simulated the game loop with individual bits modeled the game logic loop will probably be running no faster than 60 Hz. A low baud rate could make it possible but the same effect could be done simply I think. If the transmission was stored as a binary string along with its time stamp and additional meta data such as wavelength. A ship enters the transmission cone midway, the server would calculate where in the string the ship will start "hearing" the transition and begin streaming the string from that point to the appropriate ship hardware listeners. The string could also be streamed through filters before getting to the hardware to model noise or other factors if those were gameplay elements. The server will also be telling the appropriate clients what the hardware is hearing as well. Don't want the clients to get the full or unfiltered string.

I'm still worried about performance issues with this. There is risk for a lot of transmissions and a lot of collision detection checks using the method I thought up.

And people can still exchange skype/xmpp/aim/whaetver usernames and start chatting out of game and not worry about time delay.
croxis
 
Posts: 282
Joined: Tue Aug 13, 2013 1:37 am

Next

Return to Hardware

Who is online

Users browsing this forum: No registered users and 2 guests

cron