Search found 96 matches

by BrotSagtMist
Wed Jan 19, 2022 6:05 am
Forum: Support and Development
Topic: How to draw color emojis with love.graphics.print()
Replies: 23
Views: 3201

Re: How to draw color emojis with love.graphics.print()

Yes i am aware, I am currently creating tons of fonts, when i show multiple fonts and zoom in/out i either get massive ram usage when i keep them or massive cpu usage from garbage collecting them. Something i found no solution for yet. But the primary goal is to keep letters sharp not to save on res...
by BrotSagtMist
Wed Jan 19, 2022 5:06 am
Forum: Support and Development
Topic: How to draw color emojis with love.graphics.print()
Replies: 23
Views: 3201

Re: How to draw color emojis with love.graphics.print()

Full color emojis for a multiplayer chat is exactly what id like to have at some point... Images are pretty useless for that if you want seamless zooming. Anyway, a while ago i posted this simple parser https://love2d.org/forums/viewtopic.php?f=5&t=91900 This method can be used to add at least o...
by BrotSagtMist
Sun Jan 09, 2022 7:32 pm
Forum: Support and Development
Topic: Example code, why is this is slow using fullscreen? font fnt
Replies: 16
Views: 433

Re: Example code, why is this is slow using fullscreen? font fnt

http://www.enlightenment.org/ss/e-61db34365769f3.79766022.jpg Anyway you are misunderstanding how canvases work. Not drawing something to the canvas is the heavy part but drawing the canvas is, simply because it has more pixels. Unless the total bits flipped in the scene is greater than the amount ...
by BrotSagtMist
Sun Jan 09, 2022 7:02 pm
Forum: General
Topic: How to go about daily random numbers
Replies: 26
Views: 703

Re: How to go about daily random numbers

This all looks so complicated, whats wrong with just
rng=math.floor(os.time()/(24*60*60)) ?
by BrotSagtMist
Sun Jan 09, 2022 6:41 pm
Forum: Support and Development
Topic: Example code, why is this is slow using fullscreen? font fnt
Replies: 16
Views: 433

Re: Example code, why is this is slow using fullscreen? font fnt

I'm drawing +/- 20 x the word "test" using a font image and 20x a rectangle. Just to make this crystal clear, you are NOT drawing the word test. Your where drawing 2000*1000*20 pixels with alpha channel and the need for 4 multiplications. And your _fix_ merely makes this horrible pixel co...
by BrotSagtMist
Sun Jan 09, 2022 2:26 pm
Forum: Support and Development
Topic: Example code, why is this is slow using fullscreen? font fnt
Replies: 16
Views: 433

Re: Example code, why is this is slow using fullscreen? font fnt

There really is no gain when using an image instead of text printing. It only makes sense when each text is accompanied by tons of decor that takes time to compute. If all texts where rendered on the same canvas and you would draw one single picture instead i dont even think it would be faster than ...
by BrotSagtMist
Sun Jan 09, 2022 12:46 pm
Forum: Support and Development
Topic: Example code, why is this is slow using fullscreen? font fnt
Replies: 16
Views: 433

Re: Example code, why is this is slow using fullscreen? font fnt

How is that even a question, you are drawing a ton of pixels there, 20 times the size of your screen.
And since pixel count goes up quadratic with size even a tiny difference in window size has a big impact on performance.
by BrotSagtMist
Sun Jan 02, 2022 11:53 am
Forum: Support and Development
Topic: How to program action game in a wrapping world? (2D torus)
Replies: 15
Views: 831

Re: How to program action game in a wrapping world? (2D torus)

I only used this for tiles and point objects, rectangles will make this complicated again.
by BrotSagtMist
Sun Jan 02, 2022 9:11 am
Forum: Support and Development
Topic: How to program action game in a wrapping world? (2D torus)
Replies: 15
Views: 831

Re: How to program action game in a wrapping world? (2D torus)

Wrap everything into modulo.
Like Tile[X%Screensize]
Consider that the real position of objects doesnt matter at all that way.
A block being at 1500 will collide with a block at 500 as long as the collision math includes a modulo 1000.
by BrotSagtMist
Fri Dec 31, 2021 6:01 am
Forum: Support and Development
Topic: Weird syntax error[ SOLVED ]
Replies: 2
Views: 432

Re: Weird syntax error

You are not closing the for loops at line 29 and 50 in bullets.lua with an _end_. Be more careful with indents or get an editor which automatically checks for open blocks. When you properly indent the block in the for loop you end up seeing a gap underneath, that way coders see where ends are missin...