2012-07-06 19:32:27

Hi,
I think you should give an example to all of the functions in the manual, because we need them. Here in this code I tried to do the tts thing but it didn't work...
window=ui.showwindow("TTs Test")
tts.inut()
ttsvoice.say("Hello!")

I post sounds I record to freesound. Click here to visit my freesound page
I usually post game recordings to anyaudio. Click here to visit my anyaudio page

2012-07-06 20:37:09 (edited by robjoy 2012-07-06 20:37:53)

Hi,
3 things:
Init is spelt i n i t, not with a u, as you spelled it.
ttsvoice.say: there is no ttsvoice. Everything happens via the tts object.
Also, you do not wait for DFE to actually show the window, initialize sapi and speak. Wait at least 5 seconds after you make sapi say something.

Rob

----------
Robjoy, AKA Erion
Visit my site for all the things I do and to contact me.
You can also stop by for a slice of Pi

2012-07-07 00:04:27

The installer doesn't work for my computer. Can you make a different installer or a zip file?

I don't speak as good as I write, and I don't listen as good as I speak.

2012-07-07 00:58:54

If only hrtf were actually explained somewhere rather than "these are the magical functions, but you can't have them!". Though, individual ear shape varies, so anything universal would be difficult anyway.

I want to give this a try at some point. I'm wanting to do 3d stuff at present, though, heh. Probably using pitch, if I can do that without it being a complete and utter fail.

看過來!
"If you want utopia but reality gives you Lovecraft, you don't give up, you carve your utopia out of the corpses of dead gods."
MaxAngor wrote:
    George... Don't do that.

2012-07-07 01:42:50

I read a couple of formulas ... But you can't really do anything with just those. Ah well...

I'd have a way to make it work though, if only I knew how to use channel configuration from another file...

--
Talon
Wanna play my Games? Listen to my Music? Follow me on Twitter, and say hi~
Code is poetry.

2012-07-07 11:01:12

Yukio,

I've uploaded a zip version, get it at the same link I posted in the first message.
By the way, what error message do you get when you try to run the installer?

Rob

----------
Robjoy, AKA Erion
Visit my site for all the things I do and to contact me.
You can also stop by for a slice of Pi

2012-07-07 14:46:20

Hi.
Is any possible to make something like Audio Game Maker? graphically based interface to make simple games? It would be fine to totally newbie programmers. For example making wall: in menu "create wall or object" and in dilog box curve - straight, circular, parabolic or other shapes, if straigth wide and length, if circular radius and length or angle. Making player in dialog box for example: pressing key "some" change position x by or set position x or moving position x by per second and other. If someone wan't to put non standard piece of code he can open text editor and write something.
Another feature would be writing modules. If I have idea to make something to racing games i can make object, classes and other things, add to graphic enviromment and share. I'm not a programmer so i don't no is it very hard to do but to beginners it can be very usefull.

sorry for my english

2012-07-07 20:14:34

one thing I want is support for timers. Like the timer fuctios you have are only timerIit and TimerDiff and I'm not sure how I could implement a multiple timer situation unless I had tons and tons of varibles that were updated every 0.05 seconds or something.

I like to sleep, Sleep is good,
This is how I do it: Lie on a nice warm cozy bed, and dream dreams about how to rule the world!
Follow @TheGreatAthlon5 on twitter for humorous facts and game updates!
If you like my posts, thumb me up!

2012-07-07 20:54:15

Hi,

So how would you like it?
This is actually quite interesting.
I have multiple timers in Flamerun, and they seem to work just fine for what I need them. Were you thinking of something like registered events? You set it to call a function every so often or how were you thinking?

--
Talon
Wanna play my Games? Listen to my Music? Follow me on Twitter, and say hi~
Code is poetry.

2012-07-13 20:42:22

Hello,

Right after a week, as we promised, DFE alpha 2 is here. It is downloadable from the usual place, see first post for more info. The Zip file is not up to date.
We have lots of internal changes that are not visible, and also a couple of new features for the tts library:

First, games: @bryanbkm82 added a rock paper scissors game, this is now part of DFE.
Next, Ghorthalon's new Flamerun game is at the examples section on the site. If you haven't tried it out in a late alpha 1, check it out, it's very addicting and fun!

New features
•Clipboard handling: clip.get and clip.set
•New functions for tts: sayaudio(), pause(), resume(), sayfile()
Fixes
•Fixed a bug where ui.closewindow would attempt to close an invalid window.
•DFE’s open file dialog now correctly sets the working directory so Lua’s “require” finds the included files/libraries.
•Memory leak and invalid address read/write fixes.
•Now the installer requests admin privileges and creates some additional shortcuts.
•Removed multilanguage support from the installer. This should make it work under Japanese Windows. Please let me know how this goes!

