Posted By
|
Message
|
DEC Stuff
Registered 07/07/2003
Points 1348
|
22nd July, 2003 at 17:32:07 -
I am currently making a very good arcade building game. It's going very well, but there are still a few problems. If anyone knows what to do please PM me or reply here!
Problem the first: The game runs slow after a certain while. These are somewhat big objects, some with animations. HOwever, what is the best way to make it run really fast(should I use VRAM, Direct X, ect?) Also, I could clean up the "code" perhaps to make it run faster. But how, what to change? I was wondering if the ALWAYS command slowed things down a bit especially when checking for something.
2.)After you buy several objects and you try to buy some floor tiles you run into problems. I have MMF Create a backdrop object and paste the image in the background just in case. However, it doesn't show up unless you scroll away, and then come back. Is there a way I can force MMF to refresh when you place tles?
3.)When you build an object you select it's position with the cursor, which uses the iso object. Anyways, I want to make it so you cannot place objects over positions in the grid where objects already are! I have 2 options, either of which would work(but I just can't figure out how to do it.) I want to make it so that when you are building an object, and you go over an object it turns red, or so that it cannot go over a pre-exisiting object and just appears on the other side or something. Basically, what I really need to know though, is how to make it detect that theres already an object there! The problem is all the arcade objects are under group apple, and the only difference is in some values. Any ideas?
4.)This is the smallest problem, but I can't solve it. I want to make it so that when a number=0 it displays 2 zeros. Like you would see in a price. Such as $9.00. This is kinda crucial because everyone uses quarters in the arcade...and theres a lot of instances in which the amount of money you have will be X.00. And not X.0. I want to make it show 2 zeros!
Ok, those are the hardest problems so far. Luckily, I have been able to topple some of the harder ones(or so it seems)
http://www.decstuff.net
|
Assault Andy Administrator
I make other people create vaporware
Registered 29/07/2002
Points 5686
|
23rd July, 2003 at 01:43:28 -
1) If your game involves scrolling that runs bad on slow comps unless you are using 256 colour mode. And using large active objects is highly non-reccomended it's the biggest waste of memory. Cleaning up your code won't do much at all.
2)Not 100% of your prob, we might need a better example. But for a refresh try looking around for an auto-redraw somewhere or in an extension/dll.
3)An Array would be a great idea, then if there isn't an object there you can place one. But it depends if your mouse snaps to the iso grid, if it does, just make it so if the mouse is overlapping a building and you click, dissallow build.
4)Well, in C++ you can use some library that changes the number of digits. But lets see, there are a few ways to do that. A ~ Make a counter for the 10's and a counter for the 1 cents, that might be a little hard though for adding. B ~ If none of your objects have a cost of there last digit (singular cents ~ 1-9) being diffeant to 0. Then you can use a string object to display your money, and add a "0" to the end of your cash. EG:
Always set money.text ~ str$("cash.value") + "0"
-Andy
Creator of Faerie Solitaire:
http://www.create-games.com/download.asp?id=7792
Also creator of ZDay20 and Dungeon Dash.
http://www.Jigxor.com
http://twitter.com/JigxorAndy
|
Cybermaze
Registered 03/04/2003
Points 853
|
23rd July, 2003 at 02:22:32 -
1. Always use DirectX. This is the fastest way to show 2D and 3D graphics on a Windows computer. VRAM ... Im not certain what it does excactly. Try running with and without to see if theres any noticeable difference. If you use resize then that will take some cpu power too. But that should not be necessary with MMF, simply make your game change resolution instead of resize (better and faster). Also keep the number of active objects down (as few as possible on the screen at a given time), and make them as small as possible. If you choose a lower resolution for your game that will make it faster. Scrooling is not good in high resolutions.
2. Strange. This could be a MMF bug. As Assault Andy says try an extension or visit Click Teams site to see if they know something.
3. NA
4. Assault Andy solved it.
If you knew, I would have to kill you...
|
Pete Nattress Cheesy Bits img src/uploads/sccheesegif
Registered 23/09/2002
Points 4811
|
23rd July, 2003 at 05:45:47 -
VRAM enables video card RAM to be used by the game. someone did an article about directx, vram, etc, a while back, may be worth a search in the articles section.
www.thenatflap.co.uk
|
Activ8games
Registered 02/07/2003
Points 463
|
23rd July, 2003 at 07:29:12 -
I would definately use directX and VRAM to make it faster. It's true that large objects can slow things down. Also, the ALWAYS condition is not the geatest for checking things, fast loops are much faster. You can get the fast loop object, or if you have MMF 1.5 the fast loops are built into the special object.
To restrict building if it is on top of another object, you can use an array. You will need to give each TYPE of object a number. When an object is created, find the right cell in the array and fill it with that number.
To restrict building, check to find what cell the cursor is over, and if the value in that cell is <> 0, changer the animation to red.
Some final tips are not to use high res color modes. Also, if you use the option change resolution mode in the window properties of the game, it might also help. If none of this helps, try the task priority object. It can be used to divert all system resources to your game.
Vote Quimby!!!
|
DEC Stuff
Registered 07/07/2003
Points 1348
|
23rd July, 2003 at 09:48:01 -
Thx for all the help. I took off VRAM and it runs much faster. The objects are kinda large, but....since your building an arcade...your not building a TON of stuff. SO it runs pretty good that way.
http://www.decstuff.net
|
|
|