vbGore Free Online RPG Engine

Revolutionizing Visual Basic ORPG Development
It is currently Tue May 21, 2013 2:08 am

All times are UTC - 8 hours




Post new topic Reply to topic  [ 16 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Dynamic lighting problem...
PostPosted: Fri Dec 07, 2007 2:18 pm 
Fresh Meat

Joined: Tue Oct 16, 2007 2:07 pm
Posts: 24
well my problem is that when I enter my game, there is always a light but it follows my mouse!! and I get 6 fps with that

I only want it to appear sometimes, when I cast a spell or use an item!


thanks in advance
:rofl:


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 07, 2007 3:40 pm 
+3 Gloves of Agility

Joined: Tue Sep 25, 2007 1:42 pm
Posts: 152
I'll take a look into it it just could be you put something in the wrong spot...


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 07, 2007 3:46 pm 
Fresh Meat

Joined: Tue Oct 16, 2007 2:07 pm
Posts: 24
:S ok thanks


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 07, 2007 4:20 pm 
Bytewise Operator

Joined: Sat Oct 27, 2007 5:17 am
Posts: 139
nope, that's how its supposed to work...you have to edit the rest yourself to make it turn on based on items, etc. also the fps drop can't really be avoided, all I can suggest is making your maps smaller (100x100 got rid of the problem for me)


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 07, 2007 4:40 pm 
Site Admin

Joined: Fri Jul 14, 2006 4:00 pm
Posts: 11230
Location: Washington
theninjamaster wrote:
also the fps drop can't really be avoided


It actually can be optimized quite a lot (such as only updating the light if it moves a few pixels instead of every frame) but none of that is covered by the guide.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 07, 2007 4:54 pm 
Fresh Meat

Joined: Tue Oct 16, 2007 2:07 pm
Posts: 24
oh great Spodi (xD) will u tell us how to do that one day?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 07, 2007 5:33 pm 
Bytewise Operator

Joined: Sat Oct 27, 2007 5:17 am
Posts: 139
when I tried that it just gave me a monstrous lag whenever I moved the mouse, which made the game feel even worse because the speed was always changing from lag city to normal.

but then again there are probably much better ways of coding it than what I did, but without any guides Vicho is in the same boat as me. the game was at 1 or 3 fps on a map of 250x250 for me, but when I changed to 100x100 the fps went back up to over 30. of course it's not as good as optimizing the code, but if I can run the server and client at 30 fps on a 7 year old laptop, it should be good enough to get anybodies fps at a reasonable level.

out of curiosity what computer and what map size are you using? im still concerned that some players will take big hits to their game speed, if they somehow have older computers than the one I'm testing on.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 07, 2007 6:36 pm 
Site Admin

Joined: Fri Jul 14, 2006 4:00 pm
Posts: 11230
Location: Washington
One thing that has been mentioned is to just update the tiles in the screen. This will help a lot and works fine if you're updating every frame like the guide does by default. There has been a bit of discussion about this on some other post. I think it may be this one:

viewtopic.php?t=5462&highlight=light+slow


Top
 Profile  
 
 Post subject:
PostPosted: Sat Dec 08, 2007 1:19 am 
Bytewise Operator

Joined: Sat Oct 27, 2007 5:17 am
Posts: 139
haha yeah that's the one where I kept asking for help. it does help the fps, I forgot that part, but you'll want to do it the way spodi suggests on the topic, not the other way suggested. otherwise you get an error whenever your light nears the edge of the map.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Dec 08, 2007 4:06 am 
Site Admin

Joined: Fri Jul 14, 2006 4:00 pm
Posts: 11230
Location: Washington
If someone is willing to decipher my works, maybe I'll bust out ol' VB for the first time in a few weeks and see if I can't optimize it myself. I will, of course, add tags to where I changed things outside of the original tutorial. I'd just need someone to write a guide out of it.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Dec 08, 2007 6:51 am 
+3 Gloves of Agility

Joined: Tue Sep 25, 2007 1:42 pm
Posts: 152
I'll take a look im not going to gurantee anything tho. I'm going to be taking a look at that current code when i get home from work


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 19, 2007 4:38 pm 
+3 Gloves of Agility

Joined: Tue Sep 25, 2007 1:42 pm
Posts: 152
hey spodi... u do it and i will write the guide for it i decipher your class changing i can prolly do this as well.

sry for the double post.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 19, 2007 5:00 pm 
Site Admin

Joined: Fri Jul 14, 2006 4:00 pm
Posts: 11230
Location: Washington
Totally forgot about this. ;) When I have the time, I'll give it an attempt. Though, a bit busy right now with my other project. :)


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 19, 2007 7:18 pm 
+3 Gloves of Agility

Joined: Tue Sep 25, 2007 1:42 pm
Posts: 152
alright let me know when you go to do it


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 18, 2008 7:19 am 
Aleron Coder

Joined: Fri Jan 05, 2007 5:36 am
Posts: 2964
Location: Germany
that dynamic lighting is supposed to be a small help for people who want it.
I'm very very pleased with that guide, and will be heavily changing it.
but the basics come from the guide, and thats what its for

of course theres a LONG way to light FX as in diablo and shooting 20 fireballs over the screen illuminating a dark cave


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 16 posts ]  Go to page 1, 2  Next

All times are UTC - 8 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group