Alpha 3 wil be here next week, if things go well with multiple joystick support, both in DirectX and XInput mode and force feedback for your rumbling pleasure.

Cheers,
Rob

----------
Robjoy, AKA Erion
Visit my site for all the things I do and to contact me.
You can also stop by for a slice of Pi

2012-07-13 21:09:14

@gorth I meant that bgt supports timers that allow for starting, stopping, pausing and checking how much time had been elapsed, all individuall. And with only 2 timer functions that doesn't seem possible unless I do a lot of variable messing around that's looped every liek  5 ms or something.

I like to sleep, Sleep is good,
This is how I do it: Lie on a nice warm cozy bed, and dream dreams about how to rule the world!
Follow @TheGreatAthlon5 on twitter for humorous facts and game updates!
If you like my posts, thumb me up!

2012-07-13 22:33:25

hello,
I have a question
how can we compil the game to exe file?
I'm not sure if this question has been asked before or not

2012-07-13 22:53:32

Hello,
This is not possible at the moment. If we decide to add it, it will probably be one of the last features before beta 1.

Rob

----------
Robjoy, AKA Erion
Visit my site for all the things I do and to contact me.
You can also stop by for a slice of Pi

2012-07-17 11:41:32

Hmm, well I'm gonna give this a try, not sure how good I'll be but I think it'll be easier than BGT.

Devin Prater
My Blog
Follow me

2012-07-18 13:41:33

Well,

I just tried something. But I think I need a bit more debugging info, here's what I tried:

tts.init()
ui.showwindow("TESTING!")
dfe.sleep(5000)
tts.say("Hello!")
dfe.sleep(1500)
dfe.exit()


initialize tts, show a window. This appears to work fine. I sleep to give it time to settle, then I do a say to make it speak, and make it sleep to actually give it time to speak. Only ....it won't speak, and I cannot figure out why. Someone help?

Thanks,
Balliol

2012-07-18 16:32:09

Hi,
Your code seems to work fine here. The window pops up, the tts speaks as it should.
What is your default sapi voice in control panel? Maybe it takes a bit more time to initialise or synthesize speech. Try increasing the second sleep's value to, say 10000. A bit extreme, but it should help if the tts is slow. Ivona comes to mind.

Rob

----------
Robjoy, AKA Erion
Visit my site for all the things I do and to contact me.
You can also stop by for a slice of Pi

2012-07-24 14:05:15

Hi.
So I've just briefly looked at the manual and the two game examples, and I feel like stubid. The coding seems to be extremely easy to learn, but I still don't get how it works. what do I have to code in the .lua file and what do I have to make in the project file? Do I only have to read the manual to get started, or do I need to learn all about Lua first?
I'm pretty much confused because it seems to be very easy to work with, but I don't know really how to get started. I think I just have to code some very basic stuff which just loads and plays a sound so I can get used to how it works.
Would it be possible to make games like the road to rage in Lua and Dragon flame? It all seems that simple and easy, so i couldn't imagine making advanced games in it, but I hope I'm wrong.
Is Lua cross platform? And what's required to run a lua script?
Sorry for all these questions, but I couldn't find the answers in the manual.
I hope I finally will get used to scripting and programming with Dragon flame. I have many awesome  ideas for games, and I have wanted to make games for many years now. It's just learning how to code which always have been my issue!

Best regards SLJ.
Feel free to contact me privately if you have something in mind. If you do so, then please send me a mail instead of using the private message on the forum, since I don't check those very often.
Facebook: https://facebook.com/sorenjensen1988
Twitter: https://twitter.com/soerenjensen

2012-07-24 14:17:46

Hey SLJ,

Ok, Gorth or Robjoy, please correct me if I'm wrong, but here goes.
BFE is whats called a game engine. It is not a programming language in itself, it is an ...uhm ...extension if you will.
It extends the basic lua language to be able to perform game-related stuff. It does this by calling certain .lua files which define the extension's functions.
I am just going by example here, I don't have the actual files in front of me but if you call for example
tts.init()
You are calling the init function of the tts library. Where exactly this library can be found and if it can be read I do not know.
I think LUA was chosen for this because it is very compatible with other, existing languages. You can easily interface with c++, c, and all sort of other languages using lua function calls.
This essentially means you can write a very complex function in c++ (or have someone write it) and call it using an easy lua function call, like:
game.MakeAGraphicDanceAroundTheScreen()

LUA , in that case, is sort of a glue to glue components from other languages together. That explanation is stolen from the 'programming lua'  book recommended in the hatchling guide.
So, to answer your questions:
- Do I need to learn lua first? Yes, you do. You can do some simple stuff with just the dfe functions though. Code like:
tts.init()
dfe.sleep(1000)

tts.say("hello!")
dfe.sleep(1000)
dfe.exit()

