2

I am looking for a program to show a slotmachine animation (preferablly written in Java/SVG). I'm interested in showing the rotating wheels with images of my own choice.

I have found http://www.doit.org/java/slot/SlotMachine.java

which is the source code for an Applet.

do not have graphic support. I am hoping there might be better/other solutions I could use for showing on a webpage.

http://www.treebuilder.de/default.asp?file=163540.xml

shows an SVG solution - this might be the closest to what I am looking for so far.

so far i could test the above applet by making a standalone java app from it. It works for the graphic part - the audio issue is discussed in

how can i run an applet as an application?:

I will now at least be able to try out other graphics without needing the applet params to be defined in a web page. I'd rather have a standalone solution e.g. like a restful Java app.

See Wheel, part of a larger project by Jernej Vicic, and this later variation, incorporated into a project by Mark Boyns.

Community
  • 1
  • 1
Wolfgang Fahl
  • 15,016
  • 11
  • 93
  • 186
  • See also this [example](http://osebje.famnit.upr.si/~jernej/slotmachine/igra.html). – trashgod Nov 04 '12 at 20:58
  • Voting to re-open on the grounds of revised question and examples cited, although the one shown lacks adequate provenance. – trashgod Nov 04 '12 at 21:02
  • unfortunately I can't vote myself - there had been 3 close votes already before the question was improved. Maybe it is a meta issue that close votes IMHO should be "resettable" by editing - at least the automatic close at 5 votes is IMHO somewhat counter productive. – Wolfgang Fahl Nov 05 '12 at 07:19
  • More on _reopen_ [here](http://meta.stackexchange.com/q/36415/163188). I've cited the original projects for SO [license](http://creativecommons.org/licenses/by-sa/3.0/) compatibility. Sorry I overlooked your new [link](http://www.treebuilder.de/svg/slot/froot.svg) when editing. – trashgod Nov 05 '12 at 10:55

1 Answers1

1

It looks like you have examples of a slot machine model. For the view, you might look at this answer that suggests using Unicode glyphs or implementing the Icon interface. Also, consider this MVC example and this answer that illustrates rendering a BufferedImage.

Animating the visible face is straightforward, but a pseudo-perspective for adjacent facets would require a trapezoidal transform, available in JAI.

Addendum: How can I run an applet as an application?

Several examples of the hybrid approach are cited here. Note that applets, too, must be constructed and manipulated on the event dispatch thread. Also consider Java Web Start for deployment.

Community
  • 1
  • 1
trashgod
  • 203,806
  • 29
  • 246
  • 1,045