Search found 1732 matches

by ivan
Mon Jul 12, 2021 9:19 pm
Forum: Libraries and Tools
Topic: SUPER STRICT for LUA
Replies: 46
Views: 51611

Re: SUPER STRICT for LUA

The easiest way is to declare those before you include sstrict
by ivan
Tue Jul 06, 2021 1:18 pm
Forum: Support and Development
Topic: Box2d questions and Moving box2d objects
Replies: 4
Views: 1397

Re: Box2d questions and Moving box2d objects

If you want the simulation to behave "realistically" then do not change the velocity manually. The math involved in figuring out how to resolve the collision is complicated and depends on friction, restitution, mass and other factors. If you can calculate the resulting forces yourself, the...
by ivan
Sat Jul 03, 2021 11:13 am
Forum: General
Topic: Tips on approaching new project
Replies: 12
Views: 4129

Re: Tips on approaching new project

It's not a dumb idea, but your scope is way too large. I've been making games for a while and I think FTL is a fairly large project for one person. Not impossible but it would take you years. Start with something small like just the combat mechanic and try to build a game around that.
by ivan
Thu Jul 01, 2021 2:39 pm
Forum: Support and Development
Topic: [Solved] What is the lifetime of a Contact?
Replies: 5
Views: 2648

Re: What is the lifetime of a Contact?

No, you can't store your contacts that way because they may be destroyed in the same frame. Try storing just the data you need (collision normal).
by ivan
Fri Jun 25, 2021 5:24 am
Forum: Support and Development
Topic: Collision handling for overlaping fixtures
Replies: 4
Views: 3743

Re: Collision handling for overlaping fixtures

Why do you need a callback between the two fixtures if you want them to act like sensors anyways? One way to do it is using https://love2d.org/wiki/Contact:setEnabled but it doesn't make sense. The proper way is to use collision filtering/masking to ignore the collision between the two dynamic fixtu...
by ivan
Thu May 20, 2021 6:32 am
Forum: Libraries and Tools
Topic: SUPER STRICT for LUA
Replies: 46
Views: 51611

Re: SUPER STRICT for LUA

Hello Jay and thank you for using SUPERSTRICT.
In your case, you have 2 options.
You can either require your lib files BEFORE requiring SUPERSTRICT.
Or you can put the following line at the top of your lib file:

Code: Select all

--!strict
by ivan
Tue May 18, 2021 8:15 am
Forum: Libraries and Tools
Topic: SUPER STRICT for LUA
Replies: 46
Views: 51611

Re: SUPER STRICT for LUA

Can you please post the entire file so I can test it?
by ivan
Tue May 18, 2021 7:58 am
Forum: Libraries and Tools
Topic: SUPER STRICT for LUA
Replies: 46
Views: 51611

Re: SUPER STRICT for LUA

It's thinking my function call is a variable I guess. How do I stop that? Yes, function calls are variables too. You have to make sure the function "Initialise2DArrays" is not global (or declare the function before you include SUPERSTRICT). Looking at your code "Initialise2DArrrays&q...
by ivan
Sun May 16, 2021 5:18 pm
Forum: Libraries and Tools
Topic: SUPER STRICT for LUA
Replies: 46
Views: 51611

Re: SUPER STRICT for LUA

You are right, it doesn't check main.lua by default.
One option is to include main twice: require("main")
Please note that you don't need to run SUPERSTRICT in real-time.
You can run a separate script that goes through all of the files in your game folder.
Thanks for using SUPERSTRICT.
by ivan
Fri May 14, 2021 4:40 am
Forum: Support and Development
Topic: I need to split up a table
Replies: 8
Views: 6209

Re: I need to split up a table

If your level generator is deterministic you can just send the initial random seed as well as the visible range and let the client reproduce the level from scratch. Note that the server would still need to provide information about the state of destructible tiles and so on.