Search found 38 matches

by liyonglove2d
Wed Apr 01, 2015 11:04 am
Forum: Support and Development
Topic: Terrain transition problem, HELP!
Replies: 9
Views: 2685

Terrain transition problem, HELP!

Here's the .love file , tell me if you cannot download it from baidu.com :x (It's really slow for me to upload the file to this website) http://pan.baidu.com/s/1sCJAQ I want terrain transition for the game, so I draw this kind of tile to the canvas. ground_farm.png But, I get annoying black edge of ...
by liyonglove2d
Wed Apr 01, 2015 6:13 am
Forum: Games and Creations
Topic: Somebody helps me out with the performance problem?
Replies: 20
Views: 9950

Re: Somebody helps me out with the performance problem?

Another problem of this game...... :x I want your help so much! http://love2d.org/forums/viewtopic.php?f=4&t=79948 THANKS A LOT! By the way, not to be rude, but this section of the forum is for showing off your games, not requesting help. With that in mind, you should primarily post updates abo...
by liyonglove2d
Wed Apr 01, 2015 6:10 am
Forum: Games and Creations
Topic: Somebody helps me out with the performance problem?
Replies: 20
Views: 9950

Re: Somebody helps me out with the performance problem?

I recorded some gameplay: NF7qkv-wIQg As far as I know, a method used in 3d games is using level of detail models: low-poly & smaller-texture models for objects in the distance. I imagine 2d games use the same. So what you might want to do is: instead of scaling down big images when zooming out...
by liyonglove2d
Tue Mar 31, 2015 4:13 pm
Forum: Support and Development
Topic: How do you do the hit test?
Replies: 6
Views: 3149

Re: How do you do the hit test?

by slime on Wed Mar 25, 2015 9:20 pm: Canvas:getPixel will be removed in LÖVE 0.10.0. Canvas:getImageData is about as fast (or faster, if you would have called getPixel in a loop.) Not sure, maybe this method is bad. Elders will tell, I hope. 1. Create one more canvas 1x1 pixel (in love.load() for ...
by liyonglove2d
Tue Mar 31, 2015 3:59 pm
Forum: Support and Development
Topic: How do you do the hit test?
Replies: 6
Views: 3149

Re: How do you do the hit test?

Inspired by you, I come to this and dont know whether its a good way or not.
Render the pixel under mouse on the canvas to be tested to a 1x1 canvas, and then apply getImageData():getPixel() to the 1x1 canvas to test alpha value.
Hope it's practical :)
by liyonglove2d
Tue Mar 31, 2015 3:44 pm
Forum: Support and Development
Topic: How do you do the hit test?
Replies: 6
Views: 3149

Re: How do you do the hit test?

seems no useful information in that topic :shock:
by liyonglove2d
Tue Mar 31, 2015 3:34 pm
Forum: Support and Development
Topic: How do you do the hit test?
Replies: 6
Views: 3149

Re: How do you do the hit test?

You shouldn't use getPixel method of canvas. It will be deprecated in v. 0.10 as slime stated several days ago. Effective and simple approach (using same method of Image) was shown to me by Azhukar (thanks man, I was just too dumb). See our discussion "Wrappers for glReadPixel, glColor3uiv / g...
by liyonglove2d
Tue Mar 31, 2015 1:29 pm
Forum: Games and Creations
Topic: Somebody helps me out with the performance problem?
Replies: 20
Views: 9950

Re: Somebody helps me out with the performance problem?

Another problem of this game...... :x
I want your help so much!
http://love2d.org/forums/viewtopic.php?f=4&t=79948

THANKS A LOT!
by liyonglove2d
Tue Mar 31, 2015 1:27 pm
Forum: Support and Development
Topic: How do you do the hit test?
Replies: 6
Views: 3149

How do you do the hit test?

My second post here :) :) I'm making a game, and encounter with many problems and want help! Here's a screensnap for you to figure out quickly what kind of game it is: game1.png As you can see, a player can click the chicken to attack it, a very basic operation. The chicken is a spriter animation, m...
by liyonglove2d
Tue Mar 31, 2015 11:47 am
Forum: Games and Creations
Topic: Somebody helps me out with the performance problem?
Replies: 20
Views: 9950

Re: Somebody helps me out with the performance problem?

Nice game! Gives 60 FPS (100-120 if vsync is off) on my system (about 4 years-old, CPU: AMD Athlon II X4 640, RAM: 12 GB, VIDEOCARD: Nvidia GeForce GTX 560 Ti, OS: Xubuntu 14.10 64 bit). Not very powerfull at these days as you see. At first launch it loads a long while, at second - almost immediate...