Please share the size of your compiled game and the RAM memory used while the game is running
Mine : Size : 34 Mb / RAM : 667 000 Kb
I think it is pretty bad for my own and i want to know if itās related to my code or my assets or to Monogame.
Please share the size of your compiled game and the RAM memory used while the game is running
Mine : Size : 34 Mb / RAM : 667 000 Kb
I think it is pretty bad for my own and i want to know if itās related to my code or my assets or to Monogame.
Probably your assetsā¦ are you using the heap a lot?
What is the heap ? Can you explai please ?
There is no relation between the two, as it depends on many factors:
How long have you been coding for!?
How many sound files are you using by the way? are you using .OGG by any chance? this sits in memory uncompressedā¦ unless MG reads it from disk in a streamā¦
I am guessing a lot of your assets are taking up a lot of memoryā¦
Do you understand how compressed formats work?
I am coding since January 2015. So iām pretty young in coding world.
For now, no sound files are used (thatās lso why i am looking of answers) and i think Monogame desnāt accept .OGG files.
A bout compressed format :
Before, ine the pipeline tool, i used to define TextureFomat to Color, but i ended with huge .XNB files (whole compiled project compiled was 940 Mb).
Then i changed most of my images (.PNG) to match with DxtCOmpression paramter of TextureFormat (power of 2 dimensions).
And get the 33Mb size for the whole compiled project.
In the end, memory RAM used became 667 000 Kb instead of 1 450 000 Kb with TextureFomat Color setting.
I donāt know if it is related buti am using spritesheets and then i have a lot of transparency in my images.
Can you still share the size / RAM of your project ?
Aside that, i use arrays often in my code.
And what is āheapā ?
The game is like this : https://www.twitch.tv/xxloudxx/v/95507321
You can use .ogg files in Monogame, in fact, itās recommended.
My deferred engine Deferred Engine Playground - download
has a compiled size of 510 mb (uncompressed textures and large models) and uses 50mb of RAM. I use all the models and textures in my scene.
weirdly enough it doesnāt go up with higher resolutions, but I guess itās only VRAM usage that goes up then.
My Car RPG Bounty Road
Has 490mb of data (uncompressed) and uses 170mb of RAM. In both cases I load all models / textures / sounds up front.
As you answered my request I suppose I should be obliged to answer your slightly remarkable requestā¦
You mentioned you use Arrays and it was mentioned above already, but you really should learn how these store information in memory to have an idea of why your application uses XXXXXXX resourcesā¦ and precisely where it places them tooā¦
Two terms to be aware of, Heap and Stackā¦
I am not sure how much you will get from that link but it looked relevant, I personally study my languages from books and not the fractured internetā¦
However I am unsure how giving you project sizes will help at all as each project is differentā¦ you need to be more specific to make any comparison and also as if It was not obvious already, your coding style will likely be different from another programmerā¦
I would suggest you took a good look through the MonoGame err documentation and hunt down the Git repository and download it and take a look at any comments found within it and learn what things are supported etc., a quick handy method is to go to the download page, start at the earliest version and read the changelog listā¦ I have done this a number of times just to recall what has changed over the yearsā¦ and it can help you to understand how something works, IF it is working and the state it is at as well as give you ideas of things you can utiliseā¦, again that Git [I am not a Gitter yet] stuff might interest you as well as you can break into using Dev builds of MonoGame meaning you can use the latest features nowā¦ I am not on that sort of level yet, but I am in no rush for that stuff, there is so much more that can be done while waiting for other aspects of your projectā¦ each to their own.
P.S.
My tone may come across as a bit rough or direct but I mean everything in the lightest of ways I just donāt like to waste time in such places when getting to the point often is more helpful than hopping back and forthā¦
I will try to look at your link, but i wonder if i will understand it, that seems pretty hardcore.
I didnāt looked at Monogame documentation for a while because it was mostly incomplete and inaccurate for awhile.
about reading the changelog list, itās the kind o f thing an experienced programmer can dive into easily, but for, it will take months to understand the functionality of every corrections or features.
I understand the use of sincerity and direct tone, but when you said :
[quote=āMrValentine, post:8, topic:8296ā]
As you answered my request I suppose I should be obliged to answer your slightly remarkable requestā¦
[/quote], it sounds like āArghā¦, Ok, let me show you this thing any idiot knowā.
you could have just linked the page, or if searching the page was a pain, just tell me to search āManaging Heap Memoryā terms in google.
It is
possible youāll get angry after reading this but thank you for the link.
Donāt let the English [Not American] language confuse you, I was not implying muchā¦ just that The Heap and The Stack are so fundamentalā¦ did you not study C# at all? it is something you learn very early in the languageā¦ especially surrounding Types and Arrays etcā¦
I always assume if someone is getting into a language and is remotely able to put anything together, that they at the very least grasp the basicsā¦ and Memory Management should be right up there, even if just 10% of itā¦ at least have an idea of itā¦ but you shock meā¦ it asks the question, did you copy the code from somewhere and just change the textures or something? not meaning to offend just it is a deductive approachā¦
It is like, I give you a car to build but I give you it in parts, the parts make a Honda Civic, but when I come back a week later and you show me a Toyota Prius, somebody is going to ask questionsā¦
Aaaaaaand this forum broke my browser againā¦ yayā¦
Maybe less āhardcoreā and more c#ish :
But be warned that you canāt program a game (something more advanced than a pong like) without knowing the basics, or you will get into frustration many times.
Even a āsolitaireā/patience games can drive you crazy ^^
I am self-educated and i learn from internet and mostly with these websites :
dotnetperls
tutorials-point (c#)
RBwhitaker
and other devs helping me when facing problems never heard before
Never heard of thoseā¦
Try MSDN, StackOverFlow and if you do a web search for similar sites [Search phrase: Sites like MSDN] I am sure you can find more āgemsā out thereā¦
I too am self educated in coding have a drink to that! [Whiskey for me]
As others are saying too [Learn the basics], go grab a simple book on C#, does not have to be expensive, but regardless of the cost, it will be the most valuable book on your book shelf, and you will add more to it as soon as you get hookedā¦
If you need suggestions of books, just askā¦ but only ask if you are actually going to buy anything, otherwise you are wasting busy peoples timeā¦ we have things to do tooā¦
Channel9 springs to mind, they used to have good videos on coding scenarios such as how to use Async etc.
RBWhitaker does sound familiar actuallyā¦
Just to chime in: Use performance diagnostic tools, the integrated Visual Studio tools are pretty good. Check what is using most memory and maybe try to optimize that. Make sure you donāt have a leak and if you donāt have one you are doing fine.
If you arenāt trying to make mobile apps I would suggest you see this as a non-issue right now and try to focus on game content.