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

2018/6/14

Scenario doesn't seem to work online

Solringolt Solringolt

2018/6/14

#
Hi, I was actually returning to the site after a (very) long time and saw that my game was no more supported by the current version of greenfoot. I updated it and it's working fine locally on my machine but testing it on the website it looks like it randomly freezes after a few seconds, any idea where this issue could come from? Best P.S.: That's the link to my project Procaryota
danpost danpost

2018/6/14

#
Solringolt wrote...
my game was no more supported by the current version of greenfoot. I updated it and it's working fine locally on my machine but testing it on the website it looks like it randomly freezes after a few seconds, any idea where this issue could come from?
I appears to freeze when an enemy hits the evolution state bar. I would suggest looking into collision codes of the enemy.
Solringolt Solringolt

2018/6/14

#
Thx for the answer, I don't think it's an issue with the code since it happens randomly. For me it can happen at any moment. And locally it works without any issue.
danpost danpost

2018/6/14

#
Solringolt wrote...
Thx for the answer, I don't think it's an issue with the code since it happens randomly. For me it can happen at any moment. And locally it works without any issue.
Okay, it dos not always happen with the evolution state bar. It also happens with the bullets. I still think its some collision code -- possibly in the bullet class or possibly in the enemy class. If you upload the project with source it can be looked at in detail.
Solringolt Solringolt

2018/6/15

#
I published it with the source code, tell me if you have any issues running it locally!
danpost danpost

2018/6/15

#
Solringolt wrote...
I published it with the source code, tell me if you have any issues running it locally!
No problems locally. Also, on first pass through code, I did not spot anything that might cause the "freezing" on the site. May take some time to figure out (if it is possible to figure out). Will look into it further; but, do not expect any results quickly (if at all).
Solringolt Solringolt

2018/6/15

#
Maybe just some strange issue with java runtime?
danpost danpost

2018/6/17

#
There is one thing I have noticed that may or may not contribute to the issue. You have a couple of classes that extend a class that they should not. Specifically, the following class trees under the Actor class are questionable: * ExperienceIndicator > ExperienceState * Bonus > Shield > ShieldIndicator In the first case, I am not sure why you have both classes at all. The ExperienceIndicator class can probably be just removed (with the ExperienceState class changed to extend the Actor class. The second case is more troublesome. First, you should be aware what a subclass actually is (or what extending a class does). A subclass is meant to create the same type object as the class it extends. The only difference is the modifications to the objects it creates that are coded in the subclass. A ShieldIndicator object is not any type of Shield object. I do not believe it to be any type of Bonus object, either. Now, it is an indicator, just like an ExperienceIndicator object is, and both could (not saying you need to) extend an Indicator class that extends the Actor class. Anyway, as far as the ShieldIndicator class, it should probably extend the Actor class. I am even questioning the other Actor class sub-trees (EvolutionPannel, SpellBar and Actions).
You need to login to post a reply.