This site requires JavaScript, please enable it in your browser!
Greenfoot back

Report as inappropriate.

Omerikus
Omerikus presents ...

2019/5/22

HELP

Well i made a really awesome game actually but sometimes I keep getting graphic overloads which is why I removed some Gifs so it can run smoothly but still I get on certain objects errors in this case it s the portal ( class = "Nextlvl") which lead s me to a new level, please can someone tell me what I should do ....

1231 views / 4 in the last 7 days

Tags: game demo with-source

open in greenfoot
Your browser does not support the canvas tag.
OmerikusOmerikus

2019/5/22

The game does work but the Thing is you have to Restart it the application and then load in the new Level manually
OmerikusOmerikus

2019/5/22

Please download this game so you can see it by yourself
ScorcherScorcher

2019/5/22

Your problem is in your Start class code. Here is the fix: GreenfootImage myGif = new GreenfootImage("oe.gif"); That should replace the previous line about GIF images, which was above the act method.
OmerikusOmerikus

2019/5/22

@Scorcher hi thank you very much eveything works fine now but the first screen isn t animated anymore is that normal ? I replaced the top line with your coding but when I did that the whole class didn t work i put your coding into the act method which worked perectly all Errors disappeared but the Gif of my first site did too
ScorcherScorcher

2019/5/22

I now realize I'm an idiot, as "images" are definitely not "GIFS". New solution works, but isn't fast & easy. You need to convert the starting screen GIF (oe.gif I think?) into multiple images, then write code that mimics a GIF. I spent a couple hours troubleshooting your problem, so I'll save you from the struggle and just upload them. I was only encountering an issue with the first GIF, being that it overloaded the memory, but if you need help with the others just let me know.
Super_HippoSuper_Hippo

2019/5/22

The GIFImage class which is used handles animated GIFs. There shouldn't be a need to split it. The images are probably too big.
OmerikusOmerikus

2019/5/23

Well the only problem was that I couldn t start certain Levels the Code you sent me fixed all that but it removed the GIF itself and I just don t know what to do to make it a running GIF without Errors, this game is my first attempt in programming, I just started programming games About 5 months ago and still don t get a few things for example how to run all GIF s without having Errors :/
OmerikusOmerikus

2019/5/23

@Super_Hippo yea that s what I thought too and it is probably the reason why ist causin errors

Want to leave a comment? You must first log in.

Who likes this?

No votes yet.