The Daily Click ::. Forums ::. Klik Coding Help ::. FREE TIPS FOR A SMOOTH RUNNING
 

Post Reply  Post Oekaki 
 

Posted By Message

norfair



Registered
  31/10/2002
Points
  244
24th February, 2006 at 01:20:06 -

Greets.

Topic of public interest: share some of your clever and always good tips or theories to make smoother games.

Image Edited by the Author.

 
Radix says:
It's regrettable that TDC is the arsehole of the click scene, but somewhere has to be.

norfair



Registered
  31/10/2002
Points
  244
24th February, 2006 at 01:30:39 -


MMF

- proprieties of application -

For few colour gfx - reduce the graphic mode to 32768 colours or even lower(that also should reduce the file size)

- frame editor -

Cheaper collisions of utilitaristic objects : - proprieties - uncheck the fine detection box in the collisions

Always invisible objects: - proprieties - uncheck the visible at start box in the display options instead of make a massive make invisible event to all these objects at the start of frame.



ps- I know that these arent really pearls... hope someone knows something better


 
Radix says:
It's regrettable that TDC is the arsehole of the click scene, but somewhere has to be.

Muz



Registered
  14/02/2002
Points
  6499

VIP MemberI'm on a BoatI am an April FoolHonored Admin Alumnus
24th February, 2006 at 01:50:23 -

Event editor
Avoid always conditions with any actions that use moderate CPU power, but use them instead of using timer conditions on things you need repeated every loop.

With heavy calculations, put them in a Not Active at Start (NAAS) event group and activate them only when they are used. For example, if it's a constantly used formula (e.g. calculating range/distance between enemy and player), calculate it only when the enemy is about to shoot and can see the player. If it's something that has to always be used (e.g. calculating line of sight), try to calculate it in only one event, place the calculated answer in some data storage, and use that number instead of the formula, when needed. [Obvious, quite important tip, but one that many, including myself tend to forget]

Active objects
Keep animation frames to a minimum, use anything other than top-view, so you won't have to do 32-directions per animation (thus keeping animation power minimized).

Run-time
Use minimum resolution so the screen won't have to process so many things at once.


Eh, I know a lot more, but can't think of them for now.

Image Edited by the Author.

 
Disclaimer: Any sarcasm in my posts will not be mentioned as that would ruin the purpose. It is assumed that the reader is intelligent enough to tell the difference between what is sarcasm and what is not.

Image

AndyUK

Mascot Maniac

Registered
  01/08/2002
Points
  14586

Game of the Week WinnerSecond GOTW AwardHas Donated, Thank You!VIP Member
24th February, 2006 at 02:47:03 -

Do not use the awful 'resize display to fill current window size'.

 
.

David Newton (DavidN)

Invisible

Registered
  27/10/2002
Points
  8322

Honored Admin Alumnus
24th February, 2006 at 12:57:19 -

About formulae calculation - I think events with multiple conditions are always handled from the top down, so using this:

(Player presses Fire button)
+ (Massive formula to calculate line of sight)

would be a lot more efficient than having the two events the other way round - the formula is only run through if the first condition has already taken place. Otherwise, it would be calculated in each frame, and the results discarded.

 
http://www.davidn.co.nr - Games, music, living in America

norfair



Registered
  31/10/2002
Points
  244
24th February, 2006 at 16:28:38 -

MMF

- events -

Dont repeat conditions:
So make only one always condition and put all events related on that single line instead of making several alwayses.
Same thing with all simple conditions, shared commands, or start/end of frame or , etc.

Image Edited by the Author.

 
Radix says:
It's regrettable that TDC is the arsehole of the click scene, but somewhere has to be.

Bibin

At least 9001

Registered
  01/07/2005
Points
  308

Silver Cup WinnerGOTW Winner!Has Donated, Thank You!VIP Member
24th February, 2006 at 23:32:00 -

Abobut the "resize display to fill window size"

a. It works much better if you resize it by 2x or 4x. Like, if you rezize a 640x480 playfield to fit in a 320x678 window, it will run horribly, whereas resizing a 320x240 playfield to a 640x480 window runs pretty smoothly. Look at Blokkoland.


 
n/a

