simultaneous graphics in turing?
Author |
Message |
chopperdudes
|
Posted: Tue Nov 04, 2008 8:02 pm Post subject: simultaneous graphics in turing? |
|
|
I'm making a game right now, got the basics down, but want some fancier graphics. How can I possibly have simultaneous drawings?
I know.. it's not clear... so here's what I want to do...
the game itself is running in offscreenonly mode, and in this 2D semi-tile-based game, I have some teleports, which now are just purple squares. But now if i want to animate those teleport ports (ie. those spiral thing that spins), is it possible i can do that while the game is running? as if it's a process? (processes don't rly work cuz View.Update and cls messes everything up, and processes in turing are bleh...)
for example, Pic.DrawFramesBack will allow you to draw a gif or multiple frames while other graphics are running, however, this would not work in a offscreenonly situation. any inputs guys?
included is a sample of my game so far. there are no instructions in-game yet, and i commented out the basic "catch" procedure for testing purposes etc. run main.t
your objective is to get from where you are, to the door (you are the red square)
there might be keys (up to 9) needed to unlock the door, only 1 key will be shown at a time, and unless you got a previous key, you can't get the next key.
the purple places are teleports, if you enter one of them, you will randomly appear in another one.
the little yellow squares are timer bonuses.
the blue circles are missile bases, they shoot out missiles which allow perfect following (thx to a tutorial on this site) if you're in their line of sight, and unless that missile hits a wall and gets destroyed, the same missile base will not shoot out another one.
the grey circles are laser trackers, they track you and the timer starts going, if there's a wall between you and it, then it's timer resets.
the light green squares are basically wandering around, when it hits a wall, it will go in either direction.
the dark green squares are the smarter of the former, if you happen to pass by it's side, it will chase after you.
the practice is basically for you to draw your own map and practice, press Esc to quit the game or the practice.
as i've said, there's no real "catch" procedures yet, and my code might be abit messy, but it's rather systematic for me to make more types of enemies, etc.
if you have any suggestions as well, that is welcome.
EDIT: the maps are for testing purposes and are rather lame as of now.
Description: |
|
Download |
Filename: |
project.zip |
Filesize: |
10.86 MB |
Downloaded: |
92 Time(s) |
|
|
|
|
|
|
Sponsor Sponsor
|
|
|
Tony
|
Posted: Tue Nov 04, 2008 8:26 pm Post subject: RE:simultaneous graphics in turing? |
|
|
Simply update the step of any "animated" object, as you are assembling the current frame to be drawn.
That is, instead of "draw.teleport", you want something more like "draw.teleport(current_frame mod teleport_frame_count)".
|
Tony's programming blog. DWITE - a programming contest. |
|
|
|
|
chopperdudes
|
Posted: Tue Nov 04, 2008 8:33 pm Post subject: RE:simultaneous graphics in turing? |
|
|
hmmm so it seems like i would have to induce an global artificial frame counter, which adds 1 per frame (1 cycle of the main loop), and draw those graphics according to that frame counter?
and also along the same lines, Pic.DrawFrames(Back) and Pic.DrawSpecial(back) can't be used in an offscreenonly situation?
|
|
|
|
|
|
Tony
|
Posted: Tue Nov 04, 2008 9:12 pm Post subject: RE:simultaneous graphics in turing? |
|
|
Yes.
Another alternative is to let each animating object keep it's own internal counter.
I don't know how Pic.DrawFrames work, so I can't comment on that.
|
Tony's programming blog. DWITE - a programming contest. |
|
|
|
|
|
|