Mike "riff"
Member
OTSound project
Latest News:
Sound project halted to address OTClient bugs: 2/8/17
Phase one: complete add single creature sound to game 2/5/17
Phase two: complete play multiple monsters and repeat for new creature. 2/5/17
Phase three: complete database: my OTClient database with all build file, SDK, and sound files. Be aware 4 gigs 17,000 + files at this time 2/6/17.
https://www.dropbox.com/sh/kkr5q5blbgykevx/AADsytcm8EMx15XxbUTphzpia?dl=0
Phase four creature attack sounds.
Phase five creature death sounds.
Phase six action sound.
more to follow.
data/sounds/ has more changes to it. It now include Music, creature, action, effects, voices.
will be also adding attack and death under creature.
I encourage those who are interested in sound engineer to start downloading files and add them to the correct directories. You can save, convert, and mix sounds with Audocity. Enjoy!
There is a bug in OTClient its being called at sprite loading call so I don't think it has to do with me unless a unforeseen memory issue is found. When I have time I might look into it.
If not installing my complete OTClient you will have to do the following installation
Install notes:
All you have to do, is get irrklang files put them in your SDK pack
then link header and lib
then make these changes to main.cpp and creature.cpp
Then get free monster sound from Open Game Art
put the sounds into your data/sounds folder
change there name to these files for the creature they sound like
exsample: rat.wav or
dragon.wav
The program will get the right files load them automatically and play it.
If someone would like to help the project by downloading sound and rename them that would be a big help so I can keep programming....
I'm using irrklang this is a professional sound engine just google them
Here are the code changes:
main.cpp:
Top of creature.h:
Top of creature.cpp:
The sound trigger and sound player are in the creature.cpp file line 450(range)
localplayer.cpp
This how I write code I write a story then change it to code languages.
I call it first pass method just to help others if start out like me.
Latest News:
Sound project halted to address OTClient bugs: 2/8/17
Phase one: complete add single creature sound to game 2/5/17
Phase two: complete play multiple monsters and repeat for new creature. 2/5/17
Phase three: complete database: my OTClient database with all build file, SDK, and sound files. Be aware 4 gigs 17,000 + files at this time 2/6/17.
https://www.dropbox.com/sh/kkr5q5blbgykevx/AADsytcm8EMx15XxbUTphzpia?dl=0
Phase four creature attack sounds.
Phase five creature death sounds.
Phase six action sound.
more to follow.
data/sounds/ has more changes to it. It now include Music, creature, action, effects, voices.
will be also adding attack and death under creature.
I encourage those who are interested in sound engineer to start downloading files and add them to the correct directories. You can save, convert, and mix sounds with Audocity. Enjoy!
There is a bug in OTClient its being called at sprite loading call so I don't think it has to do with me unless a unforeseen memory issue is found. When I have time I might look into it.
If not installing my complete OTClient you will have to do the following installation
Install notes:
All you have to do, is get irrklang files put them in your SDK pack
then link header and lib
then make these changes to main.cpp and creature.cpp
Then get free monster sound from Open Game Art
put the sounds into your data/sounds folder
change there name to these files for the creature they sound like
exsample: rat.wav or
dragon.wav
The program will get the right files load them automatically and play it.
If someone would like to help the project by downloading sound and rename them that would be a big help so I can keep programming....
I'm using irrklang this is a professional sound engine just google them
Here are the code changes:
main.cpp:
Code:
#include <iostream>
#include <irrklang.h>
// To avoid having to put irrklang::before of the name of every class, we tell the compiler that we use
// that namespaces here.
using namespace irrklang;
#pragma comment(lib, "irrKlang.lib") // link with irrKlang.dll
int main(int argc, const char* argv[])
{
std::vector<std::string> args(argv, argv + argc);
// start the sound engine with default parameters
ISoundEngine* engine = createIrrKlangDevice();
if (!engine)
return 0; // error starting up the engine
// setup application name and version
g_app.setName("OTClient");
g_app.setCompactName("otclient");
g_app.setVersion(VERSION);
Code:
virtual void onPositionChange(const Position& newPos, const Position& oldPos);
virtual void onAppear();
virtual std::string creatureSound(std::string creatureName);//< added function
virtual void onDisappear();
virtual void onDeath();
Code:
#include <stdio.h>
#include <irrKlang.h>
#include <string>
using namespace std;
using namespace irrklang;
ISoundEngine* engine = createIrrKlangDevice();
Creature::Creature() : Thing()
The sound trigger and sound player are in the creature.cpp file line 450(range)
Code:
/*
// this is my file detector test it checks if file name and path are correct
std::fstream fs;
fs.open("../data/sounds/demon2.wav");
if (fs.is_open())
{
fs << "lorem ipsum";
std::cout << "Operation successfully performed\n";
fs.close();
}
else
{
std::cout << "Error opening file";
}
*/
string Creature::creatureSound(string creatureName) {//< new function
// can not move to own class we need variable m_name
if (creatureName != m_oldName) {//< added this line to drop if creature still on screen
m_oldName = creatureName; //< make old creature the new creature name
// make music types ogg files and sound samples .wav format for all sound keep it simple
string filePath = "../data/sounds/creature/", fileName, fileType = ".wav";
fileName = creatureName;
string soundFileName = filePath + fileName + fileType;
// now the converted file name is in strBuffer. We can play it.
engine->play2D(soundFileName.c_str());
}
return creatureName;
}
This how I write code I write a story then change it to code languages.
I call it first pass method just to help others if start out like me.
Code:
callLuaField("onHealthChange", health, maxHealth, oldHealth, oldMaxHealth);
// call creatureSound, just got hit
// Creature creature1;
// mmmm no poison damage curse ect..long after
// creature1.creaureSound(string creatureName);
// get nearest creature to repeat creature sound
// if error: test only list creature name to check for error this time
// play creature sound here ok for now
// cannot walk if dead
if(health == 0) {
Last edited: