Jump to content

Recommended Posts

Posted

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?

Posted

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.

Posted

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.

Posted

The Steamworks API is already included. You can use our Steamworks class (in the documentation) or use the library directly.

  • Like 1

My job is to make tools you love, with the features you want, and performance you can't live without.

Posted

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:     ?

Posted

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.

Posted

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?

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...