Archived

This topic is now archived and is closed to further replies.

Tiles 'n' Trouble

This topic is 5497 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey! i have posted this once and noone seems to be responding... so ill post it with a catchy title: Tiles ''n'' Trouble i am creating a 2d tile engine and i am having trouble. i am getting an error because i cant define my DirectX clipper and Tileset surface correctly! i have a several file program so i cant post it here and i dont know were to put the definition. please help with this! thank u so much if u can help quantumkid Quantum Kid! "When the going hets tough he tough gets going"

Share this post


Link to post
Share on other sites
Noone respond to your post because your question is too vague!
What do you want people to tell you? You want to tell you taht you forgot a ";" in the "asteroid.cpp" file at the 15th row?

Try to be more specific when you ask questions!

Share this post


Link to post
Share on other sites
lol im sorry. the program is way to big to post here but ill try and post the important parts:
//this is the stuff from SST1LIB1.cpp
// notice that interface 7.0 is used on a number of interfaces
LPDIRECTDRAW7 lpdd = NULL; // dd object
LPDIRECTDRAWSURFACE7 lpddsprimary = NULL; // dd primary surface
LPDIRECTDRAWSURFACE7 lpddsback = NULL; // dd back surface
LPDIRECTDRAWPALETTE lpddpal = NULL; // a pointer to the created dd palette
LPDIRECTDRAWCLIPPER lpddclipper = NULL; // dd clipper for back surface
LPDIRECTDRAWCLIPPER lpddclipperwin = NULL; // dd clipper for window
LPDIRECTDRAWSURFACE7
PALETTEENTRY palette[MAX_COLORS_PALETTE]; // color palette
PALETTEENTRY save_palette[MAX_COLORS_PALETTE]; // used to save palettes
DDSURFACEDESC2 ddsd; // a direct draw surface description struct
DDBLTFX ddbltfx; // used to fill
DDSCAPS2 ddscaps; // a direct draw surface capabilities struct
HRESULT ddrval; // result back from dd calls

and and there is stuff in Main_Console.cpp that is similar and also in STT1LIB1.h

the problem is i dont know were to put this declaration:
//trying to define a surface for my tile map and a clipper:S
LPDIRECTDRAWSURFACE7 lpddsTileset = NULL;
LPDIRECTDRAWCLIPPER lpddClipper = NULL;

now if this seems like a dumb question please dont RTFM me... im a 12 year old game programmer and im just trying to learn. thanks!

quantumKid

Share this post


Link to post
Share on other sites
I don´t know if I´m interpreting your question correctly, but I think it depends on where you´ll be using those objects (scope). If you want all your functions to acess these objetcs, then you should declare them before any functions.
If this is not your question then by all means ignore me

There are 10 kinds of people: those who know binary and those who don''t

Share this post


Link to post
Share on other sites
hmmmm Im making one with ID3DXSprite interface...
It''s faaaaarr more easier when you know the Basics of Direct3D...

But if your making a tile-engine with DIrectDraw...
Can you post your Init code? ([ s o u r c e ][ / s o u r c e ])

Share this post


Link to post
Share on other sites
thanks pipo... do u have msn messenger or aim? if so email me at D_Jild@hotmail.com. i dont know Direct3D because im planning on making this game 2d then switch to 3D... if u could help with that pipo then that would be great...

anyway... the problem is i have like 9 files and i want all files to be able to access it and when i try to put it one plce it says: "error. Main_Console.obj already has this declared or sumthin like that. well over and out.

Quantum Kid!
"When the going hets tough he tough gets going"

Share this post


Link to post
Share on other sites
My engine is with DirectGraphics.
I use the ID3DXSprite interface which is something like DirectDraw with some differences at some points but the main goal of these two is just to render 2d images.
ID3DXSprite requires basic knowledge of D3D Initilization.
This is mastered in a week orso.

Altho DirectDraw is good material to learn, it has some weak points.
It''s your decission which one to learn but I can help yo with both!

Cya on the M.S.N.

Share this post


Link to post
Share on other sites
Thanks Pipo... i think ill learn both! this is the business and if u wanna learn sumthin right learn it all the way! a wise old person told me that... lol. neway what time r u on msn usually pipo? i cant get on right now but ill get on as soon as possible... thanks...


quantumkid

Quantum Kid!
"When the going hets tough he tough gets going"

Share this post


Link to post
Share on other sites
Hey everyone! great news! i got my engine finally working!8D Now can anyone direct me to a tutorial or sumthin on displaying and moving a character and then making it so he can only walk on certain tiles? thanks alot!

Quantum Kid!
"When the going hets tough he tough gets going"

Share this post


Link to post
Share on other sites