deep-entertainment / issues

Issue tracker for deep Entertainment projects
1 stars 0 forks source link

Extending Four Side Room to (flexible) Eight Side Room #7

Closed ThmsKnz closed 2 years ago

ThmsKnz commented 2 years ago

Project:

Is your feature request related to a problem? Please describe. Having a four side view sometimes is not sufficient in case there are five to six views that need to be arranged in one scene. Example would be the floor in Carol's Home where there are more than 4 views (e.g. kitchen door, bathroom door, sleeping room, living room, closet, main door).

Describe the solution you'd like I've therefore added a new class EightSideRoom in my game that is similar to the FourSideRoom which allows to define up to 8 textures and which jumps on left/right click to the next available texture clockwise or counter-clockwise. The class can also be used to define a three side room as it skips all views with an empty texture.

Describe alternatives you've considered Another alternative I used was to extend the FourSideRoom class for a dedicated five view scene by overwriting the _left_texture_set and _right_texture_set functions to embed an additional fifth scene into the FourSideRoom navigation. But I would rather see this as workaround and would favor a flexible EightSideRoom solution.

Additional context EightSideRoom_Example .

dploeger commented 2 years ago

Very cool. Can you create a pr for this?

ThmsKnz commented 2 years ago

OK, PR is created. Bear with me if it is not perfect. It's my first pull request and took me awhile to get familiar with git and GitHub :-) I first tried it without forking which failed due to missing authorization when pushing the branch. As said, I'm a newbie here...

MikaelNyqvist commented 2 years ago

I like this very much! It takes care of all the chores a +FourSideRoom entails. Would it work for 3-sides too?

ThmsKnz commented 2 years ago

Yes, it works for 2 or 3-sides as well.

MikaelNyqvist commented 2 years ago

Excellent! (I see now that it says so in the description). :)

dploeger commented 2 years ago

Fixed in deep-entertainment/egoventure-example-game#7