Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / #include at runtime

Author
Message
Blobby 101
20
Years of Service
User Offline
Joined: 17th Jun 2006
Location: England, UK
Posted: 14th Dec 2011 19:28
Hey, I was wondering if there was any way to do something similar to this, as both IDE (obviously) and #Include including both do their work at compilation rather than on the fly.

This would normally be fine, but I've found it's easier to hard code my cutscenes, and I thought that a good way to handle it more dynamically would be to store them as include files and then search for and load them in within the engine.
So, is there any way to do this or would I be better off creating some kind of interpreter for it?

bitJericho
23
Years of Service
User Offline
Joined: 9th Oct 2002
Location: United States
Posted: 14th Dec 2011 19:30
dbp is a compiled language, and won't make include files, so nope, not possible. You'd need to make an interpreter.


Blobby 101
20
Years of Service
User Offline
Joined: 17th Jun 2006
Location: England, UK
Posted: 14th Dec 2011 19:36
ehhh, thought as much. Oh well, thanks anyway Jerico

Blobby 101
20
Years of Service
User Offline
Joined: 17th Jun 2006
Location: England, UK
Posted: 14th Dec 2011 20:51
Sorry about double posting, but this is a slightly unrelated question - what other ways would you consider creating real time cutscenes? Ideally, they'd need to be able to control the camera and currently loaded actors/props plus play model animations, but I can't really hardcode them because of how dynamic the engine is.

Rudolpho
20
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Sweden
Posted: 14th Dec 2011 21:35
Maybe a scripting system would be appropriate then?


"Why do programmers get Halloween and Christmas mixed up?"
Neuro Fuzzy
19
Years of Service
User Offline
Joined: 11th Jun 2007
Location:
Posted: 14th Dec 2011 23:25 Edited at: 14th Dec 2011 23:27
Yeah, you'd have to write an interpreter.

I looked into doing this with a DBPro LUA plugin, but I never really got anywhere (because I didn't get around to implementing it).

[edit]
I reread your post, and I think that unless you're working with a team (so someone else would be making the cutscenes) or are planning to add in heavy modding support, you don't really need to worry about not hard-coding cutscenes. Getting an interpreter up and running might take a while, and it would be time better spent coding.

MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 15th Dec 2011 01:02
Sooo... LUA is good for rt-cut scenes?... Point me in the right direction please

Chris Tate
DBPro Master
17
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 15th Dec 2011 15:05 Edited at: 15th Dec 2011 15:07
The Unity LUA plugin interprets Lua scripts and also provides a number of script based object manipulation commands. With the plugin you can alter the scenes without having to recompile the source code.

Another alternative or complement to scripting is using key frame timelines. You could create timelines in a text file and parse it into DBPRO using Matrix1 utility 31 or a CSV or XML parser.

In certain situations; creating animated X files in a comprehensive animation editor would be easier.

Blobby 101
20
Years of Service
User Offline
Joined: 17th Jun 2006
Location: England, UK
Posted: 15th Dec 2011 18:22
ahh, that's helped Chris, thanks!

Login to post a reply

Server time is: 2026-06-26 15:43:24
Your offset time is: 2026-06-26 15:43:24