Gamestudio Links
Zorro Links
Newest Posts
loading historical data 1st time
by AndrewAMD. 04/14/23 12:54
Trade at bar open
by juanex. 04/13/23 19:43
Bug in Highpass2 filter
by rki. 04/13/23 09:54
Adding Limit Orders For IB
by scatters. 04/11/23 16:16
FisherN
by rki. 04/11/23 08:38
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
1 registered members (Grant), 999 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rki, FranzIII, indonesiae, The_Judge, storrealba
18919 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
ptr_for_handle #225226
09/03/08 12:45
09/03/08 12:45
Joined: Aug 2004
Posts: 1,345
Kyiv, Ukraine
VeT Offline OP

Serious User
VeT  Offline OP

Serious User

Joined: Aug 2004
Posts: 1,345
Kyiv, Ukraine
its a simple question, so i write it here smile
so, why Ptr_for_handle has "Speed: Medium" and Handle has "Speed: Fast" ?

Handle just run through list of entities and get unique id instead of pointer, so why Ptr_for_handle(that works the same as Handle) is not so fast?


1st prize: Lite-C and Newton 2.17 by Vasilenko Vitaliy

Newton2 videos: http://tinyurl.com/NewtonVideos
LiteC+Newton2 discussion: http://tinyurl.com/NewtonWrapperDiscussion
Latest LiteC+Newton2 version(v23, from 29.10.2009): http://depositfiles.com/files/ae1l0tpro
Re: ptr_for_handle [Re: VeT] #225283
09/03/08 20:20
09/03/08 20:20
Joined: Sep 2007
Posts: 761
Hrvatska (Croatia ), Slavonski...
cro_games Offline
User
cro_games  Offline
User

Joined: Sep 2007
Posts: 761
Hrvatska (Croatia ), Slavonski...
1.It is not the same,you use function "handle()" to store entity pointer,and you use function "ptr_for_handle()" to restore entity..
2."handle()" is smaller function so it works faster..


Hello everyone my name is Ivan Mandic from "Frozen pixel studio". wink
-----------------------------------
Homepage: www.fpx-studio.com
e-mail: emu_hunter_1990@hotmail.com
(working on a game engine)
Re: ptr_for_handle [Re: cro_games] #225294
09/03/08 20:54
09/03/08 20:54
Joined: Aug 2004
Posts: 1,345
Kyiv, Ukraine
VeT Offline OP

Serious User
VeT  Offline OP

Serious User

Joined: Aug 2004
Posts: 1,345
Kyiv, Ukraine
thanks, i just uncorrect formulate my sentence:)
okay, so i'd try to explain from another point of view...

so i need to combine almost all entities on level with their skill1
as i dont know, what entity would load first, i see 2 ways of solving this:
1)
- i set SkillFounder to 1
- run through all entities with the help of Ent_next()
- select only entities, that i need for now(skill1 == SkillFounder)
- combine them
- set SkillFounder to 2 and run again through all entities
- repeat until SkillFounder rich, say, 100

so i'd need to cycle through all entities 100 times


2)
- i make large matrix, where i store handles
- run only once through all entities, saving all pointers
- after the cycling, i restore all pointers that i need(with skill1==1)
- and combine them


so, what way is better? in first i need to make a lot of fast cycles, but in second i'd need to work with medium-speed Ptr_for_handle()


1st prize: Lite-C and Newton 2.17 by Vasilenko Vitaliy

Newton2 videos: http://tinyurl.com/NewtonVideos
LiteC+Newton2 discussion: http://tinyurl.com/NewtonWrapperDiscussion
Latest LiteC+Newton2 version(v23, from 29.10.2009): http://depositfiles.com/files/ae1l0tpro
Re: ptr_for_handle [Re: VeT] #225315
09/03/08 23:15
09/03/08 23:15
Joined: Sep 2007
Posts: 761
Hrvatska (Croatia ), Slavonski...
cro_games Offline
User
cro_games  Offline
User

Joined: Sep 2007
Posts: 761
Hrvatska (Croatia ), Slavonski...
Use 1. You can use "for" not "while" to make all in one frame..
Code:
for(SkillFounder = o; SkillFounder < 100; SkillFounder++)
{
}


Last edited by cro_games; 09/03/08 23:17.

Hello everyone my name is Ivan Mandic from "Frozen pixel studio". wink
-----------------------------------
Homepage: www.fpx-studio.com
e-mail: emu_hunter_1990@hotmail.com
(working on a game engine)
Re: ptr_for_handle [Re: cro_games] #225317
09/03/08 23:25
09/03/08 23:25
Joined: Aug 2004
Posts: 1,345
Kyiv, Ukraine
VeT Offline OP

Serious User
VeT  Offline OP

Serious User

Joined: Aug 2004
Posts: 1,345
Kyiv, Ukraine
okay, thank you for help smile


1st prize: Lite-C and Newton 2.17 by Vasilenko Vitaliy

Newton2 videos: http://tinyurl.com/NewtonVideos
LiteC+Newton2 discussion: http://tinyurl.com/NewtonWrapperDiscussion
Latest LiteC+Newton2 version(v23, from 29.10.2009): http://depositfiles.com/files/ae1l0tpro
Re: ptr_for_handle [Re: VeT] #225320
09/03/08 23:28
09/03/08 23:28
Joined: Sep 2007
Posts: 761
Hrvatska (Croatia ), Slavonski...
cro_games Offline
User
cro_games  Offline
User

Joined: Sep 2007
Posts: 761
Hrvatska (Croatia ), Slavonski...
Np man,any time.. laugh


Hello everyone my name is Ivan Mandic from "Frozen pixel studio". wink
-----------------------------------
Homepage: www.fpx-studio.com
e-mail: emu_hunter_1990@hotmail.com
(working on a game engine)

Gamestudio download | chip programmers | 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