|
LGarePants LG Cookie/Viewty, Whatever
|
View previous topic :: View next topic |
Author |
Message |
Sytze
Joined: 30 Sep 2009 Posts: 10 Location: The Netherlands
|
Posted: Sat Oct 10, 2009 5:11 pm Post subject: New game |
|
|
Hey everybody on this forum
Im writing a game and it's almost done
I can't really discribe the game, but it's a simple game
I am doing this just to get into programming again. More games might follow if I got some inspiration for a new game.
I'll post the link here soon. |
|
Back to top |
|
|
Jayenkai Site Admin
Joined: 26 Aug 2009 Posts: 15 Location: Bolton, England
|
Posted: Sun Oct 11, 2009 11:33 am Post subject: |
|
|
Hurray! _________________ "Load, Next List" |
|
Back to top |
|
|
Sytze
Joined: 30 Sep 2009 Posts: 10 Location: The Netherlands
|
Posted: Sun Oct 11, 2009 1:46 pm Post subject: |
|
|
I'm almost done, just doing the finishing touch now.
But now I need your help for one thing.
I want to use a nice digital clock font for the score.
So I wrote 0123456789 in photoshop with that font. And saved it.
Now how do I use this font to draw the score?
Something with SetClip, I have already wrote some lines. But it didn't work. I guess it should be something like this:
Code: | scoreString := ''+score;
//now get each char of the string.
for i:=0 to length(scoreString) do begin
char[i] := StringtoInteger(getChar(scoreString, i));
//now I don't understand it
end; |
Help me! |
|
Back to top |
|
|
Jayenkai Site Admin
Joined: 26 Aug 2009 Posts: 15 Location: Bolton, England
|
Posted: Sun Oct 11, 2009 3:42 pm Post subject: |
|
|
If you think of the image like so...
[0][1][2][3][4][5][6][7][8][9]
^x=0, x=8, x=16, x=24, x=32, etc..
So, to draw a 0, the part of the image you're drawing is..
n=0
area = ((n*8),0,8,8);
To draw a 1
n=1
area = ((n*8),0,8,8);
etc, nice and easy.
(assuming they're 8x8, of course)
But that's on the image, instead you want to work backwards, because you're not cutting out of the image, you're instead cutting out the inverted area of the screen!
This is kinda like a hole in a plastic sheet. You draw under the plastic, so the right image shows inside the hole..
setclip(x,y,8,8);
is your hole in the plastic
You then draw the image, taking it back enough so that the set-clip hole shows the right number through it..
drawimage x-(n*8),y _________________ "Load, Next List"
Last edited by Jayenkai on Sun Oct 11, 2009 9:10 pm; edited 1 time in total |
|
Back to top |
|
|
Sytze
Joined: 30 Sep 2009 Posts: 10 Location: The Netherlands
|
Posted: Sun Oct 11, 2009 8:47 pm Post subject: |
|
|
Hmm thanks That will work.
I'm pretty much done now. Maybe tomorrow I will add the font code.
Thanks again |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|