Click here to Skip to main content
15,926,939 members
Home / Discussions / C#
   

C#

 
GeneralRe: DLL Config File Pin
DavidNohejl3-May-05 11:19
DavidNohejl3-May-05 11:19 
GeneralRe: DLL Config File Pin
jklucker4-May-05 16:16
jklucker4-May-05 16:16 
GeneralGames and depth of objects - help =) Pin
Anthony Mushrow3-May-05 7:44
professionalAnthony Mushrow3-May-05 7:44 
GeneralRe: Games and depth of objects - help =) Pin
Judah Gabriel Himango3-May-05 8:13
sponsorJudah Gabriel Himango3-May-05 8:13 
GeneralRe: Games and depth of objects - help =) Pin
Anthony Mushrow3-May-05 8:40
professionalAnthony Mushrow3-May-05 8:40 
GeneralRe: Games and depth of objects - help =) Pin
Judah Gabriel Himango3-May-05 10:35
sponsorJudah Gabriel Himango3-May-05 10:35 
GeneralRe: Games and depth of objects - help =) Pin
Anthony Mushrow3-May-05 20:46
professionalAnthony Mushrow3-May-05 20:46 
GeneralRe: Games and depth of objects - help =) Pin
Anonymous3-May-05 8:30
Anonymous3-May-05 8:30 
You need to setup a Depth order. often this is as easy as starting your drawing from the upper left. But if your using a more 3d approch then you need to setup a list of items to draw by there depth. Draw the farthest objects first. The simplist way is create a static list. When you load your map organize the list for all you static (non moving objects). Then add your dynamic objects into the list. When a dynamic object is change you update the list. This way your only changing the list when somthing changes its depth.

As for making a "window" to see the player behind objects. this can be done by checking when we draw somthing. You need to make a bounding box or circle around the player. Simlpy the X,Y poition and and Radi. If the object your drawing is in fron of the play (ie: Obj.Depth < player.Depth) and Object.X-player.X < Radi and Object.Y-player.Y <radi then="" your="" dont="" draw="" the="" object.="" now="" this="" simple="" way="" will="" just="" not="" object="" at="" all="" which="" may="" cause="" some="" unwated="" visuals.="" in="" case="" we="" want="" to="" make="" a="" cusom="" function.="" if="" be="" is="" players="" bounding="" box="" instead="" of="" drawing="" it="" call="" our="" own="" cheack="" each="" pixel="" drawn="" see="" falls="" box.="" you="" can="" get="" clean="" circle="" around="" player.
ex:
px="" and="" py="" are="" point
void="" draw(object,px,py){
for="" (int="" x="0;" <="" object.width;="" x++){
="" for="" (y="0;" y="" object.height;="" y++{
="" (="" (math.abs((px+x)-(player.x))="">Radi) && (Math.Abs((pY+Y)-(player.Y))>Radi))
{
//Made up function Screen is your backbuffer or where your drawing to, then the X,Y location on the screen, then the source image pixel
SetPixel(Screen,pX+X,pY+Y,Object.image,X,Y);
}
}
}
}
GeneralPiping data when using Process class Pin
CTaylor893-May-05 7:41
CTaylor893-May-05 7:41 
GeneralRe: Piping data when using Process class Pin
CTaylor893-May-05 11:48
CTaylor893-May-05 11:48 
GeneralKeep additional information inside a "serial number" Pin
eclipse2k13-May-05 7:33
eclipse2k13-May-05 7:33 
GeneralRe: Keep additional information inside a &quot;serial number&quot; Pin
mav.northwind3-May-05 23:36
mav.northwind3-May-05 23:36 
GeneralRe: Keep additional information inside a &quot;serial number&quot; Pin
eclipse2k14-May-05 1:57
eclipse2k14-May-05 1:57 
GeneralRe: Keep additional information inside a &quot;serial number&quot; Pin
mav.northwind4-May-05 3:24
mav.northwind4-May-05 3:24 
GeneralRe: Keep additional information inside a &quot;serial number&quot; Pin
eclipse2k14-May-05 3:43
eclipse2k14-May-05 3:43 
GeneralStrip Non-Numeric characters from string Pin
RadioButton3-May-05 7:20
RadioButton3-May-05 7:20 
GeneralRe: Strip Non-Numeric characters from string Pin
Judah Gabriel Himango3-May-05 8:27
sponsorJudah Gabriel Himango3-May-05 8:27 
GeneralRichTextControl and Unicode problems with russian characters Pin
Uwe Keim3-May-05 6:40
sitebuilderUwe Keim3-May-05 6:40 
GeneralRe: RichTextControl and Unicode problems with russian characters Pin
Judah Gabriel Himango3-May-05 8:10
sponsorJudah Gabriel Himango3-May-05 8:10 
GeneralRe: RichTextControl and Unicode problems with russian characters Pin
Uwe Keim3-May-05 8:44
sitebuilderUwe Keim3-May-05 8:44 
GeneralRe: RichTextControl and Unicode problems with russian characters Pin
mav.northwind3-May-05 23:41
mav.northwind3-May-05 23:41 
GeneralRe: RichTextControl and Unicode problems with russian characters Pin
Uwe Keim4-May-05 0:39
sitebuilderUwe Keim4-May-05 0:39 
QuestionProcedure line separator? Pin
Carl Mercier3-May-05 6:22
Carl Mercier3-May-05 6:22 
GeneralManaging controls added at runtime Pin
Anonymous3-May-05 5:07
Anonymous3-May-05 5:07 
GeneralRe: Managing controls added at runtime Pin
MoustafaS3-May-05 5:18
MoustafaS3-May-05 5:18 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.