Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411509 Posts in 69375 Topics- by 58430 Members - Latest Member: Jesse Webb

April 26, 2024, 11:49:46 AM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)General thread for quick questions
Pages: 1 ... 61 62 [63] 64 65 ... 69
Print
Author Topic: General thread for quick questions  (Read 135430 times)
JWki
Level 4
****


View Profile
« Reply #1240 on: March 14, 2018, 01:42:45 AM »

Do I have to build Bullet (the physics library) to external libraries using the provided CMake or Premake option, or can I just slap the source into my own project and compile it all together? Would make things a lot easier with my super cross-platform setup. x:

Gotta look at what the cmake does for configuration, I think there's a fair bit in there that you'd have to duplicate.
It's not exactly a plug in thing.
Logged
BorisTheBrave
Level 10
*****


View Profile WWW
« Reply #1241 on: March 14, 2018, 02:36:26 PM »

In principal, you can make CMake file for your project, and then include Bullet as a subdirectory. Then CMake will generate a project with both sources in it. I expect it's pretty fiddly in practise, as the settings for source inclusion aren't the same as building a library, and no two cmake files seem to have the same way of customising them.

What I do which is stupid but works, is make 2 cmake files. The first downloads and builds all external libraries and installs them to a special subdirectory. The second builds my project, and is hard coded to include that subdirectory in the search path. So if you want to setup the external libs quickly you can, but you are also free to get them from other sources.

Here's the setup I cribbed off: https://github.com/ivansafrin/Polycode/blob/master/BUILD.md

Logged
sheep herd
Guest
« Reply #1242 on: March 16, 2018, 12:31:03 PM »

According to the GM:S manual the draw event is more taxing that any other, if I were to use the 'event perform' function during the draw event would it still be as intensive as the draw event or rather take up the same resources as whatever event it was I was triggering?
Logged
ProgramGamer
Administrator
Level 10
******


aka Mireille


View Profile
« Reply #1243 on: March 17, 2018, 09:36:10 AM »

You would be unable to draw anything in any event other than the draw event, and manually triggering another event from the draw event would be as taxing as just executing that code in the draw event.
Logged

Ordnas
Level 10
*****



View Profile WWW
« Reply #1244 on: March 19, 2018, 01:36:05 AM »

I would put the "event perform" in a function that you are sure that is being called when the actor is active on screen (so the actor draw () is being called), so you have the logic separated from the presentation, avoiding to change the implementation everytime an existing asset is modified during the development.
Logged

Games:

ferreiradaselva
Level 3
***



View Profile
« Reply #1245 on: July 03, 2018, 06:23:37 AM »

Is there a name for an operation that transforms any value greater than 0 to 1?

Like this:
Code:
vec velocity = {0, 3}
vec move = velocity.to_one()

print(move) // {0, 1}
Logged

ProgramGamer
Administrator
Level 10
******


aka Mireille


View Profile
« Reply #1246 on: July 03, 2018, 09:13:15 AM »

Code:
sign();

Returns the sign of a number. -1 for negative numbers, 0 for 0, and 1 for positive numbers

It's a built-in function in GML, which is really useful
Logged

Foxwarrior
Level 1
*



View Profile WWW
« Reply #1247 on: July 03, 2018, 10:22:31 AM »

If you care about keeping 0.5 0.5, then there's min(1,number) to only change the result when it would be more than 1.
Logged
gimymblert
Level 10
*****


The archivest master, leader of all documents


View Profile
« Reply #1248 on: July 03, 2018, 12:36:14 PM »

Is there a name for an operation that transforms any value greater than 0 to 1?

Like this:
Code:
vec velocity = {0, 3}
vec move = velocity.to_one()

print(move) // {0, 1}
What do you mean? you want the range of 0-3 remap to the scale 0-1?


Else you want to clamp anything bigger than 1?
Code:
if (velocity > 1)
 {
   velocity = 1;
 }




edit: OUPS misread! Who, Me?
Logged

ferreiradaselva
Level 3
***



View Profile
« Reply #1249 on: July 03, 2018, 04:33:45 PM »

Yeah, "sign"!

Thank you!
Logged

Kyuugatsu
Level 1
*



