Please login or register.

Login with username, password and session length
Advanced search  

News:

Latest WME version: WME 1.9.1 (January 1st, 2010) - download

Author Topic: A few questions  (Read 4633 times)

0 Members and 1 Guest are viewing this topic.

organican

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 74
    • View Profile
A few questions
« on: October 12, 2004, 09:09:35 PM »

OK. First of all.
I have some graphical effects, invisibility and such,
that I use a few times in my game.
But what I'm thinking of is, if there is a way for the code to
recognize if the player has the hardware acceleration activated or not,
and then I give an alternate graphical solution if it's not enabled.
This would be good for greatness on both modes.
Ok, I know, in some cases it would be almost twice the size of work,
and maybe you'll abandon the non-accelerated mode sometime in the near future, but it would be kind of nice.

Second of all. Is there a way to have both a 'on "LeftClick"' and a "while(true)" in the same script?? I'm attaching scripts, and it works great, but I have so many. I mean, I have a lot of objects where you can leftclick, and at the same time it has to see if a certain variable is something, and then it changes sprite or becomes invisible etc. It's not that I can't handle all the scripts, It's just that it seems so unnecessary to have to scripts for alot of objects.
Blablabla... AND: does two scripts of 2 kb take up more memory (ram or whatever) than one 4 kb script? How many scripts can you have running at the same time? Last I checked I had 60 of them.

Third of all. I had this bmp picture. Then I changed it to a jpg with  compression 6 in photoshop (for the people who knows). Then I recompiled the game. And guess what?... The game files is now over 400 (count em') kb smaller. The pic is about 37 kb in jpg. So sometimes it might be great to choose another file format. Other pictures made the game smaller in bmp format. So there doesn't seem to be a universal great one, but they're better at different things. Less detailed pics with fewer colors were smaller in bmp. And jpg is better at detailed backgrounds and stuff. So it might be a good idea to check out ones graphix as "any kb saved is a good kb".
« Last Edit: October 12, 2004, 09:27:26 PM by organican »
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: A few questions
« Reply #1 on: October 12, 2004, 09:42:16 PM »

Quote
But what I'm thinking of is, if there is a way for the code to
recognize if the player has the hardware acceleration activated or not,
I'd *swear* there was an attribute for that, but it doesn't seem to be the case :-[ I'll add it.


Quote
Second of all. Is there a way to have both a 'on "LeftClick"' and a "while(true)" in the same script??
Unfortunately not, it's a known limitation. But I'll see if I can change it somehow. You are right it's becoming annoying if there are many parallel "processes" you need to run simutaneously.


Quote
AND: does two scripts of 2 kb take up more memory (ram or whatever) than one 4 kb script? How many scripts can you have running at the same time? Last I checked I had 60 of them.
There shouldn't be a very big difference between one large or two smaller scripts. As for the number of scripts, as long as the scripts are sleeping, it should be ok for large quantities of them. "Five magical amulets" now has like 120 scripts running without any noticeable performance hit, since 99% of them is sleeping all the time (inventory items).


btw I'm sorry I'm currently in the "promise-only" mode, but I need to finish this big functionality I started (the 3D characters) then I'll be back at reducing the growing ToDo list :)
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

deadworm222

  • Regular poster
  • ***
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 197
  • Wintermute Army
    • View Profile
Re: A few questions
« Reply #2 on: October 13, 2004, 05:49:22 AM »

Would it also be possible to add the option that you could only run the game in 32-bit 3D accelerated mode? Curves is going to make extensive use of sprites with an alpha channel, so unless we want to make it clear that the user MUST use 3D accelration & 32-bit colors. Otherrwise the results would be ugly.
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: A few questions
« Reply #3 on: October 13, 2004, 07:48:27 AM »

Would it also be possible to add the option that you could only run the game in 32-bit 3D accelerated mode? Curves is going to make extensive use of sprites with an alpha channel, so unless we want to make it clear that the user MUST use 3D accelration & 32-bit colors. Otherrwise the results would be ugly.
You can setup the game to require 3D acceleration, but I don't think running the game in 16-bit colors should affect the alpha channel...? Using 16-bit textures is a different story, but that's just a troubleshooting option.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

odnorf

  • w00t?
  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 7
  • Offline Offline
  • Gender: Male
  • Posts: 1456
  • Lamp dog!
    • View Profile
Re: A few questions
« Reply #4 on: October 13, 2004, 08:05:15 AM »

You can setup the game to require 3D acceleration, but I don't think running the game in 16-bit colors should affect the alpha channel...? Using 16-bit textures is a different story, but that's just a troubleshooting option.

In dREams I had a problem in the scrolling scene if I ran the game in 16bit colors. Alpha channels were actually missing. This was happening in an old Intel chipset.
Logged
fl*p

deadworm222

  • Regular poster
  • ***
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 197
  • Wintermute Army
    • View Profile
Re: A few questions
« Reply #5 on: October 16, 2004, 12:02:06 PM »

Would it also be possible to add the option that you could only run the game in 32-bit 3D accelerated mode? Curves is going to make extensive use of sprites with an alpha channel, so unless we want to make it clear that the user MUST use 3D accelration & 32-bit colors. Otherrwise the results would be ugly.
You can setup the game to require 3D acceleration, but I don't think running the game in 16-bit colors should affect the alpha channel...? Using 16-bit textures is a different story, but that's just a troubleshooting option.

Ahh, OK. I never knew... So alpha does work with 16-biit colors...
Logged
 

Page created in 0.043 seconds with 24 queries.