elevenetc / Interactivecanvas
Library for distribution canvas animation over set of devices
Stars: ✭ 351
Programming Languages
java
68154 projects - #9 most used programming language
Projects that are alternatives of or similar to Interactivecanvas
nuts
NUTS defines a desired network state and checks it against a real network using pytest and nornir.
Stars: ✭ 47 (-86.61%)
Mutual labels: network-programming
malloy
A C++ library providing embeddable server & client components for both HTTP and WebSocket.
Stars: ✭ 29 (-91.74%)
Mutual labels: network-programming
go-networking
Code sample for Learning Network Programming with Go
Stars: ✭ 134 (-61.82%)
Mutual labels: network-programming
packet
📦 Send network packets over a TCP or UDP connection.
Stars: ✭ 68 (-80.63%)
Mutual labels: network-programming
vigor
Main repository of the Vigor NF verification project.
Stars: ✭ 40 (-88.6%)
Mutual labels: network-programming
Easyserverdev
操作系统层面提供的 API 会在相当长的时间内保持接口不变,一旦学成,终生受用。理解和掌握这些基础 socket API 不仅可以最大化地去定制各种网络通信框架,更不用说使用市面上流行的网络通信库了,最重要的是,它会是你排查各种网络疑难杂症坚实的技术保障。
Stars: ✭ 323 (-7.98%)
Mutual labels: network-programming
xpcap
Cross-platform Packet Capture which supports Linux and macOS(BSD) in 1000 LOC without depending on libpcap.
Stars: ✭ 19 (-94.59%)
Mutual labels: network-programming
arpwitch
A modern arpwatch replacement with JSON formatted outputs and easy options to exec commands when network changes are observed.
Stars: ✭ 20 (-94.3%)
Mutual labels: network-programming
netbots
NetBots is a python programming game inspired by the 1970s game RobotWar.
Stars: ✭ 16 (-95.44%)
Mutual labels: network-programming
SpeedDate
SpeedDate Masterserver: Connecting Players
Stars: ✭ 24 (-93.16%)
Mutual labels: network-programming
Network-Automation
Cisco ACI, Firepower, Meraki, NETCONF, and SQL Python Programs
Stars: ✭ 47 (-86.61%)
Mutual labels: network-programming
100-redteam-projects
Projects for security students
Stars: ✭ 731 (+108.26%)
Mutual labels: network-programming
community.network
Ansible Community Network Collection
Stars: ✭ 85 (-75.78%)
Mutual labels: network-programming
c-network-programming-best-snipts
Sample c network programming
Stars: ✭ 47 (-86.61%)
Mutual labels: network-programming
Message Io
Event-driven message library for building network applications easy and fast.
Stars: ✭ 321 (-8.55%)
Mutual labels: network-programming
link
A clojure framework for nonblocking network programming
Stars: ✭ 63 (-82.05%)
Mutual labels: network-programming
InteractiveCanvas
The library distributes canvas animation over set of devices.
How it works
The library is based on pretty dumb method: Picture
class has writeToStream
and createFromStream
methods which serializes and deserializes Picture
object respectively. After serialization byte array
sends to a client device as UDP
packet. On a client device the packet is deserialized back into Picture
object and finaly rendered on a Canvas
. That's all.
Advantages
- It's quite easy to distribute regular
Canvas
animation over almost any number of devices. You could develop and test your game (or just animation) on one device and then launch it on a set ofAndroid TV-sets
for instance. -
Picture
represents a frame of animation. Size of serializedPicture
object is relatively small: could be 100 to 300 bytes - it depends on comlexity of your animation. So there is no need to have wide bandwidth to send 30 or 60 packets(frames) per second. - Serialization of frames and game logic execution could be performed on a separate device or even on a separate computer(with
Android
emulator/virtual machine). It could be useful when you need to perform heavy computations to preparePicture
frames or handle lots of usersMotionEvents
.
Limitations
- The library uses deprecated methods. So some day it could just stop working. Though it could be used for some interactive installations or presentations where you have particular set of devices.
- Initally the libray was designed for relatively simple animation. Complex animation could overflow maximum size of
udp
packet. In this case you could either try to compress frames or send frames overtcp
.
Usage
- Host side should extend
InteractiveCanvas.java
and overrideonDraw
method:
@Override protected void onDraw(Canvas canvas) {
//...draw on canvas
super.onDraw(canvas);// at the end of animation `super` method must be called
}
- Then your canvas shoud be configured with array of
Screens
.Screen
represents client device where animation should be displayed.
hostCanvas.config(screens, PICTURES_PORT, TOUCH_EVENTS_PORT);
hostCanvas.start();
- Client should create
PictureReceviver
instance and configure it withReceiverView
instance:
pictureReceiver = new PictureReceiver(clientId);
pictureReceiver.config(PICTURES_PORT, HOST_ADDRESS, TOUCH_EVENTS_PORT);
pictureReceiver.setReceiverView(receiverView);
pictureReceiver.start();
Samples
Ther're two samples: PingPongActivity
and MirrorActivity
. Both of the classes contain similar two static fields:
private static final InetAddress HOST_ADDRESS = Utils.getAddress("192.168.56.101");
private static final InetAddress[] CLIENT_ADDRESSES = new InetAddress[]{
HOST_ADDRESS,
Utils.getAddress("192.168.56.102"),
Utils.getAddress("192.168.56.103"),
Utils.getAddress("192.168.56.104")
};
Change this ip adresses to id adresses of your devices and launch app on all devices.
Download
repositories {
maven { url "https://jitpack.io" }
}
//...
dependencies {
//...
compile 'com.github.elevenetc:interactivecanvas:0.9.0'
}
Licence
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].