you may need to know how to import unit files to get it working. If you guys rember what Sprites where u may find this cool. For thous who do not, they are like pics but when u move them they dont deleleat the backgorup so it makes animation easer and better b/c you dont have to redraw the back gorund every few seconds.
I got a doc on there on how to uses them to so that may help explaine it a bit.
Computer Science CanadaHelp with programming in C, C++, Java, PHP, Ruby, Turing, VB and more!
Sponsor Sponsor
Dan
Posted: Sat Mar 06, 2004 7:05 pm Post subject: (No subject)
for i : 1 .. maxx by 5
Draw.Line (i, 0, i, maxy, 3)
end for
for ii : 1 .. maxy by 5
Draw.Line (maxx, ii, 0, ii, 4)
end for
for iii : 1 .. maxcolor
Draw.FillOval (maxx div 2, maxy div 2, maxcolor - iii, maxcolor - iii, iii)
end for
procedure flush
var ch : string (1)
loop
exit when not hasch
getch (ch)
end loop
end flush
var chars : array char of boolean
var x, y := 1
var pic : int := DanSprite.newPic (1, 1, "pic.jpg")
DanSprite.setMode(pic,DanSprite.MERGE)
loop
if Input.hasch then
Input.KeyDown (chars)
if chars (KEY_UP_ARROW) then
y += 10
end if
if chars (KEY_RIGHT_ARROW) then
x += 10
end if
if chars (KEY_LEFT_ARROW) then
x -= 10
end if
if chars (KEY_DOWN_ARROW) then
y -= 10
end if
DanSprite.movePic (x, y, pic)
View.Update
flush ()
end if
end loop
Computer Science CanadaHelp with programming in C, C++, Java, PHP, Ruby, Turing, VB and more!
recneps
Posted: Sat Mar 06, 2004 8:49 pm Post subject: (No subject)
Nice Dan, you should submit that to Holtsoft! haha. If you werent admin/mod id give you ALL ME BITS!
Omicron91
Posted: Mon Dec 20, 2004 5:55 pm Post subject: (No subject)
Dan, can I have your children? Well, technically not, but if I were a woman I'd be all over you. DanSprite saved my RPG !
Bacchus
Posted: Sun Feb 06, 2005 12:54 am Post subject: (No subject)
nice work, but i found a bug easy to fix thoug. in chagePic (i love the name too ) it has an error, you just forgot to put in the picture id (only inputs the number
code:
procedure chagePic (x : int, y : int, fileName : string, picID : int)
assert picID > 0 and picID <= num %if u get error: bad pic id
Pic.Draw (temp (picID), oldx (picID), oldy (picID), picCopy)
Pic.Free (pic(picID)) %<-- was originally just Pic.Free(picID)
blaster0
Posted: Sun Jun 26, 2005 10:07 pm Post subject: Sprites
I'm sorry for sounding so ignorant but is there a away to very easily using commands such as sprite.new and sprite.animate make a working sprite. And if so can you explain my turing help isn't doing to much for me.
Cervantes
Posted: Mon Jun 27, 2005 7:44 am Post subject: (No subject)
The sprite commands in Turing 4.x have been disabled. Are you asking for help as to how to use them, or how to use DanSprite? Also, Bacchus made a BacchusSprite that you may wish to check out as well.
Spartan_117
Posted: Tue Jul 19, 2005 11:32 am Post subject: (No subject)
Arent sprites moving images? like for example a walking mario? those are gifs tho, how do u import thos when Turing doesnt allow that.
Sponsor Sponsor
MysticVegeta
Posted: Tue Jul 19, 2005 12:21 pm Post subject: (No subject)
why do you think he made it then lol
Spartan_117
Posted: Tue Jul 19, 2005 5:37 pm Post subject: (No subject)
but in his example we only import one picture.... i kinda forgot turing so maybe im missing something,
[Gandalf]
Posted: Tue Jul 19, 2005 6:16 pm Post subject: (No subject)
Yes, but the point is that he takes that picture and animate it using Turing. A .gif is already pre-animated, and you need some program to edit it. Using this you can animate it however you want in Turing, and use it in either a game or animation or whatever you can think of.
Delos
Posted: Tue Jul 19, 2005 8:06 pm Post subject: (No subject)
Generally speaking, .gifs are indeed a series of single-frame pictures put together in a format that displays them alternatively with a certain, set delay between each picture. For instance, my avatar is actually a large picture spliced up and turned into a .gif using 3 frames.
Hence, having only one picture imported by the module is not a problem, as you would be able to import a series of such pictures, string them together, and voilà , you have your animation.
MysticVegeta
Posted: Wed Jul 20, 2005 8:38 am Post subject: (No subject)
Make it play 35 fps and you have tv speed animation lol
The Unknown
Posted: Sat Dec 17, 2005 9:00 pm Post subject: (No subject)
Um, I can't check out the initial link. This error message pops up:
General Error
Could not query modules information
DEBUG MODE
SQL Error : 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'mod WHERE blk.function_id = fnc.function_id AND blk.block_id = bct.' at line 5
SELECT blk.block_id, bct.column_id, module_path, function_file, auth_view FROM mx_column_block bct, mx_block blk, mx_function fnc, mx_module mod WHERE blk.function_id = fnc.function_id AND blk.block_id = bct.block_id AND fnc.module_id = mod.module_id ORDER BY column_id, block_order
Line : 103
File : /home/.angela/hackerdan/compsci.ca/mx/index.php
can anyone help me here (keep in mind that I do not know what the hell that message is saying )?
[Gandalf]
Posted: Sat Dec 17, 2005 9:03 pm Post subject: (No subject)
The link is broken because of the change in hosts of compsci, but not everything is still hosted...