Feature Questions

Hey, I am very interested in using PlayCanvas for a project I am building. I love that it uses html5, and is available on many devices outright. I am building a simple online game, simple mechanics akin to a trading card game. I plan to handle the guts of the game via js, ajax, and rails(or maybe php) outside of the game engine since it will be a fairly simple mechanic, and I really only need the 3D graphics to make the game play look and feel cool because the game play will be done outside of the 3D display. I need the ability to read and write an xml file from PlayCanvas in order to accomplish this.

My first question being, is the above possible in PlayCanvas? I have given a look to the api, but couldn’t find what I was looking for.

Secondly, I really need to be able to do particle effects for what I am building… But cant find anything on that.

I would really love to use PlayCanvas, over Unity if possible. Any help or info you can give me would be appreciated.

Thanks :slight_smile:
-Jason

1 Like

Oh also forgot… I need the ability to take a screencap of the 3d view and export it server folder.

Hi Jason,

Your project is definitely possible using PlayCanvas. Sounds like you want to use PlayCanvas just for the client rendering of a game that runs on a server?

For your questions:

Browsers provide an API for handling XML files which is why PlayCanvas doesn’t have anything XML specific. Take a look on MDN.

You can absolutely do particles in PlayCanvas. The torches in Dungeon Fury are particle effects. We haven’t got a engine-level API for this but you can take a look at the particle code in the Dungeon Fury project. Depending on your coding experience you could either take this code and use it for your particle effect. Or let us now more about what you need and we can work with you to get it up and running.

Converting a HTML5 canvas to an image is simple as well. Check out the MDN page for the canvas element

Hi Dave, thanks for the quick response.

Yes client rendering for a server game is the best way to describe my project. I figured that html5 would have a way of capturing the screen, but I wasn’t certain everything in the the 3D canvas would be available to get at purely thru html… but if so, Awesome.
In regards to xml. I guess I forgot in my original post to mention, that I do need to create a character customization screen. I actually will do some tweaking inside the 3d canvas for this aspect. That tweaking will require data to be sent from the client to server database to store custom character parameters.
For the game aspect I will need to get that data from the database into the client renderer to properly render the character variations. The client will have to be able to check an external file, to either get or receive data to trigger animations for game play. So as long as that is doable should be good to go. :slight_smile:

Only other sticking point for me handling the customization. I had planned to take advantage of using Algorithmic Substances(procedural textures) on my character model to generate needed variations. Given I am a solo developer this would save me a huge amount of time. Thanks for your support I will start weighing the options for the tasks required.

-Jason

I’m not sure entirely what you mean by “external file”? Web browsers aren’t allowed to access regular files of the users hard disk as that would be a security hole, but you are free to write and read data that you’ve received from the server into local storage, cookies or a sandboxed file system. ( Depending on how much data you want to save and which browsers you want to support). Check out: http://diveintohtml5.info/storage.html

I’ve heard of Algorthmic Substance but I’m not very familiar with it. Does it export to image files? Or does it rely on having engine support built in?

What I mean by external is on the server then locally to the page data if possible. Looking at the api I didn’t spot find an example of how I get data out and in. Let’s say I get data from the server thru ajax to the client page. How do I then get that data into PlayCanvas and likewise out to the server or client page data or something. A simple example would be really awesome to get me started in the right direction.

As for substances they are procedurally generated textures. You design the functionality of the texture in substance designer. You can expose parameters in you substance that you want to use for customization. Say for example you assign a color picker to skin color. Then you can do so. UDK and Unity support these so when you import a substance on a model those parameters are available to you to manipulate in code. Great for customization. More info is on the site. I realize that this might be something that Allegorithmic has to do in order to export to PlayCanvas… but this is really powerful stuff for indies and small teams. So it would be major points if you guys could support this.
Check out their site:
http://www.allegorithmic.com/getstarted

Thanks for the response very much appreciated! :slight_smile: