Search found 1073 matches

by ivan
Sat Aug 12, 2017 11:05 pm
Forum: Support and Development
Topic: Loading font with more than 127 Chars
Replies: 25
Views: 809

Re: Loading font with more than 127 Chars

BTW, lowercase Cyrillic В looks like this: в which is different than the Latin lowercase b. In Cyrillic you can't write lowercase В as b... depending on your font, b may look similar to the Cyrillic Ь or Ъ which are different letters altogether. :) So it's not a good idea use these interchangeably d...
by ivan
Sat Aug 12, 2017 10:49 pm
Forum: Support and Development
Topic: [Solved] Game Controlling Question
Replies: 4
Views: 144

Re: [Newbie] Game Controlling Question

Nelvin is on the right track, although a "cleaner" solution might be to just pass all of the input to the current state. So instead of changing the callback, you react to the input events, based on the current "state" of the game: function love.mousepressed(...) state.press(...) end states = {} stat...
by ivan
Sat Aug 12, 2017 5:56 am
Forum: Support and Development
Topic: Loading font with more than 127 Chars
Replies: 25
Views: 809

Re: Loading font with more than 127 Chars

I've tried it with this: local glyphs = "\1\2\3\4\5\6\7\8\9\10\11\12\13\14\15\16\17\18\19\20\21\22\23\24\25\26\27\28\29\30\31\32\33\34\35\36\37\38\39\40\41\42\43\44\45\46\47\48\49\50\51\52\53\54\55\56\57\58\59\60\61\62\63\64\65\66\67\68\69\70\71\72\73\74\75\76\77\78\79\80\81\82\83\84\85\86\87\88\89...
by ivan
Thu Aug 10, 2017 5:57 pm
Forum: Support and Development
Topic: Loading font with more than 127 Chars
Replies: 25
Views: 809

Re: Loading font with more than 127 Chars

The first Chars are not there. It is just space, I can't copy it into my file. Any other Idea? The first 32 ANSI characters are not printable, so you're not going to be able to draw them using Love2D. The Lua console will probably fail to display UTF8 too. If you're trying to draw a string that con...
by ivan
Tue Aug 08, 2017 4:09 pm
Forum: General
Topic: [Solved] Mouse click weirdness
Replies: 3
Views: 176

Re: Mouse click weirdness

Furthermore, when you want to remove elements DURING iteration, make sure you are going in reverse: -- remove ring if radius greater than ringToBig function ringsRemove() for i = #rings, 1, -1 do local v = rings[i] if v.r + ringWidth > ringToBig then playerScore = playerScore - v.score table.remove(...
by ivan
Sun Aug 06, 2017 3:32 pm
Forum: Support and Development
Topic: creating a concave polygon
Replies: 5
Views: 173

Re: creating a concave polygon

love.math.triangulate is probably not the best output to throw at the poor Box2D/love.physics library. With physics you want optimal/Delauney triangulations which is generally slower than the "typical" methods used for rendering. Next you have the additional limitations of Box2D which doesn't allow ...
by ivan
Sun Aug 06, 2017 1:58 pm
Forum: Support and Development
Topic: Transparent window with borderless window
Replies: 20
Views: 573

Re: Transparent window with borderless window

One of the strengths of Love2D is that it's cross platform.
You make your game and it works the same on desktops and Android, iOS, etc.
I doubt what you are trying to do will be supported since it doesn't make sense across different platforms.
by ivan
Sun Jul 30, 2017 5:11 pm
Forum: Support and Development
Topic: Scaling cellmap
Replies: 3
Views: 119

Re: Scaling cellmap

Note that whenever you find yourself shifting/copying a lot of data around, stop and seriously consider what you are doing. Generally speaking, you shouldn't have to scale/copy data in this manner because it's utterly pointless. What's the point of shifting around memory, just make your original map...
by ivan
Fri Jul 21, 2017 3:55 pm
Forum: General
Topic: I god a bold question, can somebody enhance my code and/or give me hints to code better?
Replies: 6
Views: 320

Re: I god a bold question, can somebody enhance my code and/or give me hints to code better?

Typically, you want to have some sort of level format, so that your level data is not dependent on your game's API. Level data should be just that: data and you should hopefully be able to easily edit each level (either through an editor or the file format should be human-readable). The idea is to r...
by ivan
Fri Jul 21, 2017 2:32 pm
Forum: General
Topic: I god a bold question, can somebody enhance my code and/or give me hints to code better?
Replies: 6
Views: 320

Re: I god a bold question, can somebody enhance my code and/or give me hints to code better?

Hello and welcome to the Love2d forums. Learning any programming language takes time so don't get discouraged by criticism. Ok, so briefly going over the code, I have to say that it needs more work. First of all you want to get rid of the globals - they make it harder to tell what's going on since t...