teaching friend problem

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
coke905
Citizen
Posts: 52
Joined: Tue Jun 05, 2012 1:46 am

teaching friend problem

Post by coke905 »

Code: Select all

function enemyInit()
	enemies = {}
	remEnemy = {}
	
	for i=1,10 do
		enemy = {}
		enemy.x = i * 80
		enemy.y = i * 25		
		enemy.Speed = 90
		enemy.image = "Images/enemy/enemy1.png"
		table.insert(enemies, enemy)
	end

end

function enemyCheckDeath(dt)

	for i,v in ipairs(remEnemy) do
		table.remove(enemies, v)
	end
end


function enemyDraw()
	for i,v in ipairs(enemies) do 
		love.graphics.draw(v.image, v.x, v.y)
	end
end
I'm probably really stupid right now but there is a problem in the enemyDraw function and i just can't figure out what it is.
User avatar
furi
Citizen
Posts: 73
Joined: Sat Feb 26, 2011 8:15 pm

Re: teaching friend problem

Post by furi »

Considering how you seem to show a lack of experience with this, I don't think it's advisable that you teach someone else about it until you learn some more.

Code: Select all

enemy.image=love.graphics.newImage("Images/enemy/enemy1.png")
You should make sure to use a console or something so you catch these errors next time.
coke905
Citizen
Posts: 52
Joined: Tue Jun 05, 2012 1:46 am

Re: teaching friend problem

Post by coke905 »

Lol I'm so sry , yeah we figured it out after awhile, and he'll be learning as well.

Now I have an honest question and I dont want u guys to just shout love2d. K ive been learning c# for long time now and id like to start using it with xna, basically what I'm asking is - is love2d better then c# and xna. By better I mean easier to use for collision imagery does it run better, will people have to have a certain program to run the games.
Wojak
Party member
Posts: 134
Joined: Tue Jan 24, 2012 7:15 pm

Re: teaching friend problem

Post by Wojak »

I've never used c#, but I can tell that lua has the best power/simple ratio from all of the scripting languages – you can write the code how ever you want and only Your imagination limits You.

If you distribute the game as .love file, the user will only need a love application compatible wit his OS, however it is possible to make a “stand-alone” version (https://love2d.org/wiki/Game_Distribution)
User avatar
Roland_Yonaba
Inner party member
Posts: 1563
Joined: Tue Jun 21, 2011 6:08 pm
Location: Ouagadougou (Burkina Faso)
Contact:

Re: teaching friend problem

Post by Roland_Yonaba »

coke905 wrote:Lol I'm so sry , yeah we figured it out after awhile, and he'll be learning as well.

Now I have an honest question and I dont want u guys to just shout love2d. K ive been learning c# for long time now and id like to start using it with xna, basically what I'm asking is - is love2d better then c# and xna. By better I mean easier to use for collision imagery does it run better, will people have to have a certain program to run the games.
Unless you're using a specific library , you will have to face the same logic, and handle collisions, animations all by yourself.
Hence I second Wojak, whether you work with C#, C/C++, Java or Lua, you will basically have to write the same lines.
Lua is easier. Plus, Lua fits for game engine development, that's enough to me ^^
coffee
Party member
Posts: 1206
Joined: Wed Nov 02, 2011 9:07 pm

Re: teaching friend problem

Post by coffee »

coke905 wrote:Now I have an honest question and I dont want u guys to just shout love2d. K ive been learning c# for long time now and id like to start using it with xna, basically what I'm asking is - is love2d better then c# and xna. By better I mean easier to use for collision imagery does it run better, will people have to have a certain program to run the games.
viewtopic.php?f=4&t=9346&p=58466#p58466
K honestly I'm just starting love and I find c++ and allegro incredibly easy. I'm able to create an animation within 5 minutes in c ++ and allegro.
http://www.byond.com/forum/?post=298716 ... ent1334409
Coke905 >> i know i know java i have already made a java game but i dont like java i'd rather do python or C++, and DM language is actually close to c++ accept the cin >> and cout <<
but its close.
A.T.H.K >> If you knew those languages you should be able to pick up DM without questions ...
DM is one of the easiest languages to learn ..
Same last quote/comment from the other forum/language still applies/translate here.
It's hard to understand your questions, hesitations and doubts if you know or worked with all that stuff. That would made you be able to pick up LOVE/Lua without many trouble and understand easily the benefits and disadvantages of each language.

Coding is like bicycle riding in different models. Some have different gears, other have cozy seats but essentially in all you will have to power the pedals. Without any effort you will not get anywhere. You can spent some time searching for bicycle that most suits you but really in all you have to power it. Maybe you don't need a bicycle but a motorcycle (like some full out-the-box point and click GUI game engine editor) where you don't have to pedal.
coke905
Citizen
Posts: 52
Joined: Tue Jun 05, 2012 1:46 am

Re: teaching friend problem

Post by coke905 »

I've tried c++ and allegro 4 it was my favorite combination. I enjoyed this and I cud create animations incredibly easier but now they have allegro 5 and I hate it, they make it so confusing. Allegro 4 is for C not c++ so I stopped. I like lua but what about c# and xna, like animations or making a camera ?
User avatar
tsturzl
Party member
Posts: 161
Joined: Fri Apr 08, 2011 3:24 am

Re: teaching friend problem

Post by tsturzl »

I'm pretty experienced in XNA. It, like love, is pretty structured, however Xna is more barebone. You have to implement everything from the ground up with xna. Its pretty complicated to get an image rotated or scaled, as you have to pass that to the spritebatch when you add sprites to it. It can get complicated and its really advised that you know OO VERY well before you try your hands at XNA. When I use XNA I make a sprite object that handles rotation, scaling, positioning, and so forth via functions, then I implement a init, update and draw method for the object. Also you have to consider C# is a strong typed language adding more difficulty, you have to define your variables before they can ever be used.

In love you can make a decent game using all procedural code. Love is definitely easier to use, its cross platform, and Lua is easier than C#. Love also has a wide variety of libraries you can use with it to simplify development.

I'd say overall you could probably get better performance with XNA and you'd be able to distribute on XBLA and w7p, however love is much easier and supports more platforms. Really I think you should start off learning love before you dive into XNA.
Post Reply

Who is online

Users browsing this forum: Bing [Bot], dusoft, Google [Bot] and 9 guests