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.

AppGameKit Classic Chat / Custom Compile Window Player for AGK Tier 1

Author
Message
Chmava
11
Years of Service
User Offline
Joined: 20th Jun 2013
Location:
Posted: 5th Sep 2015 15:58 Edited at: 5th Sep 2015 16:11
I know it's a dumb question, but is there a way for us to custom compile the AppGameKit player for tier 1 in windows?

I know someone mention AppGameKit Tier 1 attach the complied byte code to the end of the player to create the window application.

Is there anyway for us to compile the same player that is used by tier 1 IDE?

The main reason is because using the function: createsoundfrommemblock() is very slow.
And since the player only support 300 sounds, 0-299, this put me in a tough spot.

Of course if the default application support multi-threads, this would not be an issue!
not that the application support multi-threads.
Infact, moving to 3D without multi-threads is suicidal in my opinion!

Additional threads is how we make games with "procedurally generated world" on other engine!
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 5th Sep 2015 16:10
Quote: "not that the application support multi-threads"


AGK does support multiple threads, but in Basic you are not able to control how and when the threads are used. For example you can can communicate via HTTP in a separate thread.

Naphier has compiled his own T1 player for Wordspionage, with additional functionality.

Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt
Chmava
11
Years of Service
User Offline
Joined: 20th Jun 2013
Location:
Posted: 5th Sep 2015 16:13 Edited at: 5th Sep 2015 16:33
No, i mean multi-threads in term of actual loops.
Also, even if the application is multi threads on CPU... it only eat enough CPU resource as 1 CPU core...
In another words, it will not go pass 100%/Total CPU Threads...

If you have 4 CPU threads, it will appear as ~25% on your task manager when fully loaded...

Also, i cannot find anything about "Naphier" as you have mention?
CJB
Valued Member
20
Years of Service
User Offline
Joined: 10th Feb 2004
Location: Essex, UK
Posted: 14th Sep 2015 16:44
If you are using physics in your app, multi-threading is enabled by default for the physics calculations. You can turn this off (or set the max number of threads) using SetPhysicsThreading.

V2 T1 (Mostly)
Phone Tap!
Uzmadesign
Chmava
11
Years of Service
User Offline
Joined: 20th Jun 2013
Location:
Posted: 14th Sep 2015 16:55 Edited at: 14th Sep 2015 17:14
Still, it could be awesome if tier 1 has the ability to run multiple looped threads operation as well!

Also, if all this variable could be dynamic, such as:

#define MAX_SOUND_FILES 300
#define MAX_MUSIC_FILES 50

in Tier 1 as well, that would be great!

In V.1, we could not change external resolution, but in V.2 we could...
Something like that?

I mean, let the developer deal with Destroying their own game?
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 14th Sep 2015 21:02 Edited at: 14th Sep 2015 21:03
do you really need 300+ sounds and 50+ music files in one game mode?
i guess you want preload all in memory.

createsoundfrommemblock can't be slow, its more or less memory copy.
just 44100 bytes each second stereo sound.
should used for audio effects not for music wave files.

maybe ask paul for source of player.

AGK (Steam) V2 Beta .. : Windows 10 Pro, 8.1 Pro 64 Bit : AMD (15.7.1) Radeon R7 265 : Mac mini OS X 10.10 (Yosemite)
Chmava
11
Years of Service
User Offline
Joined: 20th Jun 2013
Location:
Posted: 15th Sep 2015 19:49 Edited at: 15th Sep 2015 19:51
Each game element might have up to 49 sounds playing at a given time.
Each game world may have over 200 sounds playing at a time... softly... when that happen.

Also, because each sound is destroy after each playing...
That means each sound is recreated every half a second to a few second!

So using "createsoundfrommemblock()", this become very very slow!
And the development PC is not even a APU!

So what happen is, additional CPU is used to convert from MemBlock to playable sound, uncompressed WAV file?
That took quite a few additional mili-seconds for each file?

I have develop this with another engine, i know this can be done without lagging.

But i can't be constantly deleting the sound file from memory to load another from a HDD, that is wayyyyyyyy..... slower!

Also, i do not think loading a thousand sound file would take up over 1 GB anyway?

It was lagging for just one sound.
But when sound was not from memblock, it does not lag.
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 15th Sep 2015 21:45 Edited at: 15th Sep 2015 21:46
did you use some voice output for the game elements
or samples in different frequencies?

i don't know the reason why there is a limit for loading samples.
at pc the memory is not the problem.

other idea from me is to use SeekMusic (+GetMusicPosition to pause it after played),
put some waves together in one file mp3 file.
u can play at least 50 sound together in theory.
and i guess play to much samples together is similar to noise.

AGK (Steam) V2 Beta .. : Windows 10 Pro, 8.1 Pro 64 Bit : AMD (15.7.1) Radeon R7 265 : Mac mini OS X 10.10 (Yosemite)
Chmava
11
Years of Service
User Offline
Joined: 20th Jun 2013
Location:
Posted: 16th Sep 2015 01:03 Edited at: 16th Sep 2015 01:04
No?

What i mean is that the game has over 300 item, each with it's own sound file that is required to load without lagging the game by stopping to wait for a HDD file read, convert and store to ram.

And they have to change and play on the fly, without a loading screen.

Login to post a reply

Server time is: 2024-11-16 22:15:26
Your offset time is: 2024-11-16 22:15:26