Design I’ve heard that games like Cuphead can’t be made in Gamemaker due to fps issues, but...

Discussion in 'Game Design, Development And Publishing' started by DankMemes, Oct 7, 2018.

  1. DankMemes

    DankMemes Member

    Joined:
    Sep 25, 2018
    Posts:
    27
    If you compile the code in C++ which I heard you do when creating a final executable, would a game like cuphead be possible?
    I’m hust curious because you just see so many popular pixel art games and very limited vector graphics and the like.
     
  2. chamaeleon

    chamaeleon Member

    Joined:
    Jun 21, 2016
    Posts:
    579
    I'm quite sure it can be done in GMS. The more important question is probably WHO can do it in GMS. "50,000 frames of amazing hand-drawn animation".. Feel up for the task?
     
    sitebender likes this.
  3. FrostyCat

    FrostyCat Member

    Joined:
    Jun 26, 2016
    Posts:
    3,024
    Whenever I hear someone preface a statement around here with "I heard that GM can't do X" or "my friend told me GM doesn't support Y", I question the source's credibility and whether it is actually the poster himself. And almost every time the source turns out to be either uneducated, baseless or both.
     
    Amon and Toque like this.
  4. TrunX

    TrunX Member

    Joined:
    Jun 30, 2016
    Posts:
    131
    I don't think a game like Cuphead should be a problem in GameMaker. Sure if all the sprites and fluent animations are made for FullHD or even 4k resolution displays GM will generate a lot of texture pages and this might result in problems with older PCs/GPUs and the mobile exports. But otherwise it should be totally possible.
     
  5. DankMemes

    DankMemes Member

    Joined:
    Sep 25, 2018
    Posts:
    27
    You’ve been reported.
     
  6. Morendral

    Morendral Member

    Joined:
    Jun 27, 2016
    Posts:
    307
    For what? Hurt feelings?
     
    kupo15, JackTurbo, rIKmAN and 4 others like this.
  7. Nocturne

    Nocturne Friendly Tyrant Forum Staff Admin

    Joined:
    Apr 13, 2016
    Posts:
    6,104
    I have reviewed the report and see no harm in @FrostyCat's comments. That member can be short on tact sometimes and can be quite abrupt, but I see no malice in the comment, and (in general) what they say is true, especially given their vast experience on these forums. Saying "I have heard..." does indeed rest any credibility from the question being asked...

    As for what you are asking, a game like cuphead can indeed be made in GMS and although the most famous/well known games use pixel art, there are also a number of games that use hi-res art (and even MORE when you consider the number of agmes made that people don't realise were made with GMS ;) ). Check out SYNTHETIK, for example, or SYMMETRY, or PAPER KNIGHT... I could go on, but hi-res games are more than possible with GMS.
     
  8. Mert

    Mert Member

    Joined:
    Jul 20, 2016
    Posts:
    96
    A question not related with the topic.

    Can I put "Made with Game Maker Studio 2" text and Game Maker logo at the entrance of my game ? Do Yoyogames allow us to do something like this ?
     
  9. Morendral

    Morendral Member

    Joined:
    Jun 27, 2016
    Posts:
    307
    Butterscotch shenanigans does this on their games, so i assume it's ok since they are featured by yoyo and even write tech articles
     
  10. sitebender

    sitebender Member

    Joined:
    Sep 13, 2016
    Posts:
    648
    I could do it in GameMaker. The catch is I'm no artist. I've made high resolution games and shmups with hundreds of collision detection bullets both move at 60 fps and 1080p. Making Cuphead or a similar game in GameMaker should be fine.

    It's a high resolution shooter. I've even noticed compiling in YCC tends to make the game slower, when people tell me it goes faster using YYC.

    If you're ever concerned about CPU performance... don't have everything trigger each frame. If you're porting to a phone, keep your object count low.
     
  11. Smiechu

    Smiechu Member

    Joined:
    Jul 14, 2017
    Posts:
    565
    YYC allows way better performance where there is a lot to do for CPU and RAM... like iterating through long buffers, arrays, data structures, complicated math calculations...
    But has almost no inlfluance on GPU and VRAM performance.
    So when we speak about pure graphic performance YYC should not even be mentioned here...
    But in my opinion it's always better to target YYC compilations, as you never now where the advantages come in handy.
     
  12. sitebender

    sitebender Member

    Joined:
    Sep 13, 2016
    Posts:
    648
    The advantages seem to be less fps on lesser systems when using YYC. The system hasn't changed, the programming hasn't changed. Only the compiling method. That's just been the experience with my games.
     
    Last edited: Oct 9, 2018
  13. Rayek

    Rayek Member

    Joined:
    Jun 27, 2017
    Posts:
    129
    Actually, this thread brings up a related question for me. Based on some testing with high resolution assets in GM, I imagine the Cuphead developers made prodigious use of video ram compression?
     
  14. muki

    muki Member

    Joined:
    Mar 5, 2017
    Posts:
    187
    I haven't done 3D on GMS but can it compress sprites/image assets in DXT/S3?

    Games like Cuphead require their animation frames to be compressed in VRAM, which Unity (what Cuphead is made in if I recall) supports natively. I have doubts you're going to render that many high-resolution frames in raw uncompressed form without constant. If GMS compresses stuff in VRAM similarly then yeah I think it's possible.

    Do we know if GMS compresses texture pages in VRAM and what method it uses?
     
    Last edited: Oct 11, 2018
  15. Rayek

    Rayek Member

    Joined:
    Jun 27, 2017
    Posts:
    129
  16. muki

    muki Member

    Joined:
    Mar 5, 2017
    Posts:
    187
    Hopefully it does and it's just not well documented. Texture compression is pretty mandatory for high-frame-count high-resolution projects.
     
  17. Rayek

    Rayek Member

    Joined:
    Jun 27, 2017
    Posts:
    129
    So... No-one knows the answer? Does GM allow us to control video ram texture compression of assets, or not?
     
  18. sylvain_l

    sylvain_l Member

    Joined:
    Sep 18, 2016
    Posts:
    661
    IDK, don-t think so, you can just select what you can put on a texture page to optimize the texture swap, but not what kind of algorithm is used. I never saw any option any where to do something like that. I have kinda assume that they were using png and uncompressed in RAM (A silly assumption, just because that's the format they use internally in the sprite editor)

    take what I-m going to write with a hand of salt:
    I'm not sure it would be that usefull; for what I understood nvida 10xx and 9xx and even generation before implement a Delta color compression algo that is automatically applied to save VRAM bandwith internally in the GPU. Just improved the number of pattern and ratio generation after generation.

    I'm assuming that if nvidia work on that it's to get the most efficient tech that fit their hardware. So got my doubt that using other algo here is that good. (But I'm not very saavy in that field and have no idea how DXT and delta color compression work together or not. But I kinda feel that applying two different algo isn't going for a good gain)

    and let's be clear, png compression ratio is better than DXT as DXT is meant for speed first. The gain would mostly be between RAM and VRAM when you need to feed the GPU. Which is kinda limited in use as by default as I understand GM load all it can of it's texture pages into the VRAM. (at least everything that's used in the active room; and then it stay there)
    Of course for hi-res where you can end with a full VRAM and being handling manually prefetch/flushing any gain is valuable. (but I fear DXT wouldn't yet save your butt if you are in that extreme struggle of full VRAM. Any gain in VRAM would be at cost of GPU power so IDK but feel that would not make your framerate get better... )
     
  19. Rayek

    Rayek Member

    Joined:
    Jun 27, 2017
    Posts:
    129
    @sylvain_l Thank you! I take it, based on your response and the other thread that I found, that this option is not available in GM then. I tested this in the open source alternative That Shall Not Be Named Here, and it saved a tremendous amount of VRAM, with very high resolution limited colour PNG files (only ~75kb file size) that took up around 20mb of VRAM without texture compression, and only around 4MB with.

    So it can be quite useful to have that level of control, depending on the project's asset requirements.
     
  20. muki

    muki Member

    Joined:
    Mar 5, 2017
    Posts:
    187
    I might do some easy tests later as I'm really curious.

    Just have a dead-simple project load up dummy sprites in texture pages. I can monitor VRAM usage and see if it goes up the expected amount for uncompressed 24 or 32 bit images, or if it's less, which would indicate compression.
     
  21. JackTurbo

    JackTurbo Member

    Joined:
    Oct 19, 2016
    Posts:
    713
    I don't think GMS supports any kind of Vram compression, or at least I am fairly sure I remember Mike saying as much on another thread a while back.

    As useful as itd probably be, I'd prefer better tools to load and unload assets into and out of the Vram personally.
     
  22. muki

    muki Member

    Joined:
    Mar 5, 2017
    Posts:
    187
    It's important to note that the resource bottleneck for a game like Cuphead is VRAM (large sprites with many unique frames, and fast gameplay requiring low latency). A different game with high resolution sprites but only 5 frames isn't going to run into that bottleneck. Nor will 1000 bullets flying around. It's not the same thing.

    ~

    So here's an experiment I just conducted. Fresh project, latest GMS2. Room size 128x128. Texture page size 2kx2k. I add a single sprite in the corner of the room and build the executable. I take note of the VRAM usage of the executable using a process monitor, then I scale the sprite. Repeat.

    Sprite size / VRAM usage
    8x8 : 4096 MB
    128x128 : 4160 MB
    512x512 : 5128 MB
    2048x2048 : 20484 MB
    2048x2048 x2 frames : 36868 MB

    If I take that last and second last one. 36868 - 20484 = 16384 per each 2K sprite. Now I can easily calculate how much space raw uncompressed image data (2k) takes. 4 bytes per pixel (RGBA). 4 x 2048 (rows) = 8192. 8192 x 2048 (columns) = 16777216. / 1024 (because 1 MB = 1024 KB) = 16384 on the money. Unless I'm missing something, that's pretty much proof that sprites are uncompressed in VRAM.

    Does that mean games like Cuphead are impossible to make in GMS2? I honestly don't know. I think if you have a platformer where the main character is a 512x512 sprite (fairly high resolution) x 100 frames that need to be loaded at any given moment for good fluidity (remember you need transition frames), that's exactly 1GB of VRAM usage. Then there are all your enemies, items and effects. Most of them will be smaller, but there's a variety of them. Then there's the bosses. They are absolutely massive. Remember Hilda Berg's final stage? I'm pretty sure those massive sprites were no less than half the screen resolution. I'm not going to count backgrounds because in theory you could unload/load these from regular RAM in parts as you scroll. And the characters don't move that fast across the screen.

    That's a huge amount of raw sprite data. If memory serves modern video card compression can compress that 8-16 times, more if you use 1bit alpha channels (which look pretty bad, but can work depending on style). Good graphics cards have 6-8 GB VRAM. Most people who game (more casually) have 1-3 GB. So, a game like Cuphead without VRAM compression, I have huge huge doubts. There's my informed opinion.

    Do hope somebody proves me wrong though. I do love that game and how it looks!

    Maybe by buffering only a few "future" sprites into VRAM every several frames? Would it be able to do this every half second without stutter? Move half a GB of texture data from RAM to VRAM? If the computer doesn't have more than 8GB of RAM, then in would have to move stuff off disk constantly, which would be impossible to do fast enough.

    In short, texture compression seems to make games as fluid and high-resolution as Cuphead possible. I don't see a way to enable that in GMS.

    I think getting half-way there (resolution and num of frames) might be doable, though.
     
    Last edited: Oct 13, 2018
    sylvain_l likes this.
  23. sylvain_l

    sylvain_l Member

    Joined:
    Sep 18, 2016
    Posts:
    661
    thanks @muki for the confirmation.

    theorically;

    cuphead in GM is still doable. Would be much nicer if it was handled automatically by GM, but basically the decompression of those compressed texture is just a shader thing that is damn fast as it's/was handled hardware by GPU since a long time.
    It's like anything in 3D with GM, you just have to do it yourself.

    if all the bottleneck you have is the VRAM, and not much in term of calculation on the GPU; the GPU can handle decompression of those DXT compressed texture in a blink.
    most of those algo and other are implemented in OpenGL, and GMS2 give us access to GLSL & GLSL ES.

    to be honest just wandering on google I just came across the code of decompression of like the DXT1 http://www.ludicon.com/castano/blog/2009/03/gpu-dxt-decompression/ you could even code your own shader to do the job :D

    so if you want to do it, you'll have to handle the fuss of managing the textures in VRAM and the decompression by yourself. Much more work that some other engines offer.

    p.s.
    but honestly if you want to go high res in GM the easiest way is atlas and skelethal animation (with spine, or any other) not the fuss of handling highres spritesheets. But if you really want to hand draw it all. your call.
     
    Last edited: Oct 13, 2018

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice