Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Program Announcements / Plugin Release: Game Performance And Timer Plugins

Author
Message
DigitalFury
13
Years of Service
User Offline
Joined: 30th Jul 2010
Location: United States
Posted: 27th Aug 2012 00:13 Edited at: 30th Sep 2012 23:12
Made a small mistake with the second one. I forgot "Time Setup". Doesn't matter anyways, I should be getting back the correct numbers. I'll make a few changes to the plugin but if it doesn't work then there is a problem with MatrixUtil01's command and I'll have to file a bug report. I base my command off of his.

It could be the fact I was getting a negative freq. It could be the fact I get two diff freq's. I'll have to do some more testing.

I do have one more test you can run to test MatrixUtil01's commands.

Run the attached file. Let me know the results.

DigitalFury

GIDustin
15
Years of Service
User Offline
Joined: 30th May 2008
Location:
Posted: 27th Aug 2012 00:17 Edited at: 27th Aug 2012 00:18
DF,

The attached file outputs numbers closer to my PC did, except they were all negative.

Attachments

Login to view attachments
DigitalFury
13
Years of Service
User Offline
Joined: 30th Jul 2010
Location: United States
Posted: 27th Aug 2012 00:32 Edited at: 27th Aug 2012 00:42
I fixed the negative issue. I'll have to contact IanM to see what I did wrong with my function. I can do a temp fix for now. I'll get back to you with an email with the updates. After I contact IanM I'll send you the updates to my timer function.

Edit: I took a look at my code. I believe my computer is different somehow with the freq it returns. My computer I need to divide by 1000000. That could be where your having issues on your other computer. I'm suppose to divide by 1000 on your second pc. I don't know how to tell the difference between pc types so hopefully IanM can help me with what I'm doing wrong.

I should have this fixed once I hear back from IanM.

Thanks for all the testing. I'll make sure my plugin is perfect and update the release.

DigitalFury

GIDustin
15
Years of Service
User Offline
Joined: 30th May 2008
Location:
Posted: 29th Aug 2012 16:36
DF:

Any word back from IanM? I am about to launch my program company wide and I want to use your timing plugin so it is lightweight. Right now I am using my own function with "nice wait 1" which works, but not perfectly.

Once you have a new version, I can roll out an update to my program and practically overnight we will know the results on a myriad of PCs around the US as to how it performs. No pressure.
DigitalFury
13
Years of Service
User Offline
Joined: 30th Jul 2010
Location: United States
Posted: 29th Aug 2012 18:28
@GIDustin - Lol you really have a company your selling it to? I can update something instead of using IanM solution and it should work just fine. I haven't heard back from IanM yet.

I'll try to work on the update today. I'll get back to you.

DigitalFury

GIDustin
15
Years of Service
User Offline
Joined: 30th May 2008
Location:
Posted: 30th Aug 2012 00:22
I am not selling it to the company. I am the IT admin for the company and we needed specialized software for our business, so I just went ahead and wrote it in DarkBasic. I want the software to be lightweight and easy on the CPU because it runs alongside our business software and Point of Sale software, which is why I wanted to use your Performance plugin, so that CPU usage is at a bare minimum.

I just got back from a meeting where I announced the software and explained how to download it. Thankfully, I included an auto-updater so once you get your plugin working, I can push it out overnight and nobody will be the wiser.
DigitalFury
13
Years of Service
User Offline
Joined: 30th Jul 2010
Location: United States
Posted: 30th Aug 2012 00:59
@GIDustin - Very clever. Got back from school and I'm going to work on that feature after dinner.

DigitalFury

DigitalFury
13
Years of Service
User Offline
Joined: 30th Jul 2010
Location: United States
Posted: 30th Aug 2012 03:35
@GIDustin -

Finished it. Sent to your email. If everything checks out I'll distribute the update to everyone.

Thanks for doing all that testing.

DigitalFury

GIDustin
15
Years of Service
User Offline
Joined: 30th May 2008
Location:
Posted: 30th Aug 2012 05:37
It works fine on my computer, and on my TV computer. Although that is not a huge test field, at least it works on the PC that it previously did not.
MrValentine
AGK Backer
13
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 30th Aug 2012 05:45
Any Demos yet DF?

Or am I too tired right now to remember...

DigitalFury
13
Years of Service
User Offline
Joined: 30th Jul 2010
Location: United States
Posted: 30th Aug 2012 06:02
@GIDustin - Great. Glad that fixed it.

@MrValentine - Demo is posted on the second post

DigitalFury

MrValentine
AGK Backer
13
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 30th Aug 2012 10:11
Grabbed... Will test later today on an old p4 HT cpu... Got to be at my shop today...

DigitalFury
13
Years of Service
User Offline
Joined: 30th Jul 2010
Location: United States
Posted: 31st Aug 2012 01:06 Edited at: 31st Aug 2012 01:06
@MrValentine - I haven't updated the demo yet with the new plugins. I will soon.

I sent out updates. Anyone who ordered my product that didn't get the updates please send me an email.

Thanks,

DigitalFury

DigitalFury
13
Years of Service
User Offline
Joined: 30th Jul 2010
Location: United States
Posted: 14th Sep 2012 23:40
Updates


I am planning on adding a few commands for something called a task. A task is the same as a loop but it only runs a certain amount of times or runs for a duration.

I also want to add delete capabilities.

DigitalFury

GIDustin
15
Years of Service
User Offline
Joined: 30th May 2008
Location:
Posted: 17th Sep 2012 16:24
@DF,

Did you make any other changes to the DLLs you sent out via email? My program used to idle around 1% CPU, but your newest plugin has it idling around 25% pretty much no matter what I set the rate to.
DigitalFury
13
Years of Service
User Offline
Joined: 30th Jul 2010
Location: United States
Posted: 17th Sep 2012 22:36
@GIDustin - I just released updates to account for that. I will send you the updates again once I get home. I thought I sent them to you already.

DigitalFury

DigitalFury
13
Years of Service
User Offline
Joined: 30th Jul 2010
Location: United States
Posted: 18th Sep 2012 07:43 Edited at: 18th Sep 2012 07:44
Updates: Game Performance

Game performance is a plugin for getting a loop run at a certain speed while returning the maximum time back to the processor. The loop will run at a certain LPS cap or Loops Per Second which also means Frames Per Second. The rest of that time is returned back to the CPU. DBP's sync command doesn't automatically do this but my plugin will return the CPU time back to the CPU so it is running it's fastest. This plugin was created to replace the sync command. I do call fast sync in my plugin just to make sure everything is still updated correctly.

Instead of simply running something in a Do Loop you can set the rate it is executed. This way you can find the minimum amount of times per second it can run. This way you cut a lot of needless calculations per second out of the equation! It is great for For Loop, While Loops, and repeat Until Loop because it can be run at any rate! You can save on performance by using these practices.

All display commands should be run in a loop setup like this:



Instead of running the display at the maximum rate you can set the display to only run for 60 loops or 60 frames because FastSync will update each frame.

Side Note: Keep in mind these loops are not run in parallel. My multi-threading plugin will be used for this task.

` Sets up the Game Performance Plugin
GP Setup

` Input the functions name which will be representing the loop. The LPS cap which can also be thought of as the FPS is the second parameter.
Index = GP Create Task(FunctionName$, LPSCap)

` This command will update all of the loops that were created. It will run them at the rate that is set. This command will not use Fast Sync so it will be Thread Safe!
GP Update

` This command will return the task type. Count – Will run the loop x amount of times, Time – Will run the loop for x amount of time. Loop – Will loop indefinitely.
Index = GP Get Task Type(Index)

` This command will end the task Index
GP End Task Index

` This command will set the task to run for a certain duration.
GP Set Task To Time Index, Duration

` This command will set the task to run for a certain amount of times.
GP Set Task To Count Index, Count

` This command will set the task to loop indefinitely. By default tasks will loop indefinitely
GP Set Task To Loop Index

` This command will pause the task
GP Pause Task Index

` This command will resume the task
GP Resume Task Index

` This command will stop the task
GP Stop Task Index

New Example:


Time

With a game's time cycle you typically have 24 hours represented in a shorter period of time. You can play the game for like 30 minutes and have played 24 hours game time. With my time plugin you can set the 24 hour conversion to do just that.

DigitalFury

DigitalFury
13
Years of Service
User Offline
Joined: 30th Jul 2010
Location: United States
Posted: 18th Sep 2012 21:21 Edited at: 30th Sep 2012 23:13
New Demo!


The plugin included is a fully working plugin. It will just display a message box saying this is a demo. Buy the full version to remove this message.

Here is the plugin demo! (Attached)

Time Demo + Plugin Demo: https://forumfiles.thegamecreators.com/download/2394527

DigitalFury

DigitalFury
13
Years of Service
User Offline
Joined: 30th Jul 2010
Location: United States
Posted: 19th Sep 2012 06:55 Edited at: 30th Sep 2012 23:13
Time 2.0: Updates

I just finished some updates. I will post a new updated demo very soon!

Bug Fixes Updates:
With version 2.0 every bug has been fixed. The one GIDustin posted has been fixed. Everything is running almost perfectly. The seconds, milliseconds, and hours all return accurate values. Everything has been fixed to account for really small and really big numbers for timer values. The performance runs at 30 fps if you specify 30 LPS like it is suppose to. Everything has been updated!

Timing plugin is for getting accurate time back in either Mili-Seconds, Seconds, Minutes, Hours, or Days. You can set the time factor which is how many hours equals 24 hour or 1 day. You can test if it is day or night time using Is Day and Is Night commands. The event timers will run a function after a certain duration. You can loop it which means it will run the function every duration seconds.

` This command is called to setup the Timing Plugin
Time Setup

` This command is how you create a new timer. It returns the index of the timer
Index = Time Create Timer()

` These commands will return the time in a certain unit (seconds, minutes, hours, ect). Returns the time# for the timer Index.
time# = Time Get Hours(Index)
time# = Time Get Minutes(Index)
time# = Time Get Seconds(Index)
time# = Time Get MiliSeconds(Index)
time# = Time Get Days(Index)

` This command will set the Factor# which is the amount of time in hours per 24 cycle.
Time Set Factor Index, Factor#

` These commands will return a 1 if it is Day or if it is Night and a 0 if it is not.
IsDay = Time Is Day()
IsNight = Time Is Night()

` This command will return how many timers are created
Index = Time Count()

` This command will delete a timer at Index
Time Delete Index

` This command will create an event timer. You provide a function name to call, a duration which is how long before you call the function, and a restart flag to if set to 1 will loop the event timer.
Index = Time Create Event Timer(FunctionName$, Duration#, Restart)

` This command will update all the Event Timers
Time Update Event Timers

` This command will return a 1 if the Event Timer has ended
HasEnded = Time Has Ended()

` This command will stop an Event Timer
Time Stop Event Timer Index

