00:00
00:00
Newgrounds Background Image Theme

Chan99 just joined the crew!

We need you on the team, too.

Support Newgrounds and get tons of perks for just $2.99!

Create a Free Account and then..

Become a Supporter!

Collab of multiple interacting games

1,772 Views | 33 Replies
New Topic Respond to this Topic

I figured out that it's possible to make multiple games on NewGrounds interact with each other by reading from and writing to the same save data, and that you can let players move from game to game by changing the current page from code and/or opening tabs with other games in a collab. I posted a working demonstration of this, getting Phaser, HaxeFlixel, Godot, and Unity all interacting here including a link to the source code.


That would make it possible to have multiple devs write games that are each a part of a larger meta-game universe, and I'd like to see if game devs would be interested writing games for it and/or planning how to structure such a collab. If enough devs would want to participate, it could of course also use artists, musicians, and likely someone or a group of people to weave a captivating story for the meta-universe.


My newsfeed has random GameDev tips & tricks

Response to Collab of multiple interacting games 2020-06-09 11:51:41


Consider this my non-committal statement of interest. I'm between big projects right now and I have a lot of free time on my hands. Though I'm not sure how well I could contribute to something like this. I might be more interested in contributing in a smaller way than making an entry by myself.


I got your meta data save code working, and it's great. Though I did notice that it's easy for players to edit that data in the F12 application menu. Is there a simple workaround for this, or will we have to go on good faith that players won't cheat?


Hope a collab like this pans out! I see so much potential with this idea.


Banner by @MigMoog

BBS Signature

Response to Collab of multiple interacting games 2020-06-09 19:06:48


At 5/29/20 11:40 PM, 3p0ch wrote: I figured out that it's possible to make multiple games on NewGrounds interact with each other by reading from and writing to the same save data, and that you can let players move from game to game by changing the current page from code and/or opening tabs with other games in a collab. I posted a working demonstration of this, getting Phaser, HaxeFlixel, Godot, and Unity all interacting here including a link to the source code.

That would make it possible to have multiple devs write games that are each a part of a larger meta-game universe, and I'd like to see if game devs would be interested writing games for it and/or planning how to structure such a collab. If enough devs would want to participate, it could of course also use artists, musicians, and likely someone or a group of people to weave a captivating story for the meta-universe.


sounds rad, I'd be happy to be involved!

Response to Collab of multiple interacting games 2020-06-10 03:00:29


Thanks @mayorDump and @BrandyBuizel!


No problem if you're not up to making a full game for it mayorDump, but if you do feel like trying to make a game then go for it and if you don't finish then don't worry about it. One of my goals is to plan things out to account for the fact that life happens and not everyone who starts will be able to finish, so in broad terms I was thinking


1. Pick genres, and first just design minimalistic games with core mechanics. At this stage placeholder graphics are fine and you don't need to build interactability into your game yet but should keep plans to implement interactions between games in the back of your mind.

2. Re-convene and see what games we have, then decide how to combine them into a meta-game and the structure of the publicSaveData object. This would also be a good time to invite art, sound, and maybe storyteller people to contribute, especially if we want to use the same character(s) in multiple games.

3. Implement interactability between games, and add art, sound, and polish.

4. Beta test.


and you could help with game integration, assets, and beta testing if the first step falls through.


I'd like to shoot for a few games in the collab (nothing too big for the first time this is attempted) and once some more people post then start planning what genre of games people want to make. I wouldn't hold people to their initial choice, and it wouldn't necessarily be bad if two different people each made say a top-down shooter, but better if not everyone in the collab ends up making the same genre.


I wasn't too worried about obfuscating the save data from players for this project. But the value in the Local Storage key/value pair is just a string that happens to be a JSON encoded object and is displayed like an object instead of a string by browsers, so I think (but haven't tested) that adding any simple string codec between the JSON encoding and reading/writing steps should do the trick -- preferably an algorithm that's easily coded in JavaScript, Haxe, GDScript, and C#.


My newsfeed has random GameDev tips & tricks

Response to Collab of multiple interacting games 2020-06-10 09:56:30


I'm in, but know that different engines may have different default local storage schemes some sort of JSON format should probably be used


