Please login or register.

Login with username, password and session length
Advanced search  

News:

This forum provides RSS feed. To query recent posts use this url. More...


Author Topic: How many ways are there to say I have a few questions??  (Read 6909 times)

0 Members and 1 Guest are viewing this topic.

organican

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 74
    • View Profile
How many ways are there to say I have a few questions??
« on: October 18, 2004, 04:27:46 AM »

Ok, question time again...!
(Number One gives you three points, two gives you 6, and three gives 5)

1. Quick one - icons.
2. Hard one  - game settings and registry paths
3. Slow it down, bro' - or the "why does all those one thousand windows inside one another slow down my game so much?"

1. Why can't you use icons in Win98. This sounds strange. Why? (why you can't use icons in WIN95/98/2000, that is, not why it sounds strange...)

(I happen to have Win98 myself)
So you mean that if I take my game to someone else's computer
and compiles the game there, it will work? And then the
icon will be visible on all computers, including Dos/Win3.x/Win95/98/2000/NT/XP/Linux and any other comput0rs, including my gameboy(!).
(just kidding... ;D)

Sorry, but the WME icon doesn't look too good in my eyes...
Though the engine roXx!!

2. Somehow it seems you can only choose your settings once per lifetime(!). Because when the registry settings is added to Windows... the settings window won't ever come back again.
Only when I removed the path in the windows registry it appeared once more, only to be gone again forever the next time I started the game.

(How often do you expect players to "hack" the windows registry?)

I then removed the registry path specification of my game inside WME.
Then it works with the settings every time with the compiled game... but... Now the settings is not saved any longer.

I'm not sure what I want really,
but what if a player selects the 16 bit option, and now the game looks bad, really bad.
Or they select the hardware acceleration enabled or disabled, and the game becomes too slow or ugly or whatever.
Then they can't change back. Ever.

3. I noticed my game runs somewhat slow on my computer (PII 350 mhz 64MB RAM, WinFast 3D S320 WINFAST ADAPTER)

Not a really big deal, just the cursor doesn't follow very smoothly.

I think it might have something to do with the fact that I have pretty many windows.

I have for example small windows, like small "scenes" that open sometimes when you look at something or do something, open a box and things like that. Originally I tried to load different windows for all the "small scenes", but the objects you took from them came back every time the window reloaded. I guess this can be corrected with variables, so the best solution might be to just load the windows one at a time instead of have all of them running, only invisible, like now.

You might think it's a miracle I can even run the game at all on my old and slow computer, but I don't have lots of animations, mostly static pictures in this first-person adventure of mine.

So one question is - does windows slow down things much even if they're invisible (that means that they're still active, so it probably is like that anyway)?

Nr 4: I fixed this one while I was offline.

5: Bonus question...
I have have a few variables I use in almost every script.
It definitely sounds easier, but what about memory and such...
I'm thinking about having them all in the base.inc file.
This doesn't take away much memory and power does it?
I mean, I'm reasoning like this - if you add a line to the base.inc it will be added to EVERY script that you're running. Am I right? Am I right? Simple mathematics on my part. I'm probably wrong. But still...

Sorry for all the long questions. Give and take, you know.
« Last Edit: October 18, 2004, 05:11:15 AM 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: How many ways are there to say I have a few questions??
« Reply #1 on: October 18, 2004, 07:16:19 AM »

1. Why can't you use icons in Win98. This sounds strange. Why? (why you can't use icons in WIN95/98/2000, that is, not why it sounds strange...)

Well, Windows has a functionality for changing the "resources", i.e. the data stored in an exe files, including icons. Unfortunately this functionality is unsupported on Win9x/Me. So, Microsoft is to blame, as usual ;)
But you can still change the icon using some external resource editing program, such as Resource Hacker (freeware) or Restorator (shareware).


So you mean that if I take my game to someone else's computer
and compiles the game there, it will work?

Yes, that would work. Not on Gameboy, though :)


2. Somehow it seems you can only choose your settings once per lifetime(!). Because when the registry settings is added to Windows... the settings window won't ever come back again.
Only when I removed the path in the windows registry it appeared once more, only to be gone again forever the next time I started the game.

Ok, the idea was, that once the player chooses the settings, the game will not bother them with the settings window anymore, unless the game crashes (=wrong settings).
You can make the settings window to re-appear if you call the game with a -detect command line parameter. Thats why I recommended creating a settings icon when installing the game. But since no one is listening to my recommendations :) the next WME build will include a small exe file called setup or settings or something, which will call the game with the -detect parameter. This program will be distributed with the game so that the player can change the setting later (and they DO want to change it later, you are right).



3. I noticed my game runs somewhat slow on my computer (PII 350 mhz 64MB RAM, WinFast 3D S320 WINFAST ADAPTER)

Not a really big deal, just the cursor doesn't follow very smoothly.

I think it might have something to do with the fact that I have pretty many windows.

Hmm, I don't think windows should slow the game down, expecially when they are invisible. What do the windows contain? Some specific scripts running in loops, something like that?


5: Bonus question...
I have have a few variables I use in almost every script.
It definitely sounds easier, but what about memory and such...
I'm thinking about having them all in the base.inc file.
This doesn't take away much memory and power does it?
I mean, I'm reasoning like this - if you add a line to the base.inc it will be added to EVERY script that you're running. Am I right? Am I right? Simple mathematics on my part. I'm probably wrong. But still...

It depends. If it's a global variable, it's shared amongst the scripts. If it's a local variable, it's indeed added to every script.
I wouldn't worry about the memory footprint though, unless it's an array with thousands of members :)
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: How many ways are there to say I have a few questions??
« Reply #2 on: October 18, 2004, 08:54:10 AM »

Does the detect parameter work nowadays even for games that are installed in a directory with spaces in the name?
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: How many ways are there to say I have a few questions??
« Reply #3 on: October 18, 2004, 09:10:18 AM »

Does the detect parameter work nowadays even for games that are installed in a directory with spaces in the name?

Yes, it does. The command line then looks like:

Code: [Select]
"C:\Program Files\My Cool Game\game.exe" -detect
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: How many ways are there to say I have a few questions??
« Reply #4 on: October 18, 2004, 06:08:20 PM »

Quote
You can make the settings window to re-appear if you call the game with a -detect command line parameter. Thats why I recommended creating a settings icon when installing the game. But since no one is listening to my recommendations Smiley the next WME build will include a small exe file called setup or settings or something, which will call the game with the -detect parameter.

Hey... my project's demo has such an icon  ;)
Logged
fl*p

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: How many ways are there to say I have a few questions??
« Reply #5 on: October 19, 2004, 06:51:32 AM »

Quote
You can make the settings window to re-appear if you call the game with a -detect command line parameter. Thats why I recommended creating a settings icon when installing the game. But since no one is listening to my recommendations Smiley the next WME build will include a small exe file called setup or settings or something, which will call the game with the -detect parameter.

Hey... my project's demo has such an icon  ;)

I mean "no one except odnorf" :)
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

Nihil

  • Supporter
  • Addicted to WME forum
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 528
  • Fear me! I'm evil!
    • View Profile
    • Order of Dagon
Re: How many ways are there to say I have a few questions??
« Reply #6 on: October 19, 2004, 07:32:32 AM »

Spalter!

 8)

organican

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 74
    • View Profile
Re: How many ways are there to say I have a few questions??
« Reply #7 on: October 19, 2004, 10:32:39 AM »

(As always Mnemonic has all the answers...)
 :D

I'm not sure what it is exactly, but I have alot of while(loops), that might be it.
I noticed that when a script error made the windows disappear,
it was so much smoother.

How many while loops can you have before it slows down really much?

I have lots of buttons and things that changes it's sprite when this value is either 0 or 1.
So they always check to see if they shound look like this or that.
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: How many ways are there to say I have a few questions??
« Reply #8 on: October 19, 2004, 10:36:46 AM »

How many while loops can you have before it slows down really much?

I have lots of buttons and things that changes it's sprite when this value is either 0 or 1.
So they always check to see if they shound look like this or that.

Could you post some code snippet? Perhaps there's some other way to do.
As for the loops, the key is to let them Sleep() as much as possible, so that they let the engine do other tasks. In other words, it's not about the number of the loops, but about the number of *active* loops at one moment.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

Jerrot

  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 690
    • View Profile
Re: How many ways are there to say I have a few questions??
« Reply #9 on: October 19, 2004, 11:49:45 AM »

Another aspect you will aready know though, but anyway ;) :
especially when it comes to buttons etc. you should try to replace loops by events. Which means - check if you really need to check something all the time again and again - or if the object could report by itself, that something happened, e.g. you clicked it. You might also explicitly call the exchange of the sprites at that very moment when your value changed - instead of the reverse way of checking all the time, if your value changed.

(And as Mnemonic already said - a little code excerpt would be fine to be of better help :) !)
Logged
Mooh!

organican

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 74
    • View Profile
Re: How many ways are there to say I have a few questions??
« Reply #10 on: October 21, 2004, 04:09:27 AM »

It's so much smoother now.

I had while loops that constanly made the inventory visible or invisible
and selected which inventory that would be active
and also where it would be placed on the screen.
So no wonder it was so bad.

Now it's so much smoother even with winamp and some other things running.

So what I did was I changed the scripts so that
if(this==1) { this=10; Game.InventoryVisible=false; [some other code...]; }
so now it will only do that once.
and then if (this==10) { this=20; Game.InventoryVisible=true; }
etc.

It's not perfect yet but much better.
« Last Edit: October 21, 2004, 04:11:49 AM by organican »
Logged
 

Page created in 0.056 seconds with 22 queries.