is rough but should work, barring any syntax errors I made.
But for example if you want to build a sidescroller, which is pretty easy to do in this language, you need to know about loops and arrays, which are basic building blocks of the lua language ...and pretty much any other language I can think of actually.
- what to put in the lua files? ... That depends on your coding styles. The way I understand it, and keep in mind i'm a DFE newbie but have worked with other languages , is .lua files are sort of header files. You put function definitions in those files, for example you could have a file gun.lua which handles everything to do with guns, and then you need to specify the name of gun.lua in your main source file. This allows you to call the functions in gun.lua from your source file. This seems counter-intuitive at first, but makes your code far more readable. If you wouldn't use this practice, which you don't have to do, you would get one huge code file which makes searching for stuff a nightmare and I think performance will be affected slightly as well.
What do I need to run a lua script? ...Since you use DFE, you can just use dfe.exe as your interpreter. To compile the script is not possible yet at this time.
If you really get stuck at learning to code, don't hesitate to contact me. I am starting a computer science course next year and I wouldn't mind giving you a hand. I believe you have my msn, but if not, its
[email protected]

Good luck,
Balliol

2012-07-25 09:11:27

Hi Balliol.
Thank you very much for your answer. that helped a lot. smile
So, I code the game in the main lua language, and use DFE to call all the functions the engine supports, so I don't have to make all these functions from scratch. Yeah, that makes sense. thanks a lot.
I don't remember if I have you on msn, but I'll add you if I don't.
I can't wait to read more about Lua, and I finally hope I can get used to it. smile
Is Lua only a Windows script or does that work on other operating systems as well?

Best regards SLJ.
Feel free to contact me privately if you have something in mind. If you do so, then please send me a mail instead of using the private message on the forum, since I don't check those very often.
Facebook: https://facebook.com/sorenjensen1988
Twitter: https://twitter.com/soerenjensen

2012-07-26 11:23:48

Hi,
Thanks Balliol.

Lua is cross platform, however Dragonflame is not, at least not at this time. It works under Windows only, but if it is well received we might consider making it cross platform.

Rob

----------
Robjoy, AKA Erion
Visit my site for all the things I do and to contact me.
You can also stop by for a slice of Pi

2012-07-26 13:55:34

Hi Rob.
Thanks for your answer. I'll do what I can to get used to Lua. smile

Best regards SLJ.
Feel free to contact me privately if you have something in mind. If you do so, then please send me a mail instead of using the private message on the forum, since I don't check those very often.
Facebook: https://facebook.com/sorenjensen1988
Twitter: https://twitter.com/soerenjensen

2012-07-26 14:18:04

Hi,
I think it woudl be fine to make a cross platform engine.
I have got a question. I tried tts function. It will say the text but it will exit instead of waiting for pressing enter. Can you help me, please? Here is the code:
key.init()
tts.init()
ui.showwindow("Test")
dfe.sleep(2000)
tts.say("Hello, this is the test of TTS function.")
dfe.sleep(2000)
if (key.pushed(key.enter)) then
dfe.exit()
end

2012-07-26 19:35:20

Hi,
Your posted code is missing a loop that would not let it exit unless the user presses enter.
From the moment you start running a Dragonflame script, the engine executes it. If it reaches the end, it closes. Thus you need to have a block of code that repeats over and over, waiting for something.
Thus, your code would look like this:
key.init()
tts.init()
ui.showwindow("Test")
dfe.sleep(2000)
tts.say("Hello, this is the test of TTS function.")
-- my modification starts here
while 1 do -- an endless loop
dfe.sleep(20) -- let the computer do other things.
if (key.pushed(key.enter)) then
dfe.exit()
end
end

Hth,
Rob

----------
Robjoy, AKA Erion
Visit my site for all the things I do and to contact me.
You can also stop by for a slice of Pi

2012-07-27 09:05:22 (edited by SLJ 2012-07-27 09:07:49)

Hi.
Having no programming skills at all, I'll just try to chime in with an answer which might fix your issue:
In your code, you have wrote that your script should wait until you press enter, but your script doesn't know what else to do if you don't press enter.
Here is an example:
If the enter key is pressed then exit.Else, what? What should I do if you don't press enter? I think that's the reason for your script just exits, because the computer don't know what else to do.
I'm not sure on this because I don't have any programming skills at all, but you could try to see if that works.
Edit:
I don't know what I screwed up, but I didn't saw robs answer before I wrote mine, lol.

Best regards SLJ.
Feel free to contact me privately if you have something in mind. If you do so, then please send me a mail instead of using the private message on the forum, since I don't check those very often.
Facebook: https://facebook.com/sorenjensen1988
Twitter: https://twitter.com/soerenjensen

2012-07-27 12:46:21

Thank you.