Advertisement
smc_gamer

SML Roadmap (9/10/11)

Sep 11th, 2011
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.69 KB | None | 0 0
  1. Sep 10 17:54:45 <smc_gamer> Well, let's see...
  2. Sep 10 17:55:26 <smc_gamer> For now, my plans for collision detection will be to split the level up into chunks and check sprites against chunks first, then objects inside the chunk.
  3. Sep 10 17:56:40 <smc_gamer> Physics will probably be simple; momentum is calculated in pixels per frame.
  4. Sep 10 17:57:08 <smc_gamer> Chunk collision testing will also have to check whether a sprite is near an object, too.
  5. Sep 10 17:57:37 <smc_gamer> If you're heading at five pixel per frame, and you're four pixels from a block, next frame you'll go in the block, which looks pretty choppy.
  6. Sep 10 17:57:46 * reghrhre has quit (Ping timeout: 264 seconds)
  7. Sep 10 17:58:25 <smc_gamer> So the collision check will also have to check pixel near sprites at the sprites speed, but that shouldn't be too much of a performance problem.
  8. Sep 10 17:58:56 <smc_gamer> As for blocks, there are only a few types of block behavior (solid, platform, itembox, etc.)
  9. Sep 10 17:59:16 <smc_gamer> So, instead of coding every single block, we could code a few types and then just reskin the others as necessary.
  10. Sep 10 17:59:43 <Joey> Sounds good.
  11. Sep 10 17:59:52 <smc_gamer> SolidBlock could probably handle 85% of all blocks we need to put in, but a few of the more advanced blocks (switch blocks, etc.) will have to have their own classes.
  12. Sep 10 18:00:33 <smc_gamer> Each block will have its own internal settings file, like SMBX's, but it will be overrided if the game finds another settings file.
  13. Sep 10 18:00:47 <smc_gamer> Each file defines things like hitbox, size, animation, etc.
  14. Sep 10 18:01:13 <smc_gamer> Sprites will be implemented as a simple group.
  15. Sep 10 18:01:50 <smc_gamer> I don't have all the kinks worked out of this idea, but I think I can make sprites inherit from a core Sprite class, and only override what needs overriding (behavior, primarily).
  16. Sep 10 18:02:10 <smc_gamer> This could also make it easy to index them, which is essential for fast updates.
  17. Sep 10 18:02:24 <Joey> Hm.
  18. Sep 10 18:02:44 <smc_gamer> All sprites would update on an update loop every frame.
  19. Sep 10 18:02:57 <smc_gamer> I think an array or Collection will suffice for sprite groups.
  20. Sep 10 18:03:18 <smc_gamer> Each sprite and block will have a static ID and an "live" ID, too.
  21. Sep 10 18:03:32 <smc_gamer> The static ID would be like SMBX's block-1, block-2, etc.
  22. Sep 10 18:04:01 <smc_gamer> The live ID is assigned real-time, and will be used to reference individual sprites and blocks.
  23. Sep 10 18:04:19 <Joey> Sounds cool.
  24. Sep 10 18:04:29 <smc_gamer> Live IDs would then be stored in the level file, and new blocks and sprites will be appended to the end of the file when added.
  25. Sep 10 18:04:32 <smc_gamer> </infodump>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement