Slimwaffle Posted September 30, 2018 Share Posted September 30, 2018 Hey guys. I just bought the professional version so that I can redo my game in c++. This was so I can add things in from the steam SDK. So I am wanting to know how it works? Can I run c++ alongside lua? Do I need to recode all my lua scripts? If so does this mean I have to create a new project that states it is a c++ project? Quote Link to comment Share on other sites More sharing options...
SpiderPig Posted October 1, 2018 Share Posted October 1, 2018 Scripts can still be attached to objects. There should be a visual studio project file in one of the folders of your project, under Project->Windows i think...? Load that up, and you'll see in App.cpp the code that executes Main.lua. You should just need to recode Main.lua into App.cpp and go from there. Quote Link to comment Share on other sites More sharing options...
Slimwaffle Posted October 1, 2018 Author Share Posted October 1, 2018 Thanks I found it. 1 Quote Link to comment Share on other sites More sharing options...
Slimwaffle Posted October 1, 2018 Author Share Posted October 1, 2018 I got it all working now turns out that leadwerks automatically runs them side by side somehow. Now I just need to figure out how to import steam_api.h because when I try to visual studio says it can't find the file. Quote Link to comment Share on other sites More sharing options...
SpiderPig Posted October 1, 2018 Share Posted October 1, 2018 What are you trying to access in the steam API? Quote Link to comment Share on other sites More sharing options...
Slimwaffle Posted October 1, 2018 Author Share Posted October 1, 2018 I have been following the steamworks instructions. And I need to import the steam api in order to implement controller support. Quote Link to comment Share on other sites More sharing options...
SpiderPig Posted October 1, 2018 Share Posted October 1, 2018 There seems to be functions under Steamworks in C++. Type Steamworks then :: to see the functions available. 1 Quote Link to comment Share on other sites More sharing options...
Josh Posted October 1, 2018 Share Posted October 1, 2018 The Steamworks API is already included. You can use our Steamworks class (in the documentation) or use the library directly. 1 Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
gamecreator Posted October 1, 2018 Share Posted October 1, 2018 I created this a few years ago. Maybe it will help you. https://www.leadwerks.com/community/topic/9663-introduction-to-steam-code-in-leadwerks/ 1 1 Quote Link to comment Share on other sites More sharing options...
Slimwaffle Posted October 2, 2018 Author Share Posted October 2, 2018 Is there any documentation anywhere showing all the steam-works commands. It has a few things I would like to take advantage of. Quote Link to comment Share on other sites More sharing options...
Josh Posted October 2, 2018 Share Posted October 2, 2018 https://partner.steamgames.com/doc/sdk 2 Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Slimwaffle Posted October 2, 2018 Author Share Posted October 2, 2018 thanks Quote Link to comment Share on other sites More sharing options...
Slimwaffle Posted October 4, 2018 Author Share Posted October 4, 2018 I found these commands; Steamworks::Initialize(); Steamworks::InitializeController(); Steamworks::steamcontroller; visual studio says that they are using lua. Does that mean that using my lua scripts for main.lua and stuff. That I can reference the steam API using Steamworks: ? Quote Link to comment Share on other sites More sharing options...
gamecreator Posted October 4, 2018 Share Posted October 4, 2018 Those commands may also be Lua (though I'm curious why they would be) but I'm pretty sure the actual Steam SDK is only C, like for commands that send and receive packets (SendP2PPacket & ReadP2PPacket) and deal with lobbies. Quote Link to comment Share on other sites More sharing options...
Slimwaffle Posted October 4, 2018 Author Share Posted October 4, 2018 I spent all day on this and from what I can gather. In order to use the steam api commands I need to rebuild as a c++ game. From what I can gather. I need to re-write main.lua into app.cpp and re-write menu.lua as menu.cpp. And then systematically change all my lua files to cpp files. I could be wrong though not entirely sure. I also noticed that when I click run in the editor it launches from lua files and I have to use visual studio for the cpp files to launch. How do I make it launch cpp files from editor? Also is there anything special I need to do when publishing as standalone to make it use the cpp files? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.