Vista Normal

Hay nuevos artículos disponibles. Pincha para refrescar la página.
AnteayerSalida Principal

Open a Portal to an NES Emulator

14 Junio 2025 at 02:00

The Portal games were revolutionary not only for their puzzle-based, narrative-driven gameplay, but also for their unique physics engine, which let players open portals anywhere and conserve momentum and direction through them. They’re widely regarded as some of the best video games ever made, but even beyond that they have some extra features that aren’t talked about as much. Namely, there are a number of level editors and mods that allow the in-game components to be used to build things like logic gates and computers, and this project goes even further by building a working NES emulator, all within Portal 2.

The main limitation here is that Portal 2 can only support a certain number of in-game objects without crashing, far lower than what would be needed to directly emulate NES hardware. The creator of the project, [PortalRunner], instead turned to Squirrel, the Portal 2 scripting language, and set about porting an existing NES emulator called smolnes to this scripting language. This is easier said than done, as everything in the code needs to be converted eight bits and then all of the pointers in smolnes need to be converted to use arrays, since Squirrel doesn’t support pointers at all. As can be easily imagined, this led to a number of bugs that needed to be sorted out before the game would run at all.

For those interested in code golfing, porting, or cross-compatibility, this project is a master class not only in the intricacies of the Portal 2 scripting language but in the way the NES behaves as well, not to mention the coding skill needed to recognize unique behaviors of the C language and the Squirrel scripting language. But eventually [PortalRunner] is able to get Super Mario Bros. running in Portal 2, albeit with low resolution and frame rate. Since we heard you like games within games, someone else put DOOM inside DOOM so you can DOOM while you DOOM.

Thanks to [Mahdi] for the tip!

Improving Flying Drones By Mimicking Flying Squirrels

Por: Maya Posch
6 Mayo 2025 at 11:00

With the ability to independently adjust the thrust of each of their four motors, quadcopters are exceptionally agile compared to more traditional aircraft. But in an effort to create an even more maneuverable drone platform, a group of South Korean researchers have studied adding flying squirrel tech to quadcopters. Combined with machine learning, this is said to significantly increase the prototype’s agility in an obstacle course.

Flying squirrels (tribe Pteromyini)) have large skin flaps (patagium) between their wrists and ankles which they use to control their flight when they glide from tree to tree, along with their fluffy squirrel tail. With flights covering up to 90 meters, they also manage to use said tail and patagium to air brake, which prevents them from smacking with bone jarring velocities into a tree trunk.

By taking these principles and adding a similar mechanism to a quadcopter for extending a patagium-like membrane between its rotors, the researchers could develop a new controller (thrust-wing coordination control, TWCC), which manages the extending of the membranes in coordination with thrust from the brushless motors. Rather than relying on trial-and-error to develop the controller algorithms, the researchers trained a recurrent neural network (RNN) which was pre-trained prior to first flights using simulation data followed by supervised learning to refine the model.

During experiments with obstacle avoidance on a test-track, the RNN-based controller worked quite well compared to a regular quadcopter. A disadvantage is of course that the range of these flying squirrel drones is less due to the extra weight and drag, but if one were to make flying drones that will perch on surfaces between dizzying feats of agility in the air, this type of drone tech might just be the ticket.

❌
❌