I also want to bring up that local storage is going away soon, likely on all browsers. NG API 3.0 is gonna have cloud saves soon. If you want to dedicate to this project you will likely need to port your game to use the new cloud save system at some point in the future, or else risk breaking the chain.

Response to Collab of multiple interacting games 2020-06-10 11:20:35


At 6/10/20 03:00 AM, 3p0ch wrote: 1. Pick genres, and first just design minimalistic games with core mechanics. At this stage placeholder graphics are fine and you don't need to build interactability into your game yet but should keep plans to implement interactions between games in the back of your mind.
2. Re-convene and see what games we have, then decide how to combine them into a meta-game and the structure of the publicSaveData object. This would also be a good time to invite art, sound, and maybe storyteller people to contribute, especially if we want to use the same character(s) in multiple games.


I was thinking this collab would be more planned out from the beginning, but maybe you're right on this. Organizing something like this and depending on each person to deliver would be very tricky, so I think your more open approach is smart. I do think there should be at least a some planning and a vague idea of how the games will connect from the start though, instead of trying to make everything fit together with what we have later on.


Banner by @MigMoog

BBS Signature

Response to Collab of multiple interacting games 2020-06-10 12:31:00


I'm kind of interested in working on this. Currently working on a fighting game but wouldnt mind making a small game. Would Love2d end up working with what you're going for however? I just found out how to get the engine working on the web last month and I know Love2d can move data to JSON files but the filesystem for the web version is all fucked.


play Etehfowr Against

BBS Signature

Response to Collab of multiple interacting games 2020-06-10 23:24:44


At 6/10/20 11:20 AM, mayorDump wrote: I was thinking this collab would be more planned out from the beginning, but maybe you're right on this. Organizing something like this and depending on each person to deliver would be very tricky, so I think your more open approach is smart. I do think there should be at least a some planning and a vague idea of how the games will connect from the start though, instead of trying to make everything fit together with what we have later on.


You are correct, I would like to have some planning of how games will ultimately interact even from the outset. I just wouldn't want to ask people to focus on it too much until folks have at least the core mechanics of their games made so you don't build your game too dependent on having specific interactions with another specific game and then have that dev get tied up with IRL and not finish their game. At the outset, I'd like people to plan along the lines of:


"I plan to make an action game where the player flies a ship/speedboat/whatever (for now just a triangle vehicle placeholder graphic) through a large map of tunnels. This would be a good way for the player to move between games or from zone to zone within a game -- by zooming through the tunnels in my game. They'll fly through the tunnels too fast to be able to make a 90 degree turn at first, but I'd like to have pickups in other games that will activate some 45 degree deflection force fields at intersections that they'll be able to hit in order to make 90 degree turns and reach new areas. Once they get a few of those pickups, they'll be able to take alternate paths through the tunnels to pick up powerups for other games. I might throw in other unlockable abilities like briefly turning into a ghost so you can fly through walls to new areas if I have enough time. Ultimately I'd like to have some blastable walls and a bossfight at the end of the hardest-to-reach tunnel, so I'd also like it if a powerup in someone else's game will give the player blasters in my game. Since my game will be a skill game, I'll plan to make the difficulty adjustable (and maybe even have it default to auto-adjusting to become easier if the player dies a lot) so people don't get too stuck on my game."


That's actually what I'll try to do if we get enough people interested BTW, and if anyone would like more details on what I'll plan at this point then I'd by happy to prattle on.


The other thing we as a group will need to decide before starting in earnest will be how long to spend on the first phase of making the core mechanics. I'm not pro enough to jam something out in a weekend, but if enough devs want to then I'll let you guys at it while I worry about coordinating things and cheer you on. I'd hope to keep developing the core game mechanics to no longer than a month max so it doesn't drag on too long, but this is open for discussion with anyone who might want to contribute.


My newsfeed has random GameDev tips & tricks


At 6/10/20 10:45 AM, GeoKureli wrote: I also want to bring up that local storage is going away soon, likely on all browsers. NG API 3.0 is gonna have cloud saves soon. If you want to dedicate to this project you will likely need to port your game to use the new cloud save system at some point in the future, or else risk breaking the chain.


Oh snap, I never saw word of that! I'm having trouble finding it searching online, do you remember where you saw it so I can look into it and whether any reasonable replacements are coming? Hopefully the NG cloud save comes soon. The other option would be going with IndexedDB like I was originally trying to do, but Godot and Unity will only let me make JavaScript calls which I couldn't get to run asynchronously and properly return data from an asynchronous IndexedDB read request.


