Would It Be Easy To Convert This To A Fps? |
![]() ![]() |
Would It Be Easy To Convert This To A Fps? |
Nov 3 2009, 10:52 PM
Post
#21
|
|
|
GMC Member Group: GMC Member Posts: 79 Joined: 27-October 08 Member No.: 119128 |
Sorry, I don't really see how making an object 10X the size would be less memory than 10 objects 1/10 of the size...
|
|
|
|
Nov 4 2009, 10:33 AM
Post
#22
|
|
|
GMC Member Group: GMC Member Posts: 6602 Joined: 15-March 07 From: Sauga Member No.: 73484 |
Less objects running less internal code.
|
|
|
|
Nov 4 2009, 05:06 PM
Post
#23
|
|
|
GMC Member Group: GMC Member Posts: 185 Joined: 29-August 08 From: Right Here Member No.: 113902 |
As for speed, fewer collisions, and when you draw 3d, 1/10th of the draw calls, which will make it a lot faster. 10x fewer variables.
|
|
|
|
Nov 4 2009, 09:43 PM
Post
#24
|
|
|
GMC Member Group: GMC Member Posts: 79 Joined: 27-October 08 Member No.: 119128 |
I see... but the way my games work... I have 1 16X16 object for all walls, the walls are tiles, and are under an invisible wall object. If I have a bunch of tiles, instead of objects, and my object isn't drawn, its invisible... would it be worth it to make a 16X256 object for a long wall, since its not drawn at all?
Also, my walls have no code other than the fact that they are solid, they are just 'there', my zombies use mp_potential_step and my player moves by jumping 2 spaces at a time; Avoiding solid objects... my walls have no code whatsoever... so would making them into a single larger object be worth it? This post has been edited by Peter Porky: Nov 4 2009, 09:53 PM |
|
|
|
Nov 5 2009, 06:12 AM
Post
#25
|
|
|
GMC Member Group: GMC Member Posts: 12 Joined: 2-January 08 Member No.: 96680 |
I see... but the way my games work... I have 1 16X16 object for all walls, the walls are tiles, and are under an invisible wall object. If I have a bunch of tiles, instead of objects, and my object isn't drawn, its invisible... would it be worth it to make a 16X256 object for a long wall, since its not drawn at all? Also, my walls have no code other than the fact that they are solid, they are just 'there', my zombies use mp_potential_step and my player moves by jumping 2 spaces at a time; Avoiding solid objects... my walls have no code whatsoever... so would making them into a single larger object be worth it? Short answer: yes, it's worth it. Long answer: Depends on how many objects you have in your game. Best to run a level with just a few of these 16x16 wall objects and check the FPS, then check the FPS after adding 100, 200, 500, 1000, etc. You should notice a pretty significant drop in FPS as you add more objects, even if they aren't drawn. I am creating a 3D game where I place 16x16 walls individually, and they are drawn as if one single wall. I noticed my FPS was being killed as I added more walls. Even disabling the drawing didn't help as much as I would have thought. I didn't want to create different wall sized objects, as it would make creating maps a pain, so I found some code on the GameMaker forums that I was able to modify to fit my needs. I run it at the start of my room, and it goes through and automatically merges walls that are together, to form larger single rectangles. My test room with 500 walls became just 100 walls and my FPS jumped up greatly. Just figure out the maximum number of walls you'll expect to have in your room, then create a test room with that number and see how it affects your FPS, then decide if it's worth the effort to make the necessary changes. - Houdini |
|
|
|
Nov 5 2009, 08:53 PM
Post
#26
|
|
|
GMC Member Group: GMC Member Posts: 79 Joined: 27-October 08 Member No.: 119128 |
A code that merges walls?
Mind posting it? It sounds very helpful. My FPS doesn't seem to be affected until I call in the horde, at which is reduces from 60 FPS to 45 FPS. What is the internal code of your walls? For instance, mine are just static objects checked "Solid" and that's it. |
|
|
|
Nov 5 2009, 09:18 PM
Post
#27
|
|
|
GMC Member Group: GMC Member Posts: 12 Joined: 2-January 08 Member No.: 96680 |
A code that merges walls? Mind posting it? It sounds very helpful. My FPS doesn't seem to be affected until I call in the horde, at which is reduces from 60 FPS to 45 FPS. What is the internal code of your walls? For instance, mine are just static objects checked "Solid" and that's it. Here's a link to the actual topic where the code was posted http://gmc.yoyogames.com/index.php?showtopic=434847&st=0 And if you look at post #17 you'll see a link to a GM project that has a working example of wall merging. Came in very handy for me. http://willhostforfood.com/access.php?fileid=72121 - Houdini |
|
|
|
![]() ![]() |
|
Lo-Fi Version | Time is now: 23rd November 2009 - 10:42 AM |