ctomni231 / cwtactics

Custom Wars Tactics - An effort to create an open engine to emulate the gaming experience of the Nintendo Advance Wars series.
http://ctomni231.github.io/cwtactics/
Mozilla Public License 2.0
75 stars 11 forks source link

Engine Functionality - Dynamic File Loading #457

Closed ctomni231 closed 5 years ago

ctomni231 commented 5 years ago

Adding in a function into the main code that allows us to dynamically load in files. The function uses AJAX to grab a file from memory, and then places the result into an array for parsing. This was specifically made to target JSON files to give the engine the same ability to load up JSON documents on the fly. Included in the package is the following items:

An accompanying commit branch will be in the pipeline shortly after this issue is written documenting these changes.

Tapsi commented 5 years ago

what is the relationship between a file loader and a frame per second counter

ctomni231 commented 5 years ago

I left the FPS counter in there to check frame rate spikes when loading files dynamically. They are completely separate modules otherwise.

Tapsi commented 5 years ago

there's already the performance module in the repoaitory. you should use this to check the performance of the loading mechanism. :)

Tapsi commented 5 years ago

https://github.com/ctomni231/cwtactics/blob/master/new_core/performance.js

ctomni231 commented 5 years ago

I saw performance.js, maybe they can be part of the same class?

In my test, I’m trying to gather the timing of when the dip occurs in relation to everything going on in the program. In other words, frames per second is exceedingly important in this test. Performance.js, from my understanding, will give you an average length of how much time a process takes to execute. It’s great information, just not exactly what I’m looking for with this test.

ctomni231 commented 5 years ago

Closed via featurejson commit