AndyUK

Mascot Maniac

Registered
  01/08/2002
Points
  14586

Game of the Week WinnerSecond GOTW AwardHas Donated, Thank You!VIP Member
25th February, 2006 at 01:39:24 -

It's still a horribly slow way of resizing. However changing the desktop resolution to something lower (like 640x480) speeds it up.
It looks scruffy if the original window size is not exactly half or one quarter of the desktop resolution.

Of course Multimedia fusion can make the desktop size 320x240 during runtime which TGF cannot. So only us TGFers have that problem.

 
.

Tigerworks

Klik Legend

Registered
  15/01/2002
Points
  3882
26th February, 2006 at 03:21:47 -

MMF 1.x can't do proper v-syncing because it cant go above 50FPS, but once MMF2 is out crank up the FPS to 100 and enable v-sync and your apps will look 5x better.

 
- Tigerworks

norfair



Registered
  31/10/2002
Points
  244
27th February, 2006 at 14:28:13 -

MMF

- events -

avoid using collision command when it's possible ( for example, related between 2 moving actives) - the overlapping does the same with less detection.

 
Radix says:
It's regrettable that TDC is the arsehole of the click scene, but somewhere has to be.

norfair



Registered
  31/10/2002
Points
  244
27th February, 2006 at 16:25:14 -

I mean, 2 non-stationary actives = path stuff, balls, everything--

Image Edited by the Author.

 
Radix says:
It's regrettable that TDC is the arsehole of the click scene, but somewhere has to be.

Silveraura

God's God

Registered
  08/08/2002
Points
  6747

Game of the Week WinnerKlikCast StarAlien In Training!VIP Member360 OwnerWii OwnerSonic SpeedThe Cake is a LieComputerChristmas Tree!
I am an April Fool
27th February, 2006 at 17:08:10 -

An idea for keeping particle effects low would be to make the game check where allot of particles are together, and then remove allot of them & replace them with objects that look like allot of particles together. That way you get the appearance of thousands of particles, but you only have like 10 objects!

 
http://www.facebook.com/truediamondgame

norfair



Registered
  31/10/2002
Points
  244
27th February, 2006 at 18:16:40 -

MMF
use the alpha channel object, if you can.
works great, and it's smooth since can be displayed as background (box cheched by default)

 
Radix says:
It's regrettable that TDC is the arsehole of the click scene, but somewhere has to be.

Silveraura

God's God

Registered
  08/08/2002
Points
  6747

Game of the Week WinnerKlikCast StarAlien In Training!VIP Member360 OwnerWii OwnerSonic SpeedThe Cake is a LieComputerChristmas Tree!
I am an April Fool
27th February, 2006 at 21:14:08 -

The alpha channel object is nice yes, but not good at all for this version of MMF... it KILLS frame rate, frame rate that is already being murdered by MMF's frame rate limit of 50fps.

In addition, the only reason the collision with object doesn’t work with custom movement is because just 1 pixel over a backdrop of object is considered overlapping and 1 pixel off is considered not overlapping, so its either overlapping or not. On collision is built for basic movement and basic movement only, because basic movement supplies the event trigger when it hits another object, custom movement doesn’t, & can’t.

Image Edited by the Author.

 
http://www.facebook.com/truediamondgame

norfair



Registered
  31/10/2002
Points
  244
28th February, 2006 at 02:02:25 -

awww I thought alpha channel were better than actrives because it can be displayed as background, and in fact I always got good results in comparison to an active object usage.

Anyway its good to have explored the issue, thanks ^_

 
Radix says:
It's regrettable that TDC is the arsehole of the click scene, but somewhere has to be.

Silveraura

God's God

Registered
  08/08/2002
Points
  6747

Game of the Week WinnerKlikCast StarAlien In Training!VIP Member360 OwnerWii OwnerSonic SpeedThe Cake is a LieComputerChristmas Tree!
I am an April Fool
28th February, 2006 at 14:48:36 -

The results you get with Alpha Channel object are beautiful yes, but 9x out of 10 if you recieving 5 fps then generally its not worth it. Expecially when your game doesnt look half bad without it. This is where MMF2 is going to be nice. Alpha Channelling wont be as hard on it.

 
http://www.facebook.com/truediamondgame

Fifth

Quadruped

Registered
  07/05/2003
Points
  5815

VIP MemberGOTW JULY 2010 WINNER!Kliktober Special Award TagGOTW HALLOWEEN 2011 WINNERPicture Me This Round 51 Winner!
28th February, 2006 at 21:43:36 -

Y'know what really sucks up the memory, especially in older computers?
Scrolling.

Get rid of scrolling, and your games'll run much faster, I guarantee.

 
Go Moon!

Silveraura

God's God

Registered
  08/08/2002
Points
  6747

Game of the Week WinnerKlikCast StarAlien In Training!VIP Member360 OwnerWii OwnerSonic SpeedThe Cake is a LieComputerChristmas Tree!
I am an April Fool
28th February, 2006 at 21:48:45 -

If a person has a computer that is unable to do what a gameboy can do (scroll) then its time to get a new PC.

 
http://www.facebook.com/truediamondgame

DanielRehn



Registered
  18/09/2002
Points
  139
1st March, 2006 at 00:19:23 -

Agree with Phizzy (never thought I'd say that), Consoles are specifically done for games and most things are done by hardware.

For instance to simulate a gameboy advance (which 106 mHz btw) on a pc, it requires about 700mHz (in many cases more) to run smoothly..

 
n/a

norfair



Registered
  31/10/2002
Points
  244
1st March, 2006 at 00:25:03 -

'doh!

how about - machine-indipendent speed ?

never used that - it never improved the smoothness.

 
Radix says:
It's regrettable that TDC is the arsehole of the click scene, but somewhere has to be.

DanielRehn



Registered
  18/09/2002
Points
  139
1st March, 2006 at 00:32:19 -

machine-indipendent speed makes sure the game runs at the same speed independent of how much crap you put in it. I find this very important when making LAN-games and such, since the game has to run sync'd with the other players...

 
n/a

AndyUK

Mascot Maniac

Registered
  01/08/2002
Points
  14586

Game of the Week WinnerSecond GOTW AwardHas Donated, Thank You!VIP Member
1st March, 2006 at 16:37:47 -

Machine independant speed skips frames. This also makes the game a little unstable.

And i'm certain the gameboy advance's clock speed is 16mhz. But you do need a much better processor for emulation due to the fact it is translating everything in software mode, and Pc's have to run their operating system in the background too.

 
.

DanielRehn



Registered
  18/09/2002
Points
  139
1st March, 2006 at 16:57:33 -

Yeah 16mhz for a gba is correct... sry..

 
n/a

norfair



Registered
  31/10/2002
Points
  244
2nd March, 2006 at 07:43:15 -

if you need to make a massive game with lots of cloned objects (ex- people or enemies), wich multiplying/creating strategy should be used to make them them?

- create lots of copies of the same object having a different ID value with the code (therefore everything with creation events)

- make lots of clones with the same qualifier and a different ID value at starting in values in the frame editor (therefore without having any creation events)

- create lots of copies of the same object in the frame editor and give them a dfferent ID value at runtime ( creation via frame editor having related value events, maybe with a overlapper wich changes the ID value )

- something else?

*as ID value I mean also wichever other thing like health or internal counters

Image Edited by the Author.

 
Radix says:
It's regrettable that TDC is the arsehole of the click scene, but somewhere has to be.

David Newton (DavidN)

Invisible

Registered
  27/10/2002
Points
  8322

Honored Admin Alumnus
2nd March, 2006 at 09:38:33 -

Give them a different ID value at runtime - you can do this using "Spread a Value" rather than having to use an overlapper.

 
http://www.davidn.co.nr - Games, music, living in America

norfair



Registered
  31/10/2002
Points
  244
8th March, 2006 at 16:20:19 -

kk
question - there will be in MMF2/TGF2 something to improve the smoothness/frame rate (Expecially in scrolling games)?
(example - with some hardware acceleration?)

Image Edited by the Author.

 
Radix says:
It's regrettable that TDC is the arsehole of the click scene, but somewhere has to be.

RedHades



Registered
  25/05/2003
Points
  108

Has Donated, Thank You!
9th March, 2006 at 05:40:12 -

Since we are making PC game, we have the luxury of a lot of memory space.
We can use the memory to remove stress from the processor.

If you are going to calculate the same thing more than once, it's better to do it just once, put it in a value once and call it many times in your expression.

Like instead of:

* On loop 5
( Active-B ) Set X position to 256 + ( Frame Width - X Right( "Active-A" ) - X Left( "Active-A" ) ) / 2
( Active-C ) Set X position to 720 - ( Frame Width - X Right( "Active-A" ) - X Left( "Active-A" ) ) / 2
( Active-D ) Set X position to 512 + ( Frame Width - X Right( "Active-A" ) - X Left( "Active-A" ) ) / 2

Do this:

* On loop 5
* loop index is 0
Set Value A to Frame Width - X Right( "Active-A" ) - X Left( "Active-A" ) ) / 2