` This command will restart and Event Timer. If restart is set to 1 it will loop the Event Timer
Time Start Event Timer Index, Restart

Demo + Demo Plugin Attached!

DigitalFury

DigitalFury
13
Years of Service
User Offline
Joined: 30th Jul 2010
Location: United States
Posted: 30th Sep 2012 23:42 Edited at: 1st Oct 2012 01:59
Updates


With new plugin releases coming soon I'm updating all the plugins.

Here is the updated demo of the timing plugin. Has all new features which are listed above.

The updated performance plugin demo will be posted here soon!

DigitalFury

Attachments

Login to view attachments
DigitalFury
13
Years of Service
User Offline
Joined: 30th Jul 2010
Location: United States
Posted: 8th Oct 2012 01:27 Edited at: 8th Oct 2012 09:59
Article


As releasing/marketing games gets more competitive it is always great to come up with way to stay ahead of the rest of the game releases.

I'm going to show you how you can get your games with the best ratings in performance and get a neat little logo like this:

on your games!

- Notice: There is probably more steps to being able to show this logo with your games. I will just show you how to get started -

Other Steps: BatVink Post http://www.thegamecreators.com/pages/newsletters/newsletter_issue_104.html#5
Step 1: Register with Intel Software Partner Program.
Step 2: Download the Tools.
Step 3: Identify a typical workload.
Step 4: Submit the results.

The performance plugin I wrote will give you the max performance possible for your games. This will affect the main loop and keep it from running as fast as it can which means more instructions per second.

If you have the code within the functions that is being called by the performance plugin then it will control your performance. If you put it in the main loop it will run as fast as it can which reduces performance.

Suggestions for loops: If you have a very calculation intensive loop/for loop/while loop then I would suggest adding it on another Thread using my Multi-Threading plugin. If you don't have that plugin then create a new task for that loop/for loop/while loop.

Instances where you need to use performance:
- Every type of loop. Do Loops, For Loop, While Loops. As long as you are covering for the main loop you should be fine.
- Networking: I used this for networking to set the speed of the checks for packets. You don't need to check 100,000 times a second for packets. 1000 LPS is normally enough.
- There are many other examples.

Instances where you don't need performance include:
- Loading Resources
- Setting up GUI and displaying it quickly
- Anything that needs to be updated now!

Multi-Threading can be used when you have a lot of tasked created or tasked that are calculation intensive.

You can also use a resource query to load resources while you have your menu up to cut down on the time it takes to load a level.

If you implement these ideas your game should run faster then it ever has before and you can get this badge/logo attached to your game to put it above the rest!

Edit: Here is a demo!: https://forumfiles.thegamecreators.com/download/2374435

DigitalFury

Attachments

Login to view attachments
MrValentine
AGK Backer
13
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 8th Oct 2012 02:25
nice article there DF...

Can you make a single thread that links to all these plugins or something? I want to know what I will be buying from you... and why do you not sell through TGC? this is clearly a useful official plugin...

DigitalFury
13
Years of Service
User Offline
Joined: 30th Jul 2010
Location: United States
Posted: 8th Oct 2012 02:33
@MrValentine - I will be adding all my plugins into a project called Game Template. I mentioned the preorder on my Get Out Alive page.

DigitalFury

MrValentine
AGK Backer
13
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 8th Oct 2012 02:36
o... will go check it now... thanks...

For others that do not know how to use the profile buttons... perhaps a link here?

DigitalFury
13
Years of Service
User Offline
Joined: 30th Jul 2010
Location: United States
Posted: 8th Oct 2012 02:55 Edited at: 8th Oct 2012 02:56
MrValentine
AGK Backer
13
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 8th Oct 2012 03:13 Edited at: 8th Oct 2012 04:54
http://forum.thegamecreators.com/?m=forum_view&t=195672&b=8&msg=2397456#m2397456

This is a better link had me confused for a moment there... look to the right of your posts for the link text right click and copy the shortcut ^^ [between facebook logo and toggle]

Umm keep me informed... I am a little lost in the whole thing right now... so I look forward to when it has its own place

DigitalFury
13
Years of Service
User Offline
Joined: 30th Jul 2010
Location: United States
Posted: 8th Oct 2012 03:25 Edited at: 8th Oct 2012 09:58
@MrValentine - Neat little trick. Will have Game Template released soon!

DigitalFury

BatVink
Moderator
20
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 8th Oct 2012 09:17
There's more information on getting the Intel badge here:

http://www.thegamecreators.com/pages/newsletters/newsletter_issue_104.html#5

I wrote another article somewhere about enhancing your game for low-power whilst idling, I'll try and dig it out.

DigitalFury
13
Years of Service
User Offline
Joined: 30th Jul 2010
Location: United States
Posted: 8th Oct 2012 10:10
@BatVink - Would love to see that article. I will be re-posting articles and tutorials on a new thread along with my Game Template release. That way everyone can have access to all my plugins in one place, examples of how to use my plugins, and access to tutorials and articles.

Eventually going to expand the project to include an editor and new plugins for loading in new formats from the editor. I also will be adding a lot of code for handling the general game stuff and for loading in editor files.

Going to be epic! lol

DigitalFury

Login to post a reply

Server time is: 2024-03-29 15:38:45
Your offset time is: 2024-03-29 15:38:45