# Problems with framerate

**URL:** https://discourse.processing.org/t/problems-with-framerate/8998
**Category:** Libraries
**Tags:** homework
**Created:** [March 6, 2019, 8:02am UTC](https://discourse.processing.org/t/problems-with-framerate/8998 "2019-03-06T08:02:40Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![jensemand](https://avatars.discourse-cdn.com/v4/letter/j/b38774/32.png) [@jensemand](https://discourse.processing.org/u/jensemand)
#### Post date: [March 6, 2019, 8:02am UTC](https://discourse.processing.org/t/problems-with-framerate/8998/1 "2019-03-06T08:02:40Z")

</div>

Hi, I am trying to recreating the game Undertale for a project at my school, however I have a problem with the framerate. I want the framerate to be at 60 but it is around 20 to 30. It may be because of the pictures I load in draw but the quality aren’t to high on those.

---

<div class="post-metadata">

### Author: ![FSXAC](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/fsxac/32/3995_2.png) [@FSXAC](https://discourse.processing.org/u/FSXAC)
#### Post date: [March 6, 2019, 8:14am UTC](https://discourse.processing.org/t/problems-with-framerate/8998/2 "2019-03-06T08:14:00Z")

</div>

Could you post your code or a link do your code somewhere? It’s most likely that in your draw function you’re calling too many things to draw at once, or something in memory that is hogging up all the resources.

---

<div class="post-metadata">

### Author: ![jensemand](https://avatars.discourse-cdn.com/v4/letter/j/b38774/32.png) [@jensemand](https://discourse.processing.org/u/jensemand)
#### Post date: [March 6, 2019, 8:29am UTC](https://discourse.processing.org/t/problems-with-framerate/8998/3 "2019-03-06T08:29:00Z")

</div>

I am only showing one picture at a time and i have increased the available ram processing can use to 1600 MB but the framerate still isn’t as high as it should. It may be because i have used a lot of "PImage"s and i don’t know how i can reduce the number of PImage’s

---

<div class="post-metadata">

### Author: ![jeremydouglass](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jeremydouglass/32/20_2.png) [@jeremydouglass](https://discourse.processing.org/u/jeremydouglass)
#### Post date: [March 7, 2019, 10:47pm UTC](https://discourse.processing.org/t/problems-with-framerate/8998/4 "2019-03-07T22:47:18Z")

</div>

> [@jensemand](#):
>
> It may be because of the pictures I load in draw

There is no way to know if you don’t share your code. There are lots of things you might be doing that could be optimized – but you can’t describe them to us, because you don’t know you are doing them! That’s the point of code review – if you already knew what was wrong, you wouldn’t need help.

To understand how sharing your code lets others on this forum help you debug, read this:

> **[How to create a Minimal, Reproducible Example - Help Center](https://stackoverflow.com/help/minimal-reproducible-example)**
>
> Stack Overflow | The World’s Largest Online Community for Developers

---

<div class="post-metadata">

### Author: ![jeremydouglass](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jeremydouglass/32/20_2.png) [@jeremydouglass](https://discourse.processing.org/u/jeremydouglass)
#### Post date: [March 27, 2019, 7:22pm UTC](https://discourse.processing.org/t/problems-with-framerate/8998/7 "2019-03-27T19:22:06Z")

</div>

Please free to post any questions you have about code – or if you have completed something that you just want to share, post it to the Gallery!

---

<div class="post-metadata">

### Author: ![kll](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kll/32/964_2.png) [@kll](https://discourse.processing.org/u/kll)
#### Post date: [March 28, 2019, 2:55am UTC](https://discourse.processing.org/t/problems-with-framerate/8998/8 "2019-03-28T02:55:26Z")

</div>

[closed]  
OP started new topic:  
[Problems with framerate and loading pictures](https://discourse.processing.org/t/problems-with-framerate-and-loading-pictures/9670) !

---

<div class="post-metadata">

### Author: ![jeremydouglass](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jeremydouglass/32/20_2.png) [@jeremydouglass](https://discourse.processing.org/u/jeremydouglass)
#### Post date: [March 28, 2019, 4:31am UTC](https://discourse.processing.org/t/problems-with-framerate/8998/9 "2019-03-28T04:31:51Z")

</div>


