If you were tasked with operating a commercial DVD player from a computer program, how would you do it?
My company sells a product that does exactly that. We have a couple of different approaches, and they both have major issues:
Get an IR Transmitter, Pretend To Be a Remote Control
Pros: Works with pretty much every commercial DVD player in existence.
Cons: The IR transmitter is another moving part that can (and too frequently does) go wrong. Only allows one-way communication; you can talk to the DVD player, but it can't talk back; you can only tell if it's on or off by seeing if it's putting out a video signal.
Get a DVD Player With an RS-232 Serial Port
Pros: Everything that's "con" with the IR transmitter approach simply goes away. The direct connection is more reliable and allows the code to understand just what the machine is doing.
Cons: Niche market; very few machines actually have an RS-232 port. So, when a manufacturer discontinues a model you've been using, you're left scrambling to find a replacement.
And I suppose for the sake of completeness, I should mention....
Just Use the DVD Drive In the PC
Cons: Boss doesn't like it.
What other approaches are available? I've seen DVD players with USB ports, but the last time I researched the subject, it seemed that was just for playing media stored on an iPhone or the like and not actually a potential control mechanism.
I'm really hoping somebody will say something like "Silly boy, don't you know about the ridiculously common FOO port that allows a home theater system to control the DVD directly? Just get a USB -> FOO converter and you're all set!" But I'm grateful for any options I haven't already considered.
The DVD drive is the way to go.
But if he does not like that, I'd go ahead and get a PIC microcontroller, one with USB built in (forget which part number this is). I'd write code to control this, having the IO lines go out on lead wires that attach to the inside of the front panel buttons. You'd need less than a dozen.
If a model is obseleted, it only changes where the lead wires attach. A hole can be punched out of the back of the commercial DVD player, and one of those little rubber gaskets can seal the USB cable to it. It looks like a regular player with a USB A cable coming out of the back.
The cable itself would be rather cool, I'd buy a few if someone sold them. My "USB betamax VCR" would be hilarious.
Bonus points if you integrate it with Front Row, complete with another icon/menu entry.
Many Blue-Ray players can be controlled via the HDMI port. The protocol is probably proprietary and different for each vendor...
I am am a big fan of optical media but it is a dying form of media.
Have you considered building a small windows or linux computer with an SD card slot (Raspberry Pi) and placing a DVD disc image on the SD card? From there you could write software to playback the DVD from the image and interact with it. You could even use something like Adobe Director as a framework for playing and interacting with the DVD content.
Or you can bypass the DVD image idea altogether and build an interactive framework in Flash, HTML/CSS or Adobe Director which allows you to draw menus on the fly and playback audio/video when a link/button is selected. This would have the added benefit of being more flexible than a multiplexed DVD. You could program the menus to build from an XML file for easy language localization, typo corrections, etc. And you could support playback of video with multiple audio streams, subtitles, etc.
It depends... are you being tasked with controlling (almost) any dvd player, or do you get to decide the model? If you're trying to control whatever AV setup a customer may have, then you're basically required to go the IR transmitter route. And there will still be things you won't be able to handle (like a PS3) without additional hardware.
Most AV devices don't put out any input about their current state short of power draw and video/audio output, and the ones that do usually use proprietary rf (sony is big on this in the near future) or localized standards (like scart in europe). A handful will send/recognize command signals over coax, but that went out of style in the 90s.
Related
i need to create an application that is capable of detecting a person entering and leaving the area in front of a big screen.
since sensors like infrared and ultrasound can easily be fooled by multiple persons i was thinking of using face / person recognition.
one option would be to use the kinekt sensor.
my questions: is this system reliable? is there another good option?
Thanks a bundle!
I've already used kinect for this kind of projects in actionscript and unity with c# and i can say that's your best and only solution to detect person and mantain a low cost.
You have 2 possibilities to use kinect with as3:
First is to use AIR with a ANE (adobe native extension) and interface c++/c# dll with your application.
Second one is to use the old trick of the socket communication. You have 2 application as3 and c#/c++ and you put them in communication with a tcp/udp connection on the loopback interface.
IMHO the best solution is the first one, you don't have to write a good protocol to communicate but you just call methods and receive events as a normal API.
I'd like to know if I have downloaded (loaded to my computer) any big flash game like Evony or so where does it do the counting? I mean in the flash files which I have dowloaded to my computer, will there be the counting functions where it counts everything like attacking, defensing, etc.
The above is just an example, it could be any big flash game. The question remains the same. Where does these games do the counting part. It is in those flash files or it is somewhere else on their server which I can't see?
That depends of the game and the developers that make them. As rule of thumb for network games is that everything that needs to be stored or process in any way, like counting - is to do it on the server. The Flash player is considered insecure, because it can be easily hacked, so every action in the game that is significant needs to be executed on server, because they are harder to hack.
Again, this really depends on the choices of the developers, how they will structure the game. So you can't really know unless they tell you or you hack the flash code and see it for yourself.
I would like to have some info about apple's in-app purchases option.
I can't seem to find any place where they are explaining what is actually allowed. Becaus i wanted to make a digital bookstore with interactive books in asctionscript and offer the user interactive books (seperate swf files) via in-app purchases but apparently it is not allowed to have any code in your swf file, so that option is out of the window (btw if anyone knows of another option instead of swf files, please let me know).
Then have have thought of maybe starting in cocos2d but again i have no idea how i would distribute separate interactive books to the users. What are the options here?
So my questions are: what is allowed with in-app purchase, how can i offer interactive books (with posibility to click on elements and view animations etc) through in-app purchases.
And secondly and more important:
Would it be possible to do it via as3.0? Preferably i would like to do it through actionscript but can anyone tell me if its possible? Can i offer the user interactive books with elements that are pressable and animations etc through in-app purchases? And having all the books inside the application and unlocking them is not an option. I want to be able to provide books separatly.
Definitely on the right track,
I think if you are looking to do an animated books series or something that's more interactive that a simple text format you should be fine using In-App Purchases for this. You'll only get in trouble if you're duplicating something iBooks can already provide.
You'll need an ANE to give you access to the InApp Purchases API from AS3, there are a few out there and I'll shamelessly plug mine:
http://distriqt.com/native-extensions#in-app-purchase
The major problem you'll have is actually distributing the additional content, as you may not be able to load in a swf and play it in a compiled iOS AIR application as you would a normal flash/AIR application. You'll have to do some research and see if you can create a player that just loads images and animation sequences (in xml or other).
Good luck
1) You can't play swf files on the iPhone. Not without converting them to HTML5 or video. Which probably makes them non-interactive (not sure about HTML5).
2) Downloading any executable code to an iOS device is out of the question. There are some gray areas, for example downloaded Lua scripts which only contain data but due to their nature are executable code. It's a risk to do something like that, instead of just downloading XML or pure text/binary files.
3) Apple never tells you exactly what is allowed. They tell you what is not allowed, and even there they remain vague. There are always some gray areas and Apple reserves the right to define whether something in the grey area is acceptable to them or not. If you think your app is in the gray area, you need to have a backup plan in case Apple won't like it, or removes the app because they didn't initially find something wrong with it but later changed their mind.
4) Read the iOS Developer Program License Agreement and the App Store Review Guidelines. You may need to re-read some sentences because it's somewhat lawyer speak, though not really that hard to understand.
5) There are no guarantees. Best option: look at apps like yours and see if you can find your payment model implemented by other apps. If you find several such apps, it's most likely ok to do that. If you can't find any app that does something even remotely like you want to do it, beware.
6) I think you're on the wrong path. Use iBooks. Problem solved.
I am building a small cards game for Windows Store using HTML/JS as my programming languages. One of the features that I would like to add is multiplayer capability. My game it's based on a 1 versus 1 player (unlike Hearts where you need 4 players), so an ad-hoc peer-to-peer connection is enough. Also, keep in mind that I am only considering local network multiplayer, without internet support (meaning that "privateNetworkClientServer" capability is required on that app manifest).
So I am imagining, when a player want to start a multiplayer game, the app will periodically broadcast a message to find any candidates. Meanwhile he will also have to listen for those same messages (in case of another player is broadcasting them also). When they find which other we transmit the game state back and forward to perform the required games changes.
My question is, does WinRT provide any functionality out of the box to do something like this? If no, do you have any suggestion for my problem?
Thanks
Look at the documentation for the PeerFinder class. Proximity can use either NFC or by browsing on the same subnet. Note, in the case of WiFi, not all WiFI cards support the browsing model, so some older PCs may not be able to use this solution.
The proximity sample application on msdn should help you with this.
I've created a simple game where 2 players make a simultaneous choice in each round, and the winner of the round is determined by a set of rules specific to the game. Sort of like how Rock Paper Scissors works.
I'd like to be able to offer this game online where 2 players can find and play against each other. There would be some central server to arbitrate the game, and then each player would interact with the game using some game client of his choice that we would provide (i.e. web-based, mobile-based, Flash, etc).
Obviously, a player could also play against a computer opponent that we could provide. I'd also like to have the capability to allow programmers to submit computer programs that they've written to act as players and play against other programs in some sort of tournament.
I realize that the specifics of my game would certainly need to be written from scratch, but it seems that all of the work that the servers would have to do to communicate with the clients and maintain the state of the game has probably been done many times before. This is probably the bulk of the work.
Does anyone have any ideas for how this could be done quickly and easily? Are there servers available with some sort of standard interface to drop new games into? Is there some sort of open source game server? How would you go about doing this?
Seeing as the clients only communicate with the game server occasionally (as opposed to continuously), a web framework should be able to serve as your "basic game server". While web frameworks may be made for providing "web pages", they can certainly be (ab)used to serve as request handlers.
This certainly doesn't force you to make the game a browser game; standalone game clients can be made easily, and they can communicate with your game server using basic http. I also heard this thing called Ajax is pretty nifty for such things.
Not only will you find a lot of ready-made http-based servers, as an added bonus, there is a lot more documentation on how to work with Web 2.0®©™ than "game servers". You just need to know that you want a web framework that lets you easily manage sessions and receive/respond to requests and a client library that does likewise.
As an added aside, "maintaining the state of the game", as you put it, falls 100% within the domain of the actual game logic. But many web frameworks come with good database support, and will surely be useful for this kind of thing.