View Profile
« Reply #1250 on: July 05, 2018, 12:32:54 PM »

Anyone have a good idea of how the speech bubbles in 'Night in the Woods' are made?

https://www.youtube.com/watch?v=KAurdQwlreY#t=2h30m

I imagine it's just a Unity canvas with some type of shader on it?
Logged

Ordnas
Level 10
*****



View Profile WWW
« Reply #1251 on: July 06, 2018, 12:23:26 AM »

Sort of probably, the game being developed in a custom engine had a more flexible way to manage it, anyway using a canvas on the UI layer is a correct way to start.  Smiley
Logged

Games:

Kyuugatsu
Level 1
*



View Profile
« Reply #1252 on: July 07, 2018, 11:59:32 AM »

Sort of probably, the game being developed in a custom engine had a more flexible way to manage it, anyway using a canvas on the UI layer is a correct way to start.  Smiley

Actually, NITW is made in Unity. I ended up using a scrolling noise texture to distort the UV values. Now learning to maybe make a shader graph of it.
Logged

Ordnas
Level 10
*****



View Profile WWW
« Reply #1253 on: July 10, 2018, 12:57:19 AM »

Ah ok, I confused with their open source dialogue system Yarn:
https://github.com/InfiniteAmmoInc/Yarn
Logged

Games:

ProgramGamer
Administrator
Level 10
******


aka Mireille


View Profile
« Reply #1254 on: September 02, 2018, 07:36:55 AM »

Hi, I have a question for people who have published open source stuff on GitHub or similar.

I want to make some C++ header-only libraries available for download and ideally have them be cross-platform. From what I gathered, I should use CMake for this, however I haven't been able to find a tutorial that properly explains how it works beyond the most basic use, and I don't exactly want to buy the official book, especially since there's no digital version. So, do you know of any good CMake guides that explain how to do useful stuff and explain why things work the way they do?

Thanks in advance!
Logged

ferreiradaselva
Level 3
***



View Profile
« Reply #1255 on: September 02, 2018, 10:04:10 AM »

I don't know where you can find it (I don't use CMake on my projects), but...

I don't think you need to use any building system if you are making a header-only library. The appeal of the header-only libraries is that users can copy to their projects, and they add to their own building system. And if you ever need to use a building system, go with the simpler first (make), and switch to CMake only if you really need it.

If you want a build system for the purpose of configuration, you could explain on the README.md the macros that can be used to configure.

Check how I did with my library \/ If anyone wants to configure, they can use the -D option of their compiler, or use -include their_config_file.h and add the configuration macros in the header.
« Last Edit: September 02, 2018, 10:13:21 AM by ferreiradaselva » Logged

ProgramGamer
Administrator
Level 10
******


aka Mireille


View Profile
« Reply #1256 on: September 02, 2018, 11:31:55 AM »

Well, if the intended use case was installing the library manually, then yeah, I wouldn't need to use CMake, but I wanted to make my library compatible with vcpkg, which does use it. I also figure it would be good general knowledge to know how to use CMake for future projects and such.
Logged

cykboy
Level 2
**

ye


View Profile
« Reply #1257 on: September 05, 2018, 08:16:32 AM »

Well, if the intended use case was installing the library manually, then yeah, I wouldn't need to use CMake, but I wanted to make my library compatible with vcpkg, which does use it. I also figure it would be good general knowledge to know how to use CMake for future projects and such.

http://lmgtfy.com/?q=how+to+use+cmake
Logged
ProgramGamer
Administrator
Level 10
******


aka Mireille


View Profile
« Reply #1258 on: September 05, 2018, 08:25:59 AM »

I specifically said that the tutorials I did find weren’t that helpful. I did try googling around you know.
Logged

cykboy
Level 2
**

ye


View Profile
« Reply #1259 on: September 05, 2018, 01:40:32 PM »

I specifically said that the tutorials I did find weren’t that helpful. I did try googling around you know.

what are you specifically trying to do with cmake? just build binaries of a header only library? dependencies? can help point you in a more specific direction then
Logged
Pages: 1 ... 61 62 [63] 64 65 ... 69
Print
Jump to:  

Theme orange-lt created by panic