Search found 510 matches

by dusoft
Sun Oct 22, 2023 6:26 pm
Forum: General
Topic: Should I make my own tilesets or download a set online (with credit of course)
Replies: 4
Views: 79824

Re: Should I make my own tilesets or download a set online (with credit of course)

togFox wrote: Sun Oct 22, 2023 7:47 am You can make your own temporary placeholder tiles and then swap them out later.
For prototyping I usually don't even use real tiles, just squares of different colors and then switch. So I can support togfox's suggestion/approach.
by dusoft
Sat Oct 21, 2023 4:07 pm
Forum: Libraries and Tools
Topic: Simple button library help
Replies: 3
Views: 27571

Re: Simple button library help

I bet it doesn't, this is not Javascript. Please refer to the wiki and mousepressed events.
by dusoft
Wed Oct 18, 2023 10:58 pm
Forum: Support and Development
Topic: Table insert name
Replies: 7
Views: 8034

Re: Table insert name

This is basic Lua. Did you search before posting? basic="search" tutorials={} tutorials[basic]=1 print (tutorials.search) Doesn't seem to quite work When i try to print,it give me an error(nil value)like it actually don't put any value in the table It prints 1 correctly. Check your setup.
by dusoft
Wed Oct 18, 2023 5:41 pm
Forum: Support and Development
Topic: Table insert name
Replies: 7
Views: 8034

Re: Table insert name

This is basic Lua. Did you search before posting?

Code: Select all

 
basic="search" 
tutorials={} 
tutorials[basic]=1
print (tutorials.search)
by dusoft
Tue Oct 10, 2023 10:23 am
Forum: Support and Development
Topic: Optimal way to track mouse-hover/touch over a tile position ?
Replies: 10
Views: 12462

Re: Optimal way to track mouse-hover/touch over a tile position ?

BrotSagtMist wrote: Tue Oct 10, 2023 12:11 am I does not depend.
Its two lines for less cpu usage. That is ALWAYS a profit.
Not adding it if you can is a harmful mindset.
You should be spanked.
I still beg to differ and call it a microoptimization. Sorry, not into spanking.
by dusoft
Mon Oct 09, 2023 1:20 pm
Forum: Support and Development
Topic: Optimal way to track mouse-hover/touch over a tile position ?
Replies: 10
Views: 12462

Re: Optimal way to track mouse-hover/touch over a tile position ?

Whaaat? How can you be so wasteful when the fix to pull it to almost zero cpu is just adding two lines? It depends on what's going on in the background. If zero to nothing, it does not matter. If nothing to something and it's not CPU intensive, it does not matter. Etc. until you actually hit some p...
by dusoft
Sun Oct 08, 2023 11:28 am
Forum: Support and Development
Topic: Optimal way to track mouse-hover/touch over a tile position ?
Replies: 10
Views: 12462

Re: Optimal way to track mouse-hover/touch over a tile position ?

BrotSagtMist wrote: Sat Oct 07, 2023 2:59 pm ^
Yea the check itself is fine.
But you can optimize how often it runs. Eg check if the mouse has actually moved before.
That sounds like microoptimization to me. This basic hover check is not CPU intensive at all.
by dusoft
Sun Oct 08, 2023 7:57 am
Forum: Support and Development
Topic: I have a question about how lua works in general
Replies: 8
Views: 7345

Re: I have a question about how lua works in general

https://www.lua.org/pil/16.html

See the explanation about colon functions here.