space triangle seeks commentary, criticism, support

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
User avatar
FruityLark
Prole
Posts: 28
Joined: Sat Jun 13, 2015 8:18 pm

space triangle seeks commentary, criticism, support

Post by FruityLark »

For the latest version see my project thread: viewtopic.php?f=5&t=80398

update: camera lock modes are removed, it's just free camera now.

I have been working on this in my spare time for the last week or so. With a lot of these game concepts being new to me, I tend to try to 'just make it work' instead of making it work right, so to speak.

I started off using middleclass for OOP, and kikito's gamera demo to get off the ground, and you can still see most of it in the code.

I also use the HardonCollider library for collisions and it's very good. I quickly ran into an issue where I would spawn a HC:shape inside my entity class, and when a collision triggered, I could not access the class properties of the entity instance. I resolved this by calling spawn<entity>() functions in my game class, which would instantiate the entity, and collider:shape in local variables, then assign the entity as a property of the collider:shape instance. This was the best way I could think of to use entity classes with HC.

I have a toggle-able LOS setting, though I don't think it's very fun without some sort of fog of war/lighting, and I don't know how I would do that. As it is, the enemies seem to pop in and out of existence to the player.

Image
Last edited by FruityLark on Sun Jun 21, 2015 5:02 pm, edited 1 time in total.
User avatar
FruityLark
Prole
Posts: 28
Joined: Sat Jun 13, 2015 8:18 pm

Re: space triangle seeks commentary, criticism, support

Post by FruityLark »

Hey, sorry for the bump but I'm curious whether I scared people off with my crash warning a few days ago (shouldn't be a prob now), or maybe I was too vague in my request for feedback. Maybe it's not worth the effort or something because everyone and their mother has made an asteroids knockoff... :cry:
User avatar
vladgalay
Citizen
Posts: 60
Joined: Sun Jan 29, 2012 4:54 pm
Location: The Motherland

Re: space triangle seeks commentary, criticism, support

Post by vladgalay »

I like your game so far. It looks very nice to me, even with such primitive graphics :)
But i think you can get much more attention if you will present your game in Projects and Demos section of forum ;)
User avatar
FruityLark
Prole
Posts: 28
Joined: Sat Jun 13, 2015 8:18 pm

Re: space triangle seeks commentary, criticism, support

Post by FruityLark »

Thank you for your feedback! You're right, I guess this section is more for specific questions..
When I've made some more progress I will probably make a post in the other forum.

Maybe I will look into some cool shaders in the future, but for the moment I am satisfied with this polygonal world.
User avatar
FruityLark
Prole
Posts: 28
Joined: Sat Jun 13, 2015 8:18 pm

Re: space triangle seeks commentary, criticism, support

Post by FruityLark »

I just realized I subconsciously stole the project name of a user on this forum who technically owns the rights to the name space triangle. viewtopic.php?f=3&t=2198&start=1150#p184516

Indeed I did draw inspiration from this, though I am not using love.physics.

update: Now I [strikethrough]looking at implementing[/strikethrough] *have borrowed the "edge of screen" radar method they used as well.

Code: Select all

--draw enemies
			for i, v in ipairs(enemies) do
				
				local l,t,w,h = self.cam1:getVisible()
				local x1, y1 = l, t
				local x2, y2 = l + w, t + h
				
				local enemy_x1, enemy_y1 = v:center()
				
				if point_contained(x1, y1, x2, y2, enemy_x1, enemy_y1) then
					
					v.instance:drawSelf(v)

				else

					--not in camera
					local px, py = player1:center()
					local angle_from_player = math.angle(px, py, enemy_x1, enemy_y1)
					

					//somehow draw icon/circle at edge of camera
                                        -- NOT MY CODE
					love.graphics.setColor(255, 0, 0, 255)
					
					love.graphics.push()
					love.graphics.translate(l,t)
												
					if enemy_x < px then
						local hor = (enemy_x-px)/(w/2)
						local vert = (enemy_y-py)/(h/2)
						love.graphics.circle("fill",0+50,(h/2)-(enemy_y-py)/hor,8)
					end
					if enemy_x > px then
						local hor = (enemy_x-px)/(w/2)
						local vert = (enemy_y-py)/(h/2)
						love.graphics.circle("fill",w-50,(h/2)+(enemy_y-py)/hor,8)
					end
					if enemy_y < py then
						local hor = (enemy_x-px)/(w/2)
						local vert = (enemy_y-py)/(h/2)
						love.graphics.circle("fill",(w/2)-(enemy_x-px)/vert,0+50,8)
					end
					if enemy_y > py then
						local hor = (enemy_x-px)/(w/2)
						local vert = (enemy_y-py)/(h/2)
						love.graphics.circle("fill",(w/2)+(enemy_x-px)/vert,h-50,8)
					end
					
					love.graphics.pop()		
					-- END NOT MY CODE

									
				end

			end
User avatar
N88
Prole
Posts: 10
Joined: Sat May 23, 2015 10:31 pm

Re: space triangle seeks commentary, criticism, support

Post by N88 »

EDIT: I though posting this here was more appropriate than in the actual project thread here: viewtopic.php?f=5&t=80398
FruityLark wrote:I just realized I subconsciously stole the project name of a user on this forum who technically owns the rights to the name space triangle. viewtopic.php?f=3&t=2198&start=1150#p184516
How terrible! But filling a lawsuit would be a bother so I'll just allow you to use the name :D
Anyway my Space Triangle was just the result of random stuff while learning Lua and how to use Box2D, I had no plans to make "Space Triangle" game and currently I'm working on teleko (shameful advertising)

I didn't expect to have my code "borrowed" so there are some redundant variables and ugly copy-pasting. I guess I'll have to code properly from now on in case of another borrowing.
I drew the icons somehow like this, using similar triangles:
Image
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 87 guests