Whoops. I always thought that 'OnPressed' was the equivalent of 'just pressed' since it is conjugated in the past and not called 'OnPress'. And that 'OnKeyDown' was the opposite...Kjell wrote:You can do this exact thing a little bit easier actually
Search found 639 matches
- Tue May 21, 2024 9:39 am
- Forum: General discussion
- Topic: Menu with character's name
- Replies: 5
- Views: 110
Re: Menu with character's name
- Mon May 20, 2024 12:01 pm
- Forum: General discussion
- Topic: Menu with character's name
- Replies: 5
- Views: 110
Re: Menu with character's name
Hi LsJack, Here's a quick loop + key code scanning to type with the keyboard: <?xml version="1.0" encoding="iso-8859-1" ?> <ZApplication Name="App" Caption="ZGameEditor application" FileVersion="2"> <OnLoaded> <ZExpression Expression="MyName = &...
- Sun May 05, 2024 12:45 pm
- Forum: Your projects
- Topic: SFXR
- Replies: 20
- Views: 17756
Re: SFXR
Thanks for the explanations :) Here's a simplified version of ZSFXR that initialize sounds from preset function that is generated by my Google Sheet. By the way, two decimals is enough to define the sound parameters. It works really well! (mouse click the app) <?xml version="1.0" encoding=...
- Fri May 03, 2024 6:55 pm
- Forum: Your projects
- Topic: SFXR
- Replies: 20
- Views: 17756
Re: SFXR
I've started writing a moulinette (= conversion tool, in french) to convert jsfxr sound serialization from : { "oldParams": true, "wave_type": 3, "p_env_attack": 0, "p_env_sustain": 1, "p_env_punch": 0.35304476503997884, "p_env_decay": 1, &...
- Fri May 03, 2024 3:00 pm
- Forum: Your projects
- Topic: SFXR
- Replies: 20
- Views: 17756
Re: SFXR
Thanks, both of you. So here's my last zsfxr test, which preloads 100 sounds (10 sounds per type, but tone isn't the most interesting). I deactivated the Random sounds and the Right click mutation. During the initialization of the sound, as suggested by Kjell, I'm playing them once, all while checki...
- Fri May 03, 2024 8:28 am
- Forum: Your projects
- Topic: SFXR
- Replies: 20
- Views: 17756
Re: SFXR
Thanks Ville. I think I'm getting pretty good at randomly finding bugs in ZGE :lol: So, setting the buffer.SizeDim1 before the sample.Length seems to fix the crash that could occur during the initialization. (I update the project above) buffer.SizeDim1 = S + 1; // Set buffer size MySampleIndex = 0; ...
- Thu May 02, 2024 11:04 pm
- Forum: Your projects
- Topic: SFXR
- Replies: 20
- Views: 17756
Re: SFXR
So I tried to initialize a bunch of sounds when starting the app, but there's something wrong with it and I don't know where... So I'm wondering if I can really pass a Sample as a variable in a function, then do a RefreshContent on that variable, or if I messed up somewhere else with the calculation...
- Thu May 02, 2024 4:56 pm
- Forum: General discussion
- Topic: Edition of the Sound component
- Replies: 5
- Views: 7302
Re: Edition of the Sound component
There was an idea to add some kind of high-level wizard interface on top of this. Something like SFXR. I remember that Kjell even had a prototype of this. Is that right, Kjell? After playing with sfxr and seeing the limitations, I would be more than happy to see that, and to help to make it, if nee...
- Thu May 02, 2024 4:00 pm
- Forum: Your projects
- Topic: SFXR
- Replies: 20
- Views: 17756
Re: SFXR
With the new method, I still had to add a little +1 to prevent crashing. But it's running just fine :wink: buffer.SizeDim1 = S + 1; // Set buffer size MySampleIndex = 0; That's because SFXR uses doubles ( 64-bit floating point ) for some variables, which is something ZGE doesn't support. So I trimme...
- Thu May 02, 2024 1:04 pm
- Forum: Your projects
- Topic: SFXR
- Replies: 20
- Views: 17756
Re: SFXR
Hahaha, I've fallen into a new loophole. All right. So from what I understand, the buffer size should be equal to the sample lenght, right? float S = SampleLength(); // Get the sample length float L = S/44100; // Get the sample length in seconds // MySound.Length = L; // Set the Sound component leng...
- Wed May 01, 2024 8:58 pm
- Forum: Your projects
- Topic: SFXR
- Replies: 20
- Views: 17756
Re: SFXR
Following Kjell's concerns about the amount of time the generation of the sound can take, I made an example that runs all the sounds presets of jsfxr. 0 key = pickupCoin 1 key = laserShoot 2 key = explosion 3 key = powerUp 4 key = hitHurt 5 key = jump 6 key = blipSelect 7 key = synth 8 key = tone 9 ...
- Wed May 01, 2024 5:39 pm
- Forum: Your projects
- Topic: SFXR
- Replies: 20
- Views: 17756
Re: SFXR
it would have been nice if ZGE exposed the audio interface ( DirectSound on Windows ) so you don't have to run a second interface Oh, ok, I get it. Alternatively, how could I import several sfx sounds without having to loop on each file to read their data? Maybe I could simply copy/paste the serial...
- Wed May 01, 2024 5:03 pm
- Forum: Your projects
- Topic: SFXR
- Replies: 20
- Views: 17756
Re: SFXR
I quickly updated Kjell's example, as ZGE isn't happy anymore with names being the same as components File:File, Sound:Sound and Sample:Sample. Weirdly enough, KeyPress:KeyPress isn't an issue. <?xml version="1.0" encoding="iso-8859-1" ?> <ZApplication Name="App" Captio...
- Wed May 01, 2024 12:16 pm
- Forum: Feature requests
- Topic: Triple mouse-click to select entire line of text
- Replies: 5
- Views: 265
Re: Triple mouse-click to select entire line of text
It was just an idea to improve the UX. If it's much more complicated than simply updating an external library, forget about it
- Tue Apr 30, 2024 7:38 am
- Forum: Feature requests
- Topic: Triple mouse-click to select entire line of text
- Replies: 5
- Views: 265
Re: Triple mouse-click to select entire line of text
Thanks. So I tried to replace included SynEdit by the new one, but it's not that simple :lol: Here's what I did: Install Delphi RADStudio Download ZGameEditor: https://github.com/VilleKrumlinde/zgameeditor Fix drive letter in the project: ZDesigner.dproj line 67: <DCC_DcuOutput>t:\temp\zge</DCC_DcuO...