Lags in a game, Map stuff and others.....
Author |
Message |
SAValkyrie
|
Posted: Thu Jan 03, 2013 6:27 pm Post subject: Lags in a game, Map stuff and others..... |
|
|
What is it you are trying to achieve?
I am trying to make a bomberman game that has AI and a text based 2D map.
What is the problem you are having?
We are having an immense lag on our menu screen. You guys will know when you run our program. When you press settings or instructions button, the execution window just freezes and nothing happens. However, when you press exit button, turing unfreezes... This lag is pissing me off so much and I hope someone can give me help with this problem. Also, I am trying to do a text based 2D map, but I was unsuccessful in adding blocks that are breakable when it is inside a bomb radius. Also, I was hoping we could add AI to this game.
Describe what you have tried to solve this problem
For the lag problem, I tried simplifying the code as much as I could, but there was no difference. For the map, I have read some tutorials on text based maps, but I was unabled to find breakable blocks or something similar to it.
Please specify what version of Turing you are using
4.1.1v
Also our game is not close to being done yet.
Description: |
game with pics, musics etc |
|
Download |
Filename: |
Bomberman Game.7z |
Filesize: |
2.62 MB |
Downloaded: |
65 Time(s) |
|
|
|
|
|
|
Sponsor Sponsor
|
|
|
jr5000pwp
|
Posted: Thu Jan 03, 2013 6:42 pm Post subject: Re: Lags in a game, Map stuff and others..... |
|
|
You are using offscreenonly, do you know what that means and what you have to do to make it work?
To save you time, it means that anything you draw (Some exceptions may occur I think) will not show on the screen until you tell it to with View.Update.
So, with that information, when do you tell the game to update the screen? I see you have one before you clear the screen in your game loop, but where else might you need one?
Also, when fixing this problem, think about when you want to draw the stuff to the screen? It's not necessarily right before cls, although it almost always works out that way.
|
|
|
|
|
|
SAValkyrie
|
Posted: Thu Jan 03, 2013 7:02 pm Post subject: Re: Lags in a game, Map stuff and others..... |
|
|
Oh I see! That was a problem I was having. And to think I was using all of my time trying to figure out the lag problem.... -___-
Thanks so much! This has cleared my problem a lot. Thanks for helping
|
|
|
|
|
|
|
|