Search found 1655 matches

by ivan
Mon Jan 11, 2021 9:01 pm
Forum: Libraries and Tools
Topic: SUPER STRICT for LUA
Replies: 27
Views: 1950

Re: SUPER STRICT for LUA

I tried using it with a larger project, but it really doesn't like C modules. And C modules exporting globals is probably double the trouble.
I'll make if work if you show me a concrete example.
by ivan
Mon Jan 11, 2021 8:50 pm
Forum: Libraries and Tools
Topic: SUPER STRICT for LUA
Replies: 27
Views: 1950

Re: SUPER STRICT for LUA

Sorry about that, I have pushed another fix and the comment issue seems to be resolved now. Note that [[double brackets]] can have any number of [===]equal signs[===] inside them Thanks, I was not aware of this! Fair enough, but imo some kind of control is required, because making changes to correct...
by ivan
Mon Jan 11, 2021 6:32 pm
Forum: Libraries and Tools
Topic: SUPER STRICT for LUA
Replies: 27
Views: 1950

Re: SUPER STRICT for LUA

Thanks again for the feedback. I have changed the following patterns: hexp = "0x%x+[Pp][%-%+]?%x" float = "%d*%.%d+[Ii]?" So I think this should handle most of these weird-looking numbers, but more testing wouldn't hurt. Additionally the comment bugs should be fixed after the latest patch on Bitbuck...
by ivan
Mon Jan 11, 2021 1:50 pm
Forum: Libraries and Tools
Topic: SUPER STRICT for LUA
Replies: 27
Views: 1950

Re: SUPER STRICT for LUA

Thanks for the feedback, grump. I have pushed a fix on BitBucket for the following bugs: local foo = 0x1ULL -- works local foo = 0x1LL -- undefined variable 'LL' local foo = 0x1ull -- undefined variable 'ull' local foo = 0x1ll -- undefined variable 'll' local foo = 1ULL -- undefined variable 'ULL' l...
by ivan
Sun Jan 10, 2021 3:53 pm
Forum: Libraries and Tools
Topic: SUPER STRICT for LUA
Replies: 27
Views: 1950

Re: SUPER STRICT for LUA

Great news! SUPERSTRICT now detects unused variables in your Lua scripts: Make sure to use the underscore symbol "_" to avoid this error. local list = {1,2,3} local sum = 0 for i, v in ipairs(list) do -- unused variable 'i' sum = sum + v end Also pushed an optimization update so that a 2 MB Lua file...
by ivan
Sat Jan 09, 2021 4:19 pm
Forum: General
Topic: Wordsearch (HTML5 game)
Replies: 3
Views: 1475

Wordsearch (HTML5 game)

This is not Love2D related but, I just released my first HTML5 game and would love to get some feedback: https://2dengine.com/wordsearch/header.png https://2dengine.com/wordsearch Classic word search game with a bunch of topics and unique puzzles generated each time. Play in your browser completely ...
by ivan
Sat Jan 09, 2021 10:41 am
Forum: Support and Development
Topic: [Solved] Pointing at an object that's out of sight
Replies: 14
Views: 1323

Re: [Solved] Pointing at an object that's out of sight

I have dealt with this issue before and the easiest way is to use my algorithm for SegmentVSAABB:
https://2dengine.com/?p=intersections#section_15
The segment is the ray from the center of the screen to the target point and the AABB is defined by the edges of the screen.
by ivan
Sat Jan 02, 2021 7:44 pm
Forum: Support and Development
Topic: Acceleration with dt
Replies: 3
Views: 717

Re: Acceleration with dt

There is a difference between velocity and acceleration. Generally speaking the formula is
change in position = velocity*dt
With jumping you want to set the velocity once and let the body fall due to gravity.
https://2dengine.com/?p=platformers
by ivan
Sat Jan 02, 2021 8:10 am
Forum: Libraries and Tools
Topic: love.scene (yet another scene graph library)
Replies: 10
Views: 4957

Re: love.scene (yet another scene graph library)

Ive started testing this lib and it's kinda tricky integrating this with an existing camera system. You don't need a separate camera system - the "view" object works as a camera. Also, no `setScale` for view? Also can you elaborate more on the `setScene`? Thank you setScene determines the visible r...
by ivan
Thu Dec 31, 2020 4:00 pm
Forum: Libraries and Tools
Topic: love.scene (yet another scene graph library)
Replies: 10
Views: 4957

Re: love.scene (yet another scene graph library)

So is `view` the same as what camera provides? view is like the "viewport" of a camera. You can move it around and resize it using: view:setScene(x, y, w, h) So as I understand it, one `scene.sprite` can only have one `sprite/image`? You can assign ONE drawable object to each sprite. This could be ...