[SOLVED] - About the browser-embedded games

Hi panda forum! :smiley:

I was looking at the disney’s games made with panda3D (Toontown and Pirates of the Caribbean online, if I’m not wrong), and a question has bothered me since then.

It seems like the games are running inside the web browser (at least POTC online), and you download just 3 MB of initial data and the rest as you play, right?

So, my question is: If you make a game moderately large, like Pirates, does the user have to download every part of the game again every time he wants to play it? or the downloaded data remains on the disk for future use?

I’m asking this because I’d like to make an, let’s say, adventure/platformer/arcade game with panda, not an MMO, just a single player (or same machine multiplayer) game to be playable on the web browser, but avoiding re-downloading the game every time you want to play, just the first time, and if you want to play again, you can go to the game’s web site and play the game without waiting for what you’ve already downloaded, since 3D games tend to be larger than 2D flash games.

P.D.: I’ve never played Pirates of the Caribbean online, I’ve just watched some videos about it.

I hope you understand my point :blush: I’m not very good at English.

Thanks in advance!!! :smiley: :smiley: :smiley:

Yep, Panda’s runtime downloads packages only if the user doesn’t have them or if they are different from the user’s ones.

Thank you for the response!!!

These are really good news (at least for me), but does this feature needs to be activated? because, I don’t know if I’ve expressed myself well, I’m talking about download an embedded game, play it, close the web browser, shut down your computer, and the next day, return to the game’s web page to play it without downloading it again (like with flash games).

In the other hand, is there possible to make a game that use data previously downloaded? like: to play a certain game on the web, you have first to download and install the game assets and data on your disk, then you go to the web page an you can play it without problems.

Note that the “save files” are also stored on the directory where the data and assets are.

I hope I’m “understandable” with these questions :blush: :blush:

Thanks in advance!! :smiley: :smiley:

It’s an automatic feature. You can test it: there are some online examples, check if the behaviour is what you’re expecting.

Yep, I think you can do this without troubles.

Thanks for the reply! :slight_smile:

unfortunately, after the game was downloaded, I’ve just close the window, have returned to the page with the game previously downloaded, and I had to download it again. :frowning:

I don’t think it’s a cookies problem, because sites like ArmorGames work just fine (speaking of saved games and the like).

Anyway, I think I’ll try the second way I’ve described, download the data and assets, and then go to play the game.

P.D.: Why I’m interested in moderately large online games? Because I think it’s a better business to provide the game for free, and then get profit with ads and the like. I don’t know how much money you can get with this way, but it’s better for the player. Do you have any tips for this kind of distribution model?

Thanks for the help!! :smiley: :smiley:

Hmmm I think that it’s something related to the browser and not to Panda. Actually, maybe you can’t assume that every browser caches things as you expect (I’m not a browsers expert, so don’t trust me :wink: ).

Anyway, you can divide your game into packages and rely on Panda’s caching system - in this case you can be sure that Panda doesn’t download packages which the user had already downloaded.

I am not an expert, so my opinion isn’t worth anything, anyway I do think you’re right. :wink:

I think it can depend on how you build your game. Panda can download §packages that it thinks are missing all by itself and store that data somewhere. But you can just as well download, read and write files tha YOU think are needed (say a multifile with new 3d models). As far as I get it one can only read/write files from the ‘start’ folder when running from the web, so check if the file you want to read from there is the file you want, someone else could but a ‘data.dat’ file there.
Still, browsers can do strange things but I don’t think they would delete files from the start dir.

Thank you so much for the help!!! :smiley: :smiley: :smiley:

That section of the panda manual is very useful! (sometimes it’s hard to find what you need if you don’t know what do you need XD ).

I didn’t know that panda3d had a automatic update system, That’s awesome!!!

And yes, browsers can do strange things sometimes; speaking of that, do you guys know if is possible do the inverse, I mean, install the game like you normally would do (with the a awesome ppackage system), and when you start the game, it opens a browser window and redirects you to a certain web site, with the so called ads :smiley: , and let you play normally inside the browser? is that possible?

Also, can I use the p3dproject site as a host for this kind of project? (assume, obviously, that I’ll give a percentage of my revenue to the p3dp admins :wink: )

Sorry for so many questions :blush: :blush: :blush:

And thanks in advance!

Yep, it would be possible, but tbh I don’t think that it would be useful. The point of browser games is that you allow people to play without installing stuff (and this is what increases your userbase), so, imho you’d better avoid creating that “launcher” part.

You’re right, after thinking it for a while, that would be kind of awful :frowning: maybe just sell the game on Desura :slight_smile: :slight_smile: :slight_smile: :slight_smile:

Thanks for the help guys, I’ll change this thread to Solved!