Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
0 registered members (), 17,416 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Performance issue - 2d tile based game #286720
08/26/09 18:45
08/26/09 18:45
Joined: Aug 2009
Posts: 26
Goiânia - Brazil
D
dmBlack Offline OP
Newbie
dmBlack  Offline OP
Newbie
D

Joined: Aug 2009
Posts: 26
Goiânia - Brazil
I am new to game programming (around 6 months) and even less experienced with lite-c.

The project I am working on has it´s main systems working fine such as colision detection, movement, AI, map transitions, dialogues from files...

Since I have no previous game programming experience I was wondering if what is happening is ok or I´m going the wrong way... I mean, some stuff (i.e. AI system and dialogues related to quests ) actualy works but there are a lot of loops and decision/selection structures whitin more loops and decision/selection structures.

Sometimes even with extense comments I get lost. Perhaps it´s just as complicated as that ... or maybe I am missing something?

Re: Performance issue - 2d tile based game [Re: dmBlack] #286722
08/26/09 19:01
08/26/09 19:01
Joined: Nov 2007
Posts: 1,143
United Kingdom
DJBMASTER Offline
Serious User
DJBMASTER  Offline
Serious User

Joined: Nov 2007
Posts: 1,143
United Kingdom
LOL that's a little vague! We need some sample code or some pseudo code to evalute what you mean.

Re: Performance issue - 2d tile based game [Re: DJBMASTER] #286736
08/26/09 20:29
08/26/09 20:29
Joined: Aug 2009
Posts: 26
Goiânia - Brazil
D
dmBlack Offline OP
Newbie
dmBlack  Offline OP
Newbie
D

Joined: Aug 2009
Posts: 26
Goiânia - Brazil


The colision detection function runs inside the game loop that controls movement, map transitions, keyboard inputs and other things I don´t remember right now.

This function receives as parameter the return of another function that check wich is the current map (so that only that specific map stuff is displayed and only the colisions valid for that map are verified)

function colisionDetection(var id_map)
{
var identifier = id_map
if (identifier == 1)
{
if (character is at a certain position && npc is visible)
{
if (key_space)
{
dialogue_pan.flags = VISIBLE;
while(character is at a certain position && npc is visible)
{
drawText(some parameters);
wait(-1);
}
}
dialogue_pan.flags = 0;
}
... other situations within this map...
}
else if (identifier == X)
{...}
... other maps situations
}

This is an example wich I can remember right now... but there are other worst cases...


Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1