Forum rules - please read before posting.

Run 2D and 3D versions in parallel

Firstly - AC is blowing me away! I keep coming across options and marveling how its incorporated so many different variations of graphic adventure features.

Anyway, i'm toying with putting together a PoC for a 2D/3D revival of a game.
There's no point joining the long list of hopefuls and ending up not completing the project, so I wont mention what i'll be working on, suffice to say its a classic 2D adventure.

What I would love to do is run both the new 3D version and the old classic 2D version in parallel, allowing you to switch between the two at any time... exactly how the Monkey Island remasters allow you to switch between old and new.

Of course, that's easier. If you have the original low-res images, but upscale them to match the resolution of the new artwork, its a fairly simple process to swap the assets with their newer counterparts.

However, switching between 2D/3D would be much trickier. For starters any clicks in 3D space need to be translated to 2D X/Y coords for them to run perfectly in parallel. (Don't get me started on trying to match the walkable areas and paths etc).

Before I embark on this - does anybody have any experience with this or can point me in the right direction on how it might be achieved?

I think that rather than running it in parallel, it might be easier to switch the scene to 2D and then just translate the player position to 2D coords and place the character in that position.

All controls and UI are switched to 2D and where they'll all be using the same inventory and variables - in theory there's not really much else to change? It may need a script to add a secondary texture to each inventory item, so the secondary texture (image) is used rather than the primary?

Thoughts, theories and suggestions greatly appreciated.

Ta
Kev



Comments

  • Welcome to the community, @KevRev.

    That's certainly an ambitious idea!  I would definitely recommend, however, that you do "start small" and first get to grips with just one perspective type (or both, but separately), before trying to merge the two.

    I imagine that you'd have a fair bit more to tackle than perhaps it seems at first glance.  While variables, inventory, translations etc would all carry over, you'd also have to contend with the save system.

    AC needs to record changes made to scene objects in order to save their state - for example, the visibility of a mesh or sprite (see the Manual's "Saving scene objects" chapter for more).  If both 2D and 3D equivalents of each object are necessary (i.e. a model and a sprite), then changes made to one would have to be made to both.

    I'd imagine that you'd want - where possible - to combine both objects into one, and disable components through custom script as necessary.  For example, a Hotspot would have both 2D and 3D Colliders (for click detection in both modes) - and a custom script would toggle one on and the other off as appropriate.

    I don't know the extent to which you'd make use of 3D, but it may be that you'd need separate cameras as well.  Since the "active camera" is also included in save game files, you'd also need to have a way of knowing what the active equivalent is in case the player switches mode before loading a save.  The option would (presumably) be independent of save game files, and instead stored as Options Data.

    The 2D/3D NavMesh switching is also a very big problem.  What I would first look into, then, would be to see if it's possible to stick to just one mode technically-speaking, so that graphical assets are swapped out, but NavMesh/Collider components are retained.  In other words, you'd have a normal 2D game that can support 3D graphics, or vice-versa.  Either way, you'd keep the same NavMesh, Cameras and Collider types - and just swap out the graphics.

    3D games can feature 2D sprite-based characters, and 2D games can support 3D models.  Just be aware that there are special considerations to make, e.g. in the case of a 3D model in a 2D scene, you'd need to make use of a shader that reacts to changes to its "Sorting Order" value, which is necssary for 2D characters to be properly drawn behind foreground objects.
  • Some great food for thought thank you. What about potentially making us of scene switching? Have the same scene duplicated as a 2D and 3D version? Then just switch between the two? If that's feasible, I may just go ahead and build a prototype of a single scene and play around with switching. :) It would solve the cameras/mode/save game issues and having to worry about sorting orders etc.
  • Sure - that's another approach.  But again, you're going to have to keep track of changes made in one scene and apply them to another.  Variables and scene objects alike.

    You'll definitely simplify things if the "2D/3D" option is used like a regular Global Variable and not stored as Options Data.  What you'd generally want to then do is apply whatever changes were made in one scene when the new one is loaded (through script, you can read the saved data changes made to another scene).

    This'd probably be done in the OnAfterSceneChange custom event, so that you can set the scene up to match it's 2D/3D counterpart.
  • Ok that's great advice thank you. I'm actually getting along really well with the 3D side at the moment so I'll stick to that for now whilst I'm learning it all. I bought this back in 2014 and only just starting to use it now. It's an absolute masterpiece :) I've used lots of different engines in the past, but none are so comprehensive. Thank you
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.