blitzmax & steamworks [SOLVED]

BlitzMax Forums/BlitzMax Programming/blitzmax & steamworks [SOLVED]

Godra25(Posted 2014) [#1]
how to integrate blitzmax code with steamworks SDK..
my plan is just only use it to achievement feature

thanks


JoshK(Posted 2014) [#2]
Do you have a product to distribute on Steam?


Godra25(Posted 2014) [#3]
@JoshK: yes i do, my game already passed steam greenlit


Codebox(Posted 2014) [#4]
MadJack could help here a little. He's the creator of Tank Universal (in Blitz3D) and
he's using some Steamish features like Achievements. May he's got some hints :-)

Oh, and hello Board :-)


JoshK(Posted 2014) [#5]
You have to create a C++ DLL for BMX to interface with, but here's how I did it:
	void Steamworks::SetAchievement(const std::string& name)
	{
		steamuserstats->SetAchievement(name.c_str());
	}

	void Steamworks::IncrementAchievementProgress(const std::string& name)
	{
		int data;
		if (steamuserstats->GetStat(name.c_str(), &data))
		{
			steamuserstats->SetStat(name.c_str(), data+1);
		}
	}

I think you need to make some other calls for the achievements to sync up right away. I haven't figured those out quite yet.


Godra25(Posted 2015) [#6]
thanks all for your answers :)
i've found the solution from here