Tag Info

Hot answers tagged

7

window.localStroage is a more modern alternative to cookies. It allows you to store (semi-)persistent data in the users web browser which will survive a browser restart. The client-sided javascript can access it without having to consult a server, which makes it quite fast to access from the client. But contrary to cookies, localstorage is not directly ...


5

Many (especially older) cartridge-based consoles have homebrew development subcultures that have built CompactFlash-based cartridges that you can purchase, load up with your home-brew ROM, and insert into a (usually modded) system. For the NES, the most popular option seems to be the PowerPak from RetroZone. It does not appear to require a modded NES, since ...


5

I would probably start with the following schema: Slot (ID, CharacterID, SlotID, ItemID) where Slot is the name of the table ID is the table's primary key CharacterID is a foreign key that points to the character SlotID is the slot's ID going from 1 to 64 (or 0 to 63, or whatever) ItemID is a foreign key that points to the item (ID of a specific ...


4

The overall problem by using any text-based solution is that they are highly unreliable and naive implementations are often prone to data integrity issues. This is where david's suggestion to use a database becomes important. Databases offer you the ability to write entries to a table without worries about concurrent operations from other connections. ...


3

First, your concerns are definitely valid and this is not "premature optimization." The problem is, std::deque::insert invalidates all iterators and references, so deque is not actually useful for this. What I did to solve this problem is create a wrapper data structure around std::vector (I called it a perma_vector) that stores a vector of ...


3

You need to ensure your game will run properly on the NES hardware. With many 8 and 16 bit consoles, there are limited times you can access the hardware registers. Accessing registers outside the allowed time often results in the program not displaying any output. One emulator to consider is no$nes, another is fceux. The no$nes will warn you if you violate ...


2

You might want to consider logging to a database, such as MySQL or one of the various "nosql" plain old tables. (If your user base is "massive", there's paths to scaling with more servers or outside services like Amazon or Azure...) In one table, you can have a row for each log entry, and a column with things like the time, the player, the action (log on, ...


2

This is a pretty big question and I think you might be better served by asking each part separately. That said, two of your points (viewport and collision) are essentially about accessing "nearby" objects efficiently. The way to do this is to use some kind of spatial data structure (aka spatial index). The simplest one is to have a two-dimensional array ...


2

Having username in userstats is redundant. You probably would want to key userstats.id_user and users.id_users. userstats.id_stats as auto incremented would be ok to reference from an npc interaction. Remove Coords from userstats. table: playerLocation id_user | playerX | playerY | levelName 1 | 211 | 105 | myMap2 Remove experience from ...



Only top voted, non community-wiki answers of a minimum length are eligible