As for Local Storage encoding schemes (if I'm understanding that correctly), each of the frameworks' SaveHandler does convert to/from a JSON string when writing/reading data, the browser just displays the JSON string from Local Storage as if it were an object to confuse everyone.


My newsfeed has random GameDev tips & tricks

Response to Collab of multiple interacting games 2020-06-11 01:26:05


At 6/10/20 12:31 PM, TheMajormel wrote: I'm kind of interested in working on this. Currently working on a fighting game but wouldnt mind making a small game. Would Love2d end up working with what you're going for however? I just found out how to get the engine working on the web last month and I know Love2d can move data to JSON files but the filesystem for the web version is all fucked.


Hmm, I haven't used Love2d or for that matter Lua before. To get full interactivity with the other games in the collab, it would need a way of accessing Local Storage on the player's browser (and specifically Local Storage for ungrounded.net), which is usually done in JavaScript. If there's a way of running JavaScript functions from Love2d then it should be doable, but so far I haven't found one. (Aside from converting a Love2d game to JavaScript through Emscripten with love.js and then using the Phaser implementation of SaveHandler, but that would be insane torture for many reasons.)


If it's not possible to access Local Storage from Love2d, it would be possible to have a Love2d game be the last game in the collab that a player plays (either the last bossfight or after ultimate victory, or maybe even on complete defeat without an easy way of restarting). A game could launch the Love2d game without the ability to pass any data to it and without Love2d being able to return control to another game in the collab. But that's probably not what you want to do.


My newsfeed has random GameDev tips & tricks


At 5/29/20 11:40 PM, 3p0ch wrote: I figured out that it's possible to make multiple games on NewGrounds interact with each other by reading from and writing to the same save data, and that you can let players move from game to game by changing the current page from code and/or opening tabs with other games in a collab. I posted a working demonstration of this, getting Phaser, HaxeFlixel, Godot, and Unity all interacting here including a link to the source code.


Once I realized saves were in common when mismatched data was imported into a game.

To which I thought it would be nice to exploit this thing and make small easter eggs that detect if a game has been completed and unlock something in another game.


If my thought was limited to small EE, this prototype is quite ingenious: above all the idea of making multiple engines communicate each other (having different ways of storing data).


I hope something comes up, I'm really curious to play a multi-genre project like this and what

ideas this sort of data exchanging can offer.


The only drawback that comes to mind is too many windows can lead to a performance decrease in some hardware, as well as create a general confusion in the browser tab.

Response to Collab of multiple interacting games 2020-06-11 06:29:44


At 6/10/20 11:42 PM, 3p0ch wrote:
At 6/10/20 10:45 AM, GeoKureli wrote: I also want to bring up that local storage is going away soon, likely on all browsers. NG API 3.0 is gonna have cloud saves soon. If you want to dedicate to this project you will likely need to port your game to use the new cloud save system at some point in the future, or else risk breaking the chain.
Oh snap, I never saw word of that! I'm having trouble finding it searching online, do you remember where you saw it so I can look into it and whether any reasonable replacements are coming? Hopefully the NG cloud save comes soon. The other option would be going with IndexedDB like I was originally trying to do, but Godot and Unity will only let me make JavaScript calls which I couldn't get to run asynchronously and properly return data from an asynchronous IndexedDB read request.


Third party cookies are definitely going away and safari is gonna auto delete local storage after 7 days. I've seen nothing saying that all browsers are removing local storage (though they are all dropping cookies) but I see this as the writing on the wall.

https://www.techspot.com/news/84552-safari-now-block-third-party-cookies-default-delete.html



As for Local Storage encoding schemes (if I'm understanding that correctly), each of the frameworks' SaveHandler does convert to/from a JSON string when writing/reading data, the browser just displays the JSON string from Local Storage as if it were an object to confuse everyone.


I could be wrong, I know OpenFL has a JSON setting for local saves, and it's not the default. should probably so some tests.


Response to Collab of multiple interacting games 2020-06-11 10:25:48


At 6/11/20 06:29 AM, GeoKureli wrote: I could be wrong, I know OpenFL has a JSON setting for local saves, and it's not the default. should probably so some tests.


Oh, I know what you're talking about now. For HaxeFlixel you wouldn't use the built-in FlxSave, you would add the HaxeFlixel implementation from this post to your Main.hx file to make a public SaveHandler class, modify the data in the SaveHandler.publicSaveData structure, and call SaveHandler.readSave() and SaveHandler.writeSave() which handles JSON stringification by importing js.Browser and using its Json commands when accessing Local Storage. And use SaveHandler.switchToSite(url:String) to switch to another game in the collab.


My newsfeed has random GameDev tips & tricks

Response to Collab of multiple interacting games 2020-06-14 11:47:14


I’ve gone ahead and started on a tunnel runner game that’s still very early in development but has fundamental game mechanics and posted it here to give you an idea of how it will play... at least until I start adding things like collectible coins that boost your speed when you touch them (and could act as currency in other games), unlockable tiles to instantly change direction and get to new areas from crossroads, pickups to unlock stuff in other games, and a mouse-guided turret if I get ambitious. I realize this level is too brutal to be the first thing a player plays and it might not stay in the final game, but I wanted to make sure I could make it reasonably challenging.


Warp points will be the entry/exit points for other games, so the games' SaveHandler.publicSaveData should include a .warpPoint integer so when a player gets sent from one game to another, the “sending” game will use that to say where to spawn within the “receiving” game. (The exit warp in my game isn't active right now since it doesn't have another game to warp the player to yet.)


@mayorDump : If you'd like to try to make something you can fiddle around with core mechanics down for now, if you get it working well then we can add it when we start implementing cross-game interactivity and a theme, and if not then no harm done.


@TheMajormel : While I don't see a good way for getting Love2d to be fully interactive, it looks like it has a love.system.openURL command to open browser pages. If that works (and if a love.js port of the game works) then it might be possible to at least have the collab send the player to a Love2d game as sort of a one-shot thing and then have Love2d send the player back into the collab after they finish the game, although it wouldn't have the full interactivity like other frameworks.


@HealliesGames : I remember you probably don't have time for it but you're welcome to participate if you like. In practice, when the player moves between games most of the games will probably make the player's current browser page completely switch to the page of the game it's switching to, so it shouldn't run into performance issues from multiple tabs open -- the option of opening multiple tabs would be more for niche use cases of needing to interact, like puzzle games where you might want to be able to manipulate worlds simultaneously to cut down on backtracking to get things set up.


@BrandyBuizel @GeoKureli and anyone else : If you haven't already, turn on the Follow button in the top right of this thread's page so we won't need to tag everyone participating. I'll try to post progress updates at least every week if not more frequently.


My newsfeed has random GameDev tips & tricks

Response to Collab of multiple interacting games 2020-06-14 12:03:44


do you have a timeline for this, my life just became a lot busier this month and I may not be able to commit to this

Response to Collab of multiple interacting games 2020-06-14 13:56:29


At 6/14/20 11:47 AM, 3p0ch wrote: If you haven't already, turn on the Follow button in the top right of this thread's page so we won't need to tag everyone participating. I'll try to post progress updates at least every week if not more frequently.


Oh, I didn't even know I could do that


Banner by @MigMoog

BBS Signature

Response to Collab of multiple interacting games 2020-06-14 18:22:49


I'm low-commital right now like george, but I'll slap the follow to stay updated just in case

Response to Collab of multiple interacting games 2020-06-14 19:59:11


At 5/29/20 11:40 PM, 3p0ch wrote: I figured out that it's possible to make multiple games on NewGrounds interact with each other by reading from and writing to the same save data, and that you can let players move from game to game by changing the current page from code and/or opening tabs with other games in a collab. I posted a working demonstration of this, getting Phaser, HaxeFlixel, Godot, and Unity all interacting here including a link to the source code.

That would make it possible to have multiple devs write games that are each a part of a larger meta-game universe, and I'd like to see if game devs would be interested writing games for it and/or planning how to structure such a collab. If enough devs would want to participate, it could of course also use artists, musicians, and likely someone or a group of people to weave a captivating story for the meta-universe.


I'm interested in this. Not necessarily right now, but I'd be down for this sometime in the future.


This is a signature. Aren't I creative?

Response to Collab of multiple interacting games 2020-06-14 22:58:38


No problem, I'll likely get a new part-time job soon that I'll need to focus on myself, but I'll plan to keep at this in my free time and still post updates periodically. And no specific deadline for the project -- my original thinking of keeping the first phase less than a month was so you guys don't just finish in a week and get bored / lose interest waiting or anything.


My newsfeed has random GameDev tips & tricks

Response to Collab of multiple interacting games 2020-06-15 11:09:00


At 6/14/20 11:47 AM, 3p0ch wrote: @HealliesGames : I remember you probably don't have time for it but you're welcome to participate if you like.


Willingly!

I'm fine with any genre, for details we can discuss it via PM.


Response to Collab of multiple interacting games 2020-06-15 13:29:53


I've thought about it, and I've decided that it would be best for me to pass on contributing to this collab with a game of my own. It's a cool idea with tons of potential. It seems like a good way to collaborate with other NG creatives, which I've wanted to do for awhile. But I've always had a lot of difficulty making fun games, even simple ones, so this would probably end up eating up a significant amount of my time. I want to spend more time learning more programming tricks and ways to improve my workflow. I've also got another collaborative project lined up, and I should focus on that sooner than later. My last project taught me how important focus is in gamedev, and I think working on this collab too would stretch myself too thin.


If there's any smaller way I can contribute to this collab, let me know! I can be provide very in-depth feedback in the games if anyone could use it. I'll be keeping an eye on this project at least. Good luck, everyone!


Banner by @MigMoog

BBS Signature

Response to Collab of multiple interacting games 2020-06-15 14:22:54


@3p0ch


Would it be cool if I can have it working as an interactive "game over" scene? I was thinking that every time someone dies/fails in the other games then it'd send the player to the page, they would have to play through it to get back to the main page.


just an idea to throw out there. thinking about the limitations of what im working with and how it can still be in theme with the collab.


play Etehfowr Against

BBS Signature

@mayorDump Beta-testing would be very useful and is something I've felt is very lacking on NewGrounds, so mosdef drop in when we get to that point!


@TheMajormel That's a really good idea. I would worry a little that in practice it could end up making the game more frustrating for the players if they die in a game and then have to go through a bunch to retry the level where they died. But maybe if the game they died in boosts their stats or something each time they die and respawn to make it easier on the next run then it would be more palatable.


The other thing I realized is that if there are a small number of major plot events in the meta-game where you could jump in then you could essentially write one game with your core mechanics and have a few "levels" with one level for each plot event, and upload it as a few different games to NewGrounds with each upload just being for one level. At plot transition points another game could call your game at the URL for that specific transition point, and that level of your game could send the player back to the right spot in the collab afterward. For example, if the collab theme ends up being about island hopping in the ocean and my game gets themed to be a sailing game, then at some point there could be a Kracken attack that gets handled with the Love2d game. And no worries about spamming the portal with multiple games if you do that -- it's possible to just upload a project and in the preview window make it viewable by everyone; collab games can switch to an uploaded but unpublished game in preview mode just fine. (In fact that's what I did with the prototype to avoid spamming the portal.)


But first things first, see if you can write a test Love2d game and make your game open a browser URL from code, and whether it still works after porting it to JavaScript for an HTML5 build and uploading as a NewGrounds project to preview. If so and if it opens as a new tab instead of replacing the page where the Love2d game was running, then you could try opening the JavaScript that gets created for the HTML5 build and searching for the URL of the site you're opening, and if you see something along the lines of window.open(url); then try changing it to window.open(url, "_parent"); and see if that makes it do what you want.


My newsfeed has random GameDev tips & tricks

Response to Collab of multiple interacting games 2020-06-21 01:12:48


I've got the gameplay mechanics of my game mostly done now and the preview is here. Definitely much nicer than earlier; it's got upgrade pickups (for now just affecting this game but they could affect collab games), upgrades that'll make moving around easier as the game progresses, a turret and blastable walls, coins to act as a score throughout the meta-game, and to reduce rageiness instead of insta-death if you run into a wall you bounce off and take damage depending on the angle of impact (that's for non-blastable walls; blastable walls are still insta-death but there won't be a lot of 'em).


