Dowdheur [Lexaloffle Blog Feed]https://www.lexaloffle.com/bbs/?uid=34414 Share RAM to other cart <p>Hi !</p> <p>I'm working on a game project since several months.</p> <p>The player moves in a dungeon in top view, like a 2D zelda, generated randomly.<br /> He must find a treasure randomly placed while avoiding the boss who will chase him from the moment the player is too close to the room where the treasure is.</p> <p>Currently, I find myself a little blocked by the limitations in the code. Also I would like to separate the game into two cards. A first will take care of generating the dungeon, the location of the rooms, etc.<br /> And the second for the gameplay.<br /> Basically, to use the gameloop model, a cartridge will be used for the _init () function, say &quot;init_dungeon.p8&quot;.</p> <p>But the question is: is it possible?</p> <p>Knowing that my game elements (dungeon, player, boss, treasure, etc.) are tables integrating functions, is it possible to transfer this from one cartridge to another?</p> <p>I'm thinking of the cstore function for example: </p> <div> <div class=scrollable_with_touch style="width:100%; max-width:800px; overflow:auto; margin-bottom:12px"> <table style="width:100%" cellspacing=0 cellpadding=0> <tr><td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> <td background=/gfx/code_bg0.png> <div style="font-family : courier; color: #000000; display:absolute; padding-left:10px; padding-top:4px; padding-bottom:4px; "> <pre>cstore (0x4300, 0x4300, 0x1aff, &quot;game_dungeon.p8&quot;)</pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <p>I think I dream a little, but if someone could confirm or deny me some stuff that would be nice ^^</p> <p>Thanks !</p> https://www.lexaloffle.com/bbs/?tid=33879 https://www.lexaloffle.com/bbs/?tid=33879 Tue, 16 Apr 2019 12:21:30 UTC