LGarePants Forum Index LGarePants
LG Cookie/Viewty, Whatever
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

New game

 
Post new topic   Reply to topic    LGarePants Forum Index -> Play
View previous topic :: View next topic  
Author Message
Sytze



Joined: 30 Sep 2009
Posts: 10
Location: The Netherlands

PostPosted: Sat Oct 10, 2009 5:11 pm    Post subject: New game Reply with quote

Hey everybody on this forum Cool

Im writing a game and it's almost done Very Happy
I can't really discribe the game, but it's a simple game Razz

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
View user's profile Send private message
Jayenkai
Site Admin


Joined: 26 Aug 2009
Posts: 15
Location: Bolton, England

PostPosted: Sun Oct 11, 2009 11:33 am    Post subject: Reply with quote

Hurray!
_________________
"Load, Next List"
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Sytze



Joined: 30 Sep 2009
Posts: 10
Location: The Netherlands

PostPosted: Sun Oct 11, 2009 1:46 pm    Post subject: Reply with quote

I'm almost done, just doing the finishing touch now.
But now I need your help for one thing. Very Happy

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! Very Happy
Back to top
View user's profile Send private message
Jayenkai
Site Admin


Joined: 26 Aug 2009
Posts: 15
Location: Bolton, England

PostPosted: Sun Oct 11, 2009 3:42 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Sytze



Joined: 30 Sep 2009
Posts: 10
Location: The Netherlands

PostPosted: Sun Oct 11, 2009 8:47 pm    Post subject: Reply with quote

Hmm thanks Very Happy That will work.

I'm pretty much done now. Maybe tomorrow I will add the font code.

Thanks again Smile
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    LGarePants Forum Index -> Play All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © phpBB Group. Hosted by phpBB.BizHat.com

Free Web Hosting | File Hosting | Photo Gallery | Matrimonial


Powered by PhpBB.BizHat.com, setup your forum now!
For Support, visit Forums.BizHat.com