It still just has placeholder graphics and no sound, but more importantly needs level design so I'll focus on that next.


My newsfeed has random GameDev tips & tricks

Response to Collab of multiple interacting games 2020-06-21 13:55:55


At 6/21/20 01:12 AM, 3p0ch wrote: I've got the gameplay mechanics of my game mostly done now and the preview is here.

You looking for feedback yet? I'd say right now it's way too difficult to navigate. I can go more in-depth if you'd like


Banner by @MigMoog

BBS Signature

Response to Collab of multiple interacting games 2020-06-21 21:13:42


At 6/21/20 01:55 PM, mayorDump wrote:
At 6/21/20 01:12 AM, 3p0ch wrote: I've got the gameplay mechanics of my game mostly done now and the preview is here.
You looking for feedback yet? I'd say right now it's way too difficult to navigate. I can go more in-depth if you'd like


Always up for some. I would plan to make the initial areas that players explore be pretty wide open and simple to navigate while gradually getting tougher as upgrades are unlocked, but if it needs something like a tighter turn radius to increase maneuverability (in addition to the 90 degree turning ability) then better if I make changes now, before designing levels around the current turn radius.


My newsfeed has random GameDev tips & tricks

Response to Collab of multiple interacting games 2020-06-22 16:00:23


At 6/21/20 01:12 AM, 3p0ch wrote:
Always up for some. I would plan to make the initial areas that players explore be pretty wide open and simple to navigate while gradually getting tougher as upgrades are unlocked, but if it needs something like a tighter turn radius to increase maneuverability (in addition to the 90 degree turning ability) then better if I make changes now, before designing levels around the current turn radius.


