• Gwilty's Programming Assignments #2
    191 replies, posted
[QUOTE=slime73;33126203]I am not sure how love.timer.getFPS() will lower your framerate, literally the only thing it does is return the fps variable, which is recorded regardless of whether getFPS is called or not.[/QUOTE] Try it yourself, it's kinda hard to argue with the results.
[QUOTE=amcfaggot;33125415]From what I found, using love.timer.getFPS() vs math.floor( 1/dt + 0.5 ) results in about a 300 frame difference for me. Then again that's only from 700 to 1000, so idk, it's not a big deal, I don't think. They do explicitly state using getFPS() drops your fps, though, from what I recall. [editline]4th November 2011[/editline] Yep: [url]http://love2d.org/wiki/love.timer.getFPS[/url][/QUOTE] That's outdated. I asked someone if it was still true and they were all like "nope" and then I asked them to change the wiki page and they were all like "lol maybe later". True story.
I'm still 110% confused as to why I was getting higher FPS by not using it.
[QUOTE=amcfaggot;33127209]I'm still 110% confused as to why I was getting higher FPS by not using it.[/QUOTE] Your math is wrong?
[QUOTE=Deco Da Man;33131114]Your math is wrong?[/QUOTE] That's what I figured a while back, but I checked and it wasn't
[QUOTE=amcfaggot;33136930]That's what I figured a while back, but I checked and it wasn't[/QUOTE] Try using yours and theirs at the same time; they should be exactly the same.
Garry it seems like you are starting out too hard.
There's plenty of information out there to help you, it seems hard but once you do it you will realize it's not.
[QUOTE=garry;33147903]There's plenty of information out there to help you, it seems hard but once you do it you will realize it's not.[/QUOTE] it took me ages to figure out how to get the ball to move on the first one let alone get it to bounce of the walls :v: but now I feel pretty confident with tables and stuff, how is Gwilty getting on with this one?
The thing is once you do it you feel that awesome about doing it - that's what drives you on to the next challenge. Gwilty is struggling because the concept of object orientation is something he has never come across before.
[QUOTE=garry;33149274]Gwilty is struggling because the concept of object orientation is something he has never come across before.[/QUOTE] Wow. I don't see object orientation as hard at all. In fact, I struggle to see how it is. It's amazing how stuff like that (pointers, OO, etc) can seem so simple to us programmers.
I can't seem to get love.audio's sound:setVolume() to work - The global love.audio.setVolume() seems to work fine but the per-sound volume doesn't seem to do anything. I've tried it with both "steam" and "static" sounds - All of my sounds are .ogg files. Any ideas ? [b]Edit:[/b] I'm an idiot - I forgot to pass the volume and pitch from my sound manager play() call to the sound's play() call. :c
I feel like object orientation is a bit more difficult to understand in LUA than say C#, because lua doesnt have actual objects.
Garry is there any way I can get help with making the fireworks explode? It seems to be the hardest part of this assignment..
When they explode create a load of particles. Give them velocity.
I love accidentally making awesome things. [video=youtube;Ahlg-XO2HYo]http://www.youtube.com/watch?v=Ahlg-XO2HYo[/video]
[QUOTE=zzaacckk;33147522]Garry it seems like you are starting out too hard.[/QUOTE] I think it's better to throw something a little more difficult at the newbies. One of the most valuable, no, THE most valuable skill you can have as a programmer is the ability to be resourceful and find information about your current subject of interest, having everything hand fed to you seriously hinders your ability to program in my opinion.
Different fireworks and such. Some of them don't make sense but they look cool. [video=youtube;DXYXB5gmnR8]http://www.youtube.com/watch?v=DXYXB5gmnR8[/video] Took me way to long to get the firework to travel to the mouse. Heres the source for anyone that cares: [url]http://pastebin.com/QpJWeCmv[/url]
you need to cull your particles sooner or make their colour fade out or something, they look good though
I know Im late, but gave it a shot: [video=youtube;drK6JrGOzg4]http://www.youtube.com/watch?v=drK6JrGOzg4&feature=youtu.be[/video] Uses C# and GDI+, 100ms* physics time. Only 1 particle effect so far. Particles have gravity though. edit:100ms can be edited down to <20ms on my PC, no lag, but the physics rates need to be readjusted. Ill try making more explosion effects tomorrow (spirals, boxes etc) Make more of these assignments, they push me to get off from playing games and program!
[QUOTE=Zard;33197017]you need to cull your particles sooner or make their colour fade out or something, they look good though[/QUOTE] I just made them fade. And I was going to post a video, but when recording with fraps they dont fade... Would anyone know why? All I do is change the alpha value for the color the particle is drawn with. Edit: Apparently recording with fraps makes the particles not have gravity either. I'm so lost right now.
It's the last day so here's mine - I didn't have time to finish all the extra stuff which I had time but it has all of the requirements. (Although think() has been renamed to update() !) [url=http://yngndrw.hostilezone.net/uploads/Hostile%20Fireworks.love].Love file[/url] [url=http://yngndrw.hostilezone.net/uploads/Hostile%20Firworks%20Package.zip]Packaged .exe with required dlls[/url] I am quite happy with the "art style", especially seems as the only external media which I have used are the sounds. (Thanks to [b]Jimbomcb[/b] for the sounds.)
Here's mine [url]http://dl.dropbox.com/u/99606/assignments.love[/url] It has both assignments together (since I sorta missed the deadline on #1), and the game features a menu to choose between them. Looking forward to expanding my engine for #3, and looking forward to using box2d. Static AABB vs AABB intersection testing doesn't work quite well with a moving ball and paddle, and sweep testing may as well just be replaced with a proper physics engine.
Might as well post mine: [url]https://bitbucket.org/pollyzoid/fireworks/downloads/fireworks.love[/url] I didn't get to finish it, since I suddenly got some motivation on my other projects. Still, it's a neat toy and a stub of an engine. It can't handle very many fireworks, a single one brings the particle count up to 500 for some seconds.
I want to use [URL="http://luaforge.net/projects/luazip/"]LuaZip[/URL] with Love. Ive put the .dll in Program Files/Love, but when I require it in my project, Im getting an error that it cant find lua5.1.dll. Any ideas? Or is there any other way/lib to read/extract .zip files?
oh god wrong thread sorry
By the way, when is the next assignment coming?
It looks like the LuaZip DLL is dependent on lua5.1.dll. If you want LuaZip to work, you need to get a lua5.1.dll for Lua 5.1.4 in the same folder as the LuaZip DLL. Love statically compiles Lua as far as I know. That means the Love EXE file contains Lua and Love doesn't need a Lua DLL for it's usage of Lua; thus, Love does not come with the desired DLL. The Lua web site has the desired DLL if I recall right. They're called binary versions of Lua there. If you can't get the DLL from somewhere, it can be obtained by compiling Lua 5.1.4 source code into a dynamic library. [b]Edit:[/b] LuaZip is from 2007. It may not work with the current version of Lua. I bet it will though.
[QUOTE=WiZzArD;33219002]It looks like the LuaZip DLL is dependent on lua5.1.dll. If you want LuaZip to work, you need to get a lua5.1.dll for Lua 5.1.4 in the same folder as the LuaZip DLL. Love statically compiles Lua as far as I know. That means the Love EXE file contains Lua and Love doesn't need a Lua DLL for it's usage of Lua; thus, Love does not come with the desired DLL. The Lua web site has the desired DLL if I recall right. They're called binary versions of Lua there. If you can't get the DLL from somewhere, it can be obtained by compiling Lua 5.1.4 source code into a dynamic library. [b]Edit:[/b] LuaZip is from 2007. It may not work with the current version of Lua. I bet it will though.[/QUOTE] Ive tried that too, but I still got an error: %1 is not a valid Win32 application. Maybe Ive got the [URL="http://switch.dl.sourceforge.net/project/luabinaries/5.1.4/Windows%20Libraries/lua-5.1.4_Win64_dll10_lib.zip"]wrong Lua dll[/URL]?
Maybe some people besides Gwilty would like their submissions graded? Perhaps we should get some volunteers for next time.
Sorry, you need to Log In to post a reply to this thread.