Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
Maze of Galious 2
 Brain Games Forums : Maze of Galious 2
Subject Topic: Game Engine, Scripting and Performance Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
Gaze
Newbie
Newbie


Joined: 16áMarchá2004
Posts: 35
Posted: 16áMarchá2004 at 19:31 | IP Logged Quote Gaze

Hello,

Popolon, I was wondering what kind of scripting that you use in your engine, is it just a bunch of variables that you set or is it "really" scripting?, what happens if you have a lot of enemies/moving objects e.g. 1000+

what does it do to your framerate or playability?

Greetings,

Back to Top View Gaze's Profile Search for other posts by Gaze Send Private Message Add to Buddy List
 
Popolon
Admin Group
Admin Group
Avatar

Joined: 05áNovemberá2002
Location: Spain
Posts: 3135
Posted: 17áMarchá2004 at 09:46 | IP Logged Quote Popolon

They are true scripts. For instance, this is the script for the small stones in which a stone is broken when you hit it:



As you see, there are control sequences (while, if, etc.), you can use mathematical expresions, manipulate strings, etc. An object has a predefined number of states (in fact an object is a finite automata), and for each state a script can be defined. There are also a set of special states called "conditional states" that are executed when some coditions are met. These conditional states are non exclusive and can be executed in parallel.

About performance, I've never tested the engine with thousands of objects. I think that the highest number of objects I've included is about 400, but it worked fine. The most time consuming part is rendering graphics and collision detection, any other cost is negligible...

Edited by Popolon on 17áMarchá2004 at 09:46
Back to Top View Popolon's Profile Search for other posts by Popolon Visit Popolon's Homepage Send Private Message Add to Buddy List
 
Gaze
Newbie
Newbie


Joined: 16áMarchá2004
Posts: 35
Posted: 17áMarchá2004 at 10:52 | IP Logged Quote Gaze

i thought i read somewhere that you use a pixel based collision detection, is that correct?, and if so, why don't you use bounding box collision detection?
Back to Top View Gaze's Profile Search for other posts by Gaze Send Private Message Add to Buddy List
 
Popolon
Admin Group
Admin Group
Avatar

Joined: 05áNovemberá2002
Location: Spain
Posts: 3135
Posted: 17áMarchá2004 at 11:12 | IP Logged Quote Popolon

Because I _DO_ like pixel perfect collisions!

I hate those games where you only approach an enemy (without actually touching it), and it hits you! So I decided that MoG2 would have pixel perfect collisions...

However, of course that we can discuss my decision if some of you think that it'd be better (easier) to have bb collisions. Just tell me your ideas!
Back to Top View Popolon's Profile Search for other posts by Popolon Visit Popolon's Homepage Send Private Message Add to Buddy List
 
JEames
Admin Group
Admin Group
Avatar

Joined: 05áNovemberá2002
Location: Catalonia
Posts: 498
Posted: 17áMarchá2004 at 15:17 | IP Logged Quote JEames

hey: I love perfect pixel collisions too...

__________________
Jason Eames Lamarca
+34 639517737
Back to Top View JEames's Profile Search for other posts by JEames Visit JEames's Homepage Send Private Message Add to Buddy List
 
Gaze
Newbie
Newbie


Joined: 16áMarchá2004
Posts: 35
Posted: 17áMarchá2004 at 15:48 | IP Logged Quote Gaze

maybe you can do both, let the user who draws the map/sprite decide if BB or PP collision detection should be used.
Back to Top View Gaze's Profile Search for other posts by Gaze Send Private Message Add to Buddy List
 
Popolon
Admin Group
Admin Group
Avatar

Joined: 05áNovemberá2002
Location: Spain
Posts: 3135
Posted: 17áMarchá2004 at 16:09 | IP Logged Quote Popolon

Yes, that can be done in the engine. The objects have two masks: transparency and collision. But both are optional. In fact, for the collision mask you can set the following values:
- NONE (the object has no collision)
- FULL (only BB collision is performed)
- SAME AS TRANSPARENCY (the transparency mask is used as the collision mask, since very often they are identical)
- FROM BITMAP (a specific collision mask)

If you select FULL, only BB collision is performed

I should update the documentation on the MoG2 engine/editor so that everyone could check the features of the engine... but I'm just too lazy!
Back to Top View Popolon's Profile Search for other posts by Popolon Visit Popolon's Homepage Send Private Message Add to Buddy List
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum

Powered by Web Wiz Forums version 7.01
Copyright ©2001-2003 Web Wiz Guide

This page was generated in 0,1406 seconds.