We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I'm taking a programming class for highschool, and we have to convert our Function game into an OOP game. Though the game works perfectly fine in function code, it seems to have problems running in OOP. Neither me or my teacher can figure out what's wrong. Sometimes the obstacles despawn too early or just don't spawn for periods of time. Someone, please help!
Function Version: https://mediafire.com/folder/v93c8204ef8zs/Grumbo_Adventure_funcions OOP version: https://mediafire.com/folder/8b6vbgggomv4l/Grumbo_Adventure_OOP
Answers
Rather than asking folks to download files 1 by 1, you should create a repo: *-:)
https://Help.GitHub.com/articles/create-a-repo/
Or a gist: https://Help.GitHub.com/articles/about-gists/
For your whole project.
And for repos, you can even upload your whole project folder at once:
https://Help.GitHub.com/articles/adding-a-file-to-a-repository/
Or if you prefer, you can also post them all right here in this forum thread: ;)
https://Forum.Processing.org/two/discussion/15473/readme-how-to-format-code-and-text
I'll keep it in mind for future reference, but can anyone help with what I put out?
Why not the present now? ;;)
Please describe what your program does and what errors you are getting. I ran your first post and I got an error. Not clue what I suppose to do.
Kf
https://github.com/FoxxTailz/Grumbo-Debug Ok, I think I got it. Obviously the Function Code is standalone while everything else needs to work together in the same program. Kfrajer, it's supposed to run a game I made, and it works fine for me. What error are you getting?
This looks suspicious:
if (spawnTimer==(target/(obstacleSpeed*.5))) {
Try something with >=
I'm also hosting Grumbo @ https://GitHub.com/GoSubRoutine/Grumbo :\">
And both "OOP" & "functional" versions are available running online @: :bz
In order for the OOP version to run online under Pjs, I had to rename Grumbo::damage() to Grumbo::checkDamage(). L-)
We can't have a field & a method sharing the same name inside the same class under JS. [-X
P.S.: The whole package can be downloaded @ the link below: O:-)
https://GitHub.com/GoSubRoutine/Grumbo/releases/