code_snippets:code_snippet
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
code_snippets:code_snippet [2024/07/20 01:49] – [Platform Info] mrvalentine | code_snippets:code_snippet [2024/10/22 07:17] (current) – [Loading and Drawing Tiled Maps] mrvalentine | ||
---|---|---|---|
Line 5: | Line 5: | ||
I will endeavour to organise these with suitable headings and names, along with explanations of what the code does. | I will endeavour to organise these with suitable headings and names, along with explanations of what the code does. | ||
+ | ---- | ||
===== Short Snippets ===== | ===== Short Snippets ===== | ||
Simple code that can be copied and pasted to achieve a simple function, such as printing simple debug data to the debug console. | Simple code that can be copied and pasted to achieve a simple function, such as printing simple debug data to the debug console. | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ==== Platform Info ==== | ||
+ | |||
+ | [[code_snippets: | ||
+ | |||
+ | |||
+ | Ever load an old project and not sure if it was DesktopDX or DesktopGL? or Windows or Linux? This snippet helps answer that question. | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ==== Drawing When Loaded ==== | ||
+ | |||
+ | [[code_snippets: | ||
+ | |||
+ | |||
+ | Did you know you can start your game while assets are still loading? here is a basic example of it. | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ==== Device Reset With Loading ==== | ||
+ | |||
+ | [[code_snippets: | ||
+ | |||
+ | |||
+ | Here is a basic implementation of handling Device Reset events, with the content loading implementation. | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ==== PSX Scaling ==== | ||
+ | |||
+ | [[code_snippets: | ||
+ | |||
+ | The code required to draw PSX scale resolution games, in Wide Screen! | ||
+ | |||
+ | ---- | ||
===== Long Snippets ===== | ===== Long Snippets ===== | ||
Line 16: | Line 54: | ||
---- | ---- | ||
+ | ==== Frameless Window Draggable ==== | ||
+ | |||
+ | [[code_snippets: | ||
+ | |||
+ | Ever wanted to just use the actual game window and do away with the window frame? give this a try, and you can still drag the window around! | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ==== Loading and Drawing Tiled Maps ==== | ||
+ | |||
+ | [[code_snippets: | ||
+ | |||
+ | This is a roll your own implementation for loading Tiled maps, you can also use MonoGame.Extended to load them too, but this helps you to understand the roll your own process. | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ==== Animated Custom Mouse Cursor ==== | ||
+ | |||
+ | [[code_snippets: | ||
+ | |||
+ | Code to use a custom mouse cursor and also immediate mode is explained briefly. | ||
+ | |||
+ | ---- | ||
===== Multi Part Snippets ===== | ===== Multi Part Snippets ===== | ||
Code that has multiple class files to function. | Code that has multiple class files to function. | ||
+ | |||
+ | ---- | ||
===== Entire Base Codes ===== | ===== Entire Base Codes ===== | ||
Code that requires extensive setup across multiple files. | Code that requires extensive setup across multiple files. | ||
+ | |||
+ | ---- | ||
===== All Your Base Are Belong To Us Codes ===== | ===== All Your Base Are Belong To Us Codes ===== | ||
Code that might take a little more than an hour to set up properly, maybe, not really. | Code that might take a little more than an hour to set up properly, maybe, not really. | ||
+ | |||
+ | ---- | ||
+ |
code_snippets/code_snippet.1721440146.txt.gz · Last modified: 2024/07/20 01:49 by mrvalentine