The Daily Click ::. Forums ::. Klik Coding Help ::. How are you building big levels efficiently?
 

Post Reply  Post Oekaki 
 

Posted By Message

Demondevilmon



Registered
  29/12/2014 18:58:20
Points
  152
18th March, 2015 at 18/03/2015 19:23:19 -

Hello again

I just build a leveleditor to scrabble around with my levelpieces and try to build few levels fast to get ideas for enemy-ai and storytransitions.

Well...
I noticed pretty fast that having 116 objects is very unefficient for a level (JUST for the part wich can be seen in the window...)
Not mentioning when i am starting to scroll the frame to see the whole level.

Are you guys building the level piece by piece per frame? Are you placing hundreds of pieces?

Or are you generating the levels during runtime? From an array? Just in window of sight?

Please give me advice THX!

Edited by Demondevilmon

 
I am not a hero... never was... never will be.

SolarB



Registered
  26/12/2011
Points
  564
19th March, 2015 at 19/03/2015 01:17:07 -

Hey

You can probably do all of the above, depending on what you're going for. However, keep in mind that HWA runtimes like D3D, Android and iOS still consider any pasted backdrops as actives.

If you like, and it's not necessarily the best or only way to do it, check out the Open World examples on my web page (link in signature) that use dynamic loading. You can see the performance is not bad, there's even a flash demo. If you're not doing a tile-based game, it's sometimes better to even lay out a huge level in the frame editor, but again, it depends on what you want to achieve. I also have a simple example of a level editor.

Good luck!

 
My Open Source Examples: http://bit.ly/YyUFUh

Airflow

imafirinmahlazr

Registered
  24/09/2003
Points
  -197

VIP MemberSonic SpeedSnow Cloud!Computer
19th March, 2015 at 19/03/2015 03:10:51 -

i've made a handful of incomplete editors over my time, and the best implementation is one that only loads the objects that appear on screen. Delete the tiles out of the viewing area, but it's hard to do, and i haven't really found a good way of doing it. I guess If i tried again i'd use ini++ as a memory database because it's data call functions are non-linear

 
n/a

Demondevilmon



Registered
  29/12/2014 18:58:20
Points
  152
19th March, 2015 at 19/03/2015 11:23:15 -

@SolarB & Airflow: THx for your advice!

I am working on my own RPG for about few years Years now ^_____________________^
Alot of research but finally i can start programming and stuff (student and work takes alot of my time )

Well i think a good idea would be to load the level during runtime... It think this is somehow known as "frustum culling".
I will definately check out all of your examples and answer after that
Until than... big thanks anyway!

Edit: I took a look at your examples. They look nice, but i tried open them and got the message "unknown format" :/
Doesn't matter
I will do it my own way anyway ^^ thanks for inspire me

Edited by Demondevilmon

 
I am not a hero... never was... never will be.

SolarB



Registered
  26/12/2011
Points
  564
19th March, 2015 at 19/03/2015 15:54:48 -

Ah, I should have mentioned most of the examples are for Fusion 2.5, sorry. If you have MMF2 you won't be able to open them.

 
My Open Source Examples: http://bit.ly/YyUFUh

Demondevilmon



Registered
  29/12/2014 18:58:20
Points
  152
23rd March, 2015 at 23/03/2015 16:36:02 -

Yes i got MMF2. '

 
I am not a hero... never was... never will be.

AndyUK

Mascot Maniac

Registered
  01/08/2002
Points
  14586

Game of the Week WinnerSecond GOTW AwardHas Donated, Thank You!VIP Member
24th March, 2015 at 24/03/2015 05:35:50 -

I'm making a level editor and Ive figured making it work and making it load fast is a priority right now. Efficiency can come later.
The general size for each piece is 16x16 pixels. Although I do have events to loop past empty space but it doesn't seem to make much difference. (A few frames here and there)

One thing Ive noticed it seems to me that Fusion 2.5 will freeze when you're looping a lot much more easily than MMF2. It's going to be tough to balance loading as fast as possible with not overloading Fusion 2.5's runtime and causing the PC to freeze for 30 seconds before the level even starts generating.

Oh also It keeps inexplicably breaking on me, then i go back to previous working versions and find out they're broken too somehow. It's horribly frustrating...

Edited by AndyUK

 
.

SolarB



Registered
  26/12/2011
Points
  564
25th March, 2015 at 25/03/2015 00:55:25 -

Latest beta? I noticed some freezing before, but with terrain generation which took some hardcore looping. I'm guessing this has something to do with the loop+array combo.

I did a quick test with my 'QuickEdit' example at 1920x1080 with 16x tiles and it loads instantly, when I get back home I'll try it on a bigger frame. A dynamic loading system might help, if you can go with that?

Haven't tried it so dunno if it'll make a difference, but I'm thinking splitting the load loop into chunks might confuse Fusion enough to stop the freezing?

 
My Open Source Examples: http://bit.ly/YyUFUh
   

Post Reply



 



Advertisement

Worth A Click