Hi folks,
I think I have the syntax settled and it is ready to be published. TBEM - Event manager module for thinBasic. It will help you set up events for a game. Well, it could be used for other uses too, but I was thinking more game related, when I was developing it. Included with the module is a little help file that describes the syntax right now. I will wirte some samples tonight to relieve the power of this little module. I'm pretty excited about it as I think it is really a helper when you develop games. Ok, enough bragging. Like I said, samples will follow soon, but the ones who want to play with it allready, download it now.
Update October 18th, 2008: Version 1.10 uploaded. Bugfixes plus new zone commands
Here is just a little console sample:
[code=thinbasic]
uses "TBEM"
uses "Console"
dim event1, event2 as long
dim y,q,z as long
dim stime,dtime,etime as dword
q = 0
z = 0
y = 0
%evg_system = 1
%evg_user = 2
%evt_game = 1
%evt_gui = 2
%evt_next = 3
function FinishIt()
console_writeline(y+") Finish")
q = 99
function = 0
end function
function getTime()
y += 1
console_writeline(y + ") TimeDiff="+dtime)
function = 0
end function
event1 = TBEM_AddEvent("getTime",%evt_gui,getTickcount,%evg_system,%TRUE)
event2 = TBEM_AddEvent("FinishIt",%evt_game,getTickcount+300,%evg_system,%TRUE)
stime = gettickcount
while q = 0
etime = gettickcount
dtime = etime - stime
TBEM_AddTrigger ( %evt_gui)
TBEM_AddTrigger ( %evt_game)
TBEM_run(%evg_system)
wend
console_writeline("TriggerCount="+TBEM_GetTriggerCount+" EventCount="+TBEM_GetEventCount)
console_writeline("Press any key...")
Console_waitkey
[/code]
Bookmarks