Search found 9 matches

by jurses
Fri Jul 20, 2018 9:10 pm
Forum: General
Topic: list of challenges
Replies: 0
Views: 2068

list of challenges

Hello everyone, I've seen in 4chan/g programming threads some challenge's list.
Maybe we could make a compilation of ideas sorted by difficulty.
I'll start.
  • make a stickman with bones and rig mid
  • Make a pong game for 2 players
  • Tick Tak toe 2 players to play on lan
by jurses
Sun Feb 25, 2018 10:52 pm
Forum: General
Topic: Sheared canvas out of the window's range
Replies: 4
Views: 3229

Re: Sheared canvas out of the window's range

pgimeno wrote: Sun Feb 25, 2018 10:25 pm Yes, as I said, draw the character to the screen instead of a canvas.

Code: Select all

-- Just replacing this:
love.graphics.draw(canv2)
-- with this:
carRender()
-- and removing this from carRender:
love.graphics.clear()
-- works.
You don't need canv2 at all.
thank you
by jurses
Sun Feb 25, 2018 9:55 pm
Forum: General
Topic: Sheared canvas out of the window's range
Replies: 4
Views: 3229

Re: Sheared canvas out of the window's range

pgimeno wrote: Sun Feb 25, 2018 9:50 pm Hard to say without seeing your code. If you're drawing your character to a canvas, you can draw it to the screen instead. If you're using a scissor, you can remove the scissor before drawing it.
Sorry I thought it was uploaded.
cocheSinJ.zip
The code
(653.01 KiB) Downloaded 232 times
by jurses
Sun Feb 25, 2018 9:23 pm
Forum: General
Topic: Sheared canvas out of the window's range
Replies: 4
Views: 3229

Sheared canvas out of the window's range

Image

There's the character, a white square with red border I can move.

But when it is out of the window size, (is it being followed by the camera), it disappears.
Image

How can I always show the character?
by jurses
Thu Dec 07, 2017 2:57 pm
Forum: General
Topic: should I use canvas
Replies: 4
Views: 3766

should I use canvas

Hi friends, I'm wondering in which situations I should use canvas, it will be easier if you show me some examples in games. For example, I read in the wiki By drawing things that do not change position often (such as background items) to the Canvas . http://www.terminally-incoherent.com/blog/wp-cont...
by jurses
Sat Oct 31, 2015 12:22 pm
Forum: Support and Development
Topic: firing at an angle + other things
Replies: 4
Views: 3793

Re: firing at an angle + other things

That's how I made it, Hope it works. I used math.atan() so you don't have to work with the distance between the mouse and the origin, but be careful. Love default works the third quadrant like the first. Sorry i had to fix one thing :crazy: , the best is anglef.love
by jurses
Fri Oct 30, 2015 1:47 pm
Forum: Support and Development
Topic: [Solved]Table as an argument
Replies: 5
Views: 3439

Re: Table as an argument

It's usually faster to not have an extra function sorely for putting some data into another representation where you could just use the form love.graphics.polygon asks for (the simple numerically indexed table that asks for vertex points, as in, coordinate pairs of your polygon). That representatio...
by jurses
Fri Oct 30, 2015 1:26 pm
Forum: Support and Development
Topic: [Solved]Table as an argument
Replies: 5
Views: 3439

Re: Table as an argument

Anything is possible!* local tri = { a = { x = 20, y = 20}, b = { x = 40, y = 20}, c = { x = 30, y = 40}, } function createTriangle(t) return {t.a.x, t.a.y, t.b.x, t.b.y, t.c.x, t.c.y} end function love.draw() love.graphics.polygon('fill',createTriangle(tri)) end *Citation needed Okay, okay, this i...
by jurses
Fri Oct 30, 2015 12:45 pm
Forum: Support and Development
Topic: [Solved]Table as an argument
Replies: 5
Views: 3439

[Solved]Table as an argument

Is it possible pass a table as an argument, I've seen in love.graphics.polygon is possible like: local vertices = {100, 100, 200, 100, 150, 200} -- passing the table to the function as a second argument love.graphics.polygon('fill', vertices) and what I want is function love.load() triangle={a = { x...