Completely agree with that approach. The later you make core changes like that, the harder they'll be to implement.


I had a pretty tough time with the demo, and I think the turning radius is probably the biggest problem. Only having wide turns while not being able to control acceleration makes it very easy to crash into walls and miss the small collectables. Breaking doesn't feel like an unlockable bonus, but an important function that you're keeping from them at the beginning. In general I think you should make controlling as easy as possible, allowing you to ramp up the difficulty in other ways.


The camera is disorienting, the way it pans around the center yet is based on the ship's rotation. I think keeping the ship at the center of the screen would work, but I'm guessing you want to show more ahead of the ship's direction... Maybe lock the camera's rotation axis on the ship and have the level rotate around it instead? The current camera solution also makes the turret fire difficult. Since the ship and the map is always moving, the targeting hard to predict. I think either the origin of the shot or the target has to have a constant position on the screen for the turret mechanic to feel reliable.


The sharp turn ability really messed with me, and I wish I could pinpoint exactly why. Even now that I understand how it works, the sudden turn catches me off guard. Sometimes it feels like it turns in a direction that I didn't expect. This may be one of those mechanics that makes total sense to the designer on paper, but is difficult for players to get a handle on.


Keep us posted on your progress!


Banner by @MigMoog

BBS Signature

Response to Collab of multiple interacting games 2020-06-27 12:21:23


