-
FPS question
My application is 800x600. I have a big square object at exactly this size thats invisible and not following the frame, so it will always kinda be there. I use this square as an object to check if stuff are in the window frame or not. In theory I would love to use the "... is in the Play Area", but its just not working. I also recall having some issues with "object is xxx pixels away from window's edge" or something. Well, thats the reason for why I do it the way I do. But I see now that my FPS sometimes goes down to 40, and even 35. Not always, just in certain places. How much does this big square affect my FPS?? Not at all? Slightly? Or very much? I cant blame the 15 fps loss on this tho, cause I have a lot of moving enemies, I just wonder if it helps to switch to windows edge instead of this. I could give it a new try, but it will take some work!
-
Re: FPS question
I'd say it is affecting your FPS very much so. I did this once but for a smaller app and on an older computer and the lag was terrible.
Why didn't 'Object is closer than (0-Width) from the window's edge' work? Just replace width with whichever is higher, width or height.
-
Re: FPS question
You could try making 4 long thin border objects instead of 1 giant object. Then set up conditions to check overlaps with them. Or you could just do position checks every frame to see if objects are outside of the view window.
-
Re: FPS question
Well I though since I didnt have an "Always set Huge Box at position..." event, it shouldnt matter that much.. And its also invisible, but I guess that doesnt really matter since its either there or not.
I honestly dont know why the window's edge didnt work. But thats a long time ago since I used. I just got an experience from back then that this event arent trustable. But I guess Ill give it a new shot. Ill report back in a few hours :) .. If I can remember where to find this windows edge events :p
-
Re: FPS question
I replaced "EnemyCreator is overlapping BigSquare" which is the event that creates an enemy at the EnemyCreator object, with "Enemycreator is -15 pixels distance away from window border" and I can say that this made everything A LOT worse. First of all, I dont think this event cares for individual objects, but as one is in range, it affects all the others aswell. Making a ForEach loop for every single object seems to be too much work. I guess my game is doomed to have a little lag :(
-
Re: FPS question
If you really think using the ForEach object is "too much work" you are doomed to make very simple games, I'm afraid. Just put all the objects under a qualifier and run ForEach on the qualifier. The 2 lines of code isn't really that much work, if you think about it. :) I think it would take 3 lines of code with normal fastloops.
-
Re: FPS question
Yea, well I guess having to sacrifice a few hours of work is a part of game making. I think Ill upload a new version of my game on GameBuilder and ask how many that lags when they play it. The thing that kinda makes me wanna puke is that this replacement includes replacing every single event that have "Object is overlapping BigBox" with "Object is xx distance from window edge", and then make a Foreach loop for this object. I have between 10-20 events that are using this Big Box object, and I have a total of over 500 events. Ill have to find every single event that needs a replacement and make 10-20 new events with the loop. And as if that werent enough, all this is just one of 15 frames... But I guess it could be a lot worse. I will depend this extra job on my feedback,