* On loop 5
( Active-B ) Set X position to 256 + Value A
( Active-C ) Set X position to 720 - Value A
( Active-D ) Set X position to 512 + Value A


This is especially optimal if you are going to repeat the same equation many times in a large loop.

Image Edited by the Author.

 
<0> ReDhAdEs <0>

norfair



Registered
  31/10/2002
Points
  244
9th March, 2006 at 10:19:21 -

uuuuh very fine!

 
Radix says:
It's regrettable that TDC is the arsehole of the click scene, but somewhere has to be.

Dr. James MD

Addict

Registered
  08/12/2003
Points
  11941

First GOTW AwardSecond GOTW AwardThird GOTW AwardPicture Me This -Round 26- Winner!
9th March, 2006 at 11:28:14 -

I'd say don't use the Alpha Channel Object, or the Lens object. Crash-o-matics. if an alpha channel object goes off screen and is destroyed with an object created nearby- it crashes. ie. In Sam, those rockets are alpha channels, i had to stuff a load of fail safes in there to avoid crashes. buggy and unreliable. Especially when Alpha channels started to change size and stick in the background. terrible.

Gotta say, I'm a fan of the Resize to fill screen thing. a 320x200 screen is the same ratio as my 1680*1050 monitor. just looks beautiful.

 
Image
http://uk.youtube.com/watch?v=j--8iXVv2_U
On the sixth day God created Manchester
"You gotta get that sand out your vaj!" x13
www.bossbaddie.com

Silveraura

God's God

Registered
  08/08/2002
Points
  6747

Game of the Week WinnerKlikCast StarAlien In Training!VIP Member360 OwnerWii OwnerSonic SpeedThe Cake is a LieComputerChristmas Tree!
I am an April Fool
9th March, 2006 at 12:21:07 -

Well from the sounds of it, MMF2 will have all the options of the alpha channel object built right into the active objects, so it must obviously be able to handle it pretty well.

 
http://www.facebook.com/truediamondgame

norfair



Registered
  31/10/2002
Points
  244
9th March, 2006 at 18:48:30 -

by the way,
will MMF2/TGF2 improve the smoothness or the frame rate (Expecially in scrolling games)
taking advantage of hardware acceleration ??
Maybe to make things run over 50fps???

ps - do sub-applications make run scrolling games worse or are them irrilevant?

Image Edited by the Author.

 
Radix says:
It's regrettable that TDC is the arsehole of the click scene, but somewhere has to be.

Silveraura

God's God

Registered
  08/08/2002
Points
  6747

Game of the Week WinnerKlikCast StarAlien In Training!VIP Member360 OwnerWii OwnerSonic SpeedThe Cake is a LieComputerChristmas Tree!
I am an April Fool
9th March, 2006 at 19:53:32 -

Games at 1fps are fun.

 
http://www.facebook.com/truediamondgame

AndyUK

Mascot Maniac

Registered
  01/08/2002
Points
  14586

Game of the Week WinnerSecond GOTW AwardHas Donated, Thank You!VIP Member
10th March, 2006 at 17:08:58 -

And that will be great if you want to make an application thats runnable on a slow pc.

 
.
   

Post Reply



 



Advertisement

Worth A Click