Make Turing Faster With Pic!
Author |
Message |
TokenHerbz
|
Posted: Mon Oct 24, 2005 11:25 am Post subject: Make Turing Faster With Pic! |
|
|
so here i am, making a TRS Game..
I tryed various map making ways, and all of the LAG..
I mean its SOOOOO SLOW!
is there a picture format that used less resourses??
i need help speeding up turing, im on 233mhz.. |
|
|
|
|
|
Sponsor Sponsor
|
|
|
Tony
|
Posted: Mon Oct 24, 2005 12:06 pm Post subject: (No subject) |
|
|
turing is inheritanly slow. coupled with slow processing speed and a graphics heavy application... well ouch.
If the only thing you have control over is your code, than you'd just have to figure out a way to load/draw less graphics. View.UpdateArea will be your bestest friend
what's a TRS? |
|
|
|
|
|
jamonathin
|
Posted: Mon Oct 24, 2005 12:07 pm Post subject: (No subject) |
|
|
The only thing you can do is use Pic.Draw rather than Pic.ScreenLoad and make shure your not drawing pictures that aren't being seen anyways. |
|
|
|
|
|
TokenHerbz
|
Posted: Mon Oct 24, 2005 1:12 pm Post subject: (No subject) |
|
|
um heres my code so far...
----------
code: |
%%Ant Game
setscreen ("Graphics:max;max,offscreenonly")
%%variables
var infobar_size: int := 20 %%The infobarsize
var map: int := Pic.FileNew ("Pics/map.bmp") %%Gets the map picture
map := Pic.Scale (map,maxx,maxy-infobar_size) %%Sizes the map
var nestx, nesty: int %%Nest chords
var food, pop: int %%Info for ants
var mx, my, mb: int %%Mouse variables
%%procedures
proc draw_map %%Draws the map
Pic.Draw(map,0,0,picCopy)
drawbox(0,0,maxx,maxy-infobar_size,black) %%Border around the map
end draw_map
proc draw_nest %%Draws the nest
drawfilloval(nestx,nesty,20,20,gray)
end draw_nest
%%little Intro
loop
Mouse.Where(mx,my,mb)
cls
put "Click on the grass to place your nest, somewhere either in the top or bottom parts."
nestx:= mx %%Sets the nest cords to where the mouse is
nesty:= my
draw_map
draw_nest
if mb = 1 then %%if you click then
if my <= 130 and my > 10 or my <= maxy - (infobar_size+10) and my > 530 then %%if your in the right parts
exit %%your done
else %%else it shows you where to put your nest
cls
draw_map
for i: 1 .. 5
drawbox(10+i,10+i,maxx-(10+i),130-i,brightred)
drawbox(10+i,530+i,maxx-(10+i),maxy-((infobar_size+10)+i),brightred)
end for
put "Please select a place either on the top or bottom part."
View.Update
Input.Pause
end if
end if
View.Update
end loop
%%main program
loop
Mouse.Where(mx,my,mb)
cls
draw_map
draw_nest
put mx, " ", my
View.Update
end loop
|
I plan on having much more grahpics, but bah, its so slow with one pic:S
Um, nothings being drawn outside the screen...
Also TRS ment to be, RTS = "Real Time Stratagy" Game.
And what is the View.UpdateArea do, hows it work??
i also heard to use Xor? Any more ideas? im using .bmp which are like 3mb's big, how do i save quality pics in a dif format? whats a good format to use? etc:: |
|
|
|
|
|
beard0
|
Posted: Mon Oct 24, 2005 1:43 pm Post subject: (No subject) |
|
|
tokenherbz wrote: And what is the View.UpdateArea do, hows it work??
Again, use the manual, just type it in, and press F9. |
|
|
|
|
|
[Gandalf]
|
Posted: Mon Oct 24, 2005 2:42 pm Post subject: (No subject) |
|
|
Save the file as a jpg, but you will loose a lot of the colour manipulation that is possible with bmps.
Sorry, but you are going to have to use something other than Turing to solve your problem. Watch your requirements rise to 2Ghz in the blink of an eye.
If you wish to continue with Turing, do not expect to make games, or basically any other graphical thing (limit is, say, a snake game? maybe a bit more, but not much). |
|
|
|
|
|
TokenHerbz
|
Posted: Mon Oct 24, 2005 2:52 pm Post subject: (No subject) |
|
|
i then shall learn java, wheres the DL which dosn't REqUIRE a COMPILER!
Blast i hate those so much, i want the thing i had in school :S |
|
|
|
|
|
[Gandalf]
|
Posted: Mon Oct 24, 2005 3:00 pm Post subject: (No subject) |
|
|
Ok, so you don't want a tool required for any kind of programming that you want. Doesn't make much sense, does it? There is a solution to this problem, learn a language that has an interactive interpreter, otherwise in most situations, you need a compiler. You also want crap (RTP). That's not good either. Sorry, but there are no "easy" ways through this, but there are many benefits .
I suggest you stop looking for all the superficial things, and try to learn how everything works, how it all goes together. Compilers, editors, programming terms, all that kind of stuff - it makes it easier once you know it. |
|
|
|
|
|
Sponsor Sponsor
|
|
|
codemage
|
Posted: Wed Oct 26, 2005 11:09 am Post subject: (No subject) |
|
|
You have 3 view.updates - you should optimally only have 1. |
|
|
|
|
|
TokenHerbz
|
Posted: Wed Oct 26, 2005 1:27 pm Post subject: (No subject) |
|
|
yeah Cervantes fixed the problem though...
turns out i just needed ""delay(20)""
lol, the small things BAH! O wells..
thanks for the suggestions and effot to help though. |
|
|
|
|
|
|
|