Ok, I made a bunch of changes and the core mechanics seem funner although maybe still a little on the punishing side with the wall collisions, at least until players git gud and quit making so many wall collisions. Here's the link again still just focusing on core mechanics; I don't plan to make these levels be actual game levels (and certainly not with all the powerups in one pile) but they give a sense of easy and intermediate difficulty.


One potential concern I have is that a key to playing this well will be to keep your speed under control since I'm giving people enough rope to hang themselves, and players might get frustrated if they just can't keep their speed under control intuitively, especially when I get to the point of adding enemies that'll chase them so they can't dawdle too much. The fine line between a fun challenge and frustration is one I struggle with, and for the collab I'll plan to make the difficulty be adjustable so this game won't kill it for players who don't get the hang of it.


My newsfeed has random GameDev tips & tricks

Response to Collab of multiple interacting games 2020-06-28 15:30:01


At 6/27/20 12:21 PM, 3p0ch wrote: Ok, I made a bunch of changes and the core mechanics seem funner although maybe still a little on the punishing side with the wall collisions, at least until players git gud and quit making so many wall collisions. Here's the link again still just focusing on core mechanics


Big improvement! Feels way better.

The phasing mechanic using F reminds me of a similar concept I struggled to get working well in one of my games. It's a bit tricky for the designer to convey and the player to control. In this case, I can't tell where the ship's going to appear when I hit F. The destination is so far ahead that I usually just warp out of bounds.


Banner by @MigMoog

BBS Signature