Take a look in the SDK Docs for the D3DXMatrixOrthoLH function.
Z.
Printable View
Take a look in the SDK Docs for the D3DXMatrixOrthoLH function.
Z.
yea, i spotted that function after posting. im gonna change the projection camera movement coz i dont like how that works.
i have the windows working and i almost have it rendering them properly though direct x keeps breaking and i have to restart my pc to get it to work again :S
ill look for some more docs on the web.
Gotta do that :sQuote:
Creating a swap chain per-window can easily exhaust available video memory with multiple overlapping windows. In these cases you might want to create a single back buffer that is the size of the screen, restrict rendering using the viewport, and use the window and RECT parameters of Present to present from the single back buffer to any number of windows.
Dont bother... If each window is the same size, simply render one view, present it to the correct window, clear the back buffer, set the next modes, render again, and present to the next window, etc.
Z.
I gotta rest. afterwards im going to use this:
http://www.exhedra.com/DirectX4VB/Tu...R_Lesson17.asp (Scroll to the bottom).
okay, its rendering them all nicely though after running the app like 4 times i have to restart my pc coz the card runs out of memory.
i am using Set SwapChain(i) = Nothing to free the mem tho its still being a pain. i may know why.
Resetting...
the other thing was, the two new windows all have crap resolutions. once thats fixed then i will change them to ortho then give them different movement. then the 3d thing is almost done.
k, on a 64,64 map rendered 3 times, each with a textured overlayed im rolling off ~40 to 50 fps.
im still to implement patching and culling but that shudnt be for another day as im off to work in 30mins.
i got the views at a higher res.
now to switch em to ortho and individual movement.
Zaei, i think i may have to do that video mem thing coz this is stupid. i run the app 3 times and i have to reset my pc. its awful. it needs a fix.
ill look into it.
im erasing the data and things i set properly so it must be what i quoted above.
Do what I said =). Itll be easiest =P.
Z.
Zaei, do you have any input for my two questions up there? I hate to ask such a petty question, but its essential for me to continue working on my algorithm.
Sorry for ignoring you Sas... (by the way, only 80 some posts to go =).
First, Neutral towns sound good, though It would be best to allow mappers to designate sectors where those towns can be located, instead of them being truly random.
Second, There are a couple I can think of off the top of my head...
That is what I can come up with for now =).Code:Landscape type
Islands, mountains, plains, etc
Climate
Desert, Steppe, rain forest, etc (texture maps)
Land Age (the big one)
New land, generate per landscape type, and then apply a sharpening filter to the resulting heightmap.
Medium, generate landscape, apply an erosion filter
Old, generate landscape, apply a blurring filter.
Z.
Sounds pretty good... for old land, I think I'll be doing some plate tectonics so that ravines and deep crevaces are formed. But, of couse, I could still blur it ;)
Zaei, Direct X isn't what im good at. if it was OpenGL i could do it no problem. can u have a look at that directx4vb link i posted and see if what you mean is what he is doing. As far as i know im doing what you say.
Its not the same.
His suggets creating a back buffer that is big enough to hold ALL of the rendered views at once. Mine only needs the back buffer to be the size of each window. His would use more video memory, and mine would be slower (because you have to clear between each window).
Z.
Changed the Console to use the standard vector... nothing special =).
Z.
Zaei, it appears to be cleaning up the memory properly now so thats okay. im just trying to implement a camera system for the other views.
Nice going, Psy =).
On my end, I have done a bit of internal stuff.... the UserInterface manager now has its own internal Input handler that will dispatch messages to the appropriate window before the message goes to the game's handler, but only if you tell it to do that. I have also written a button class, that handles input when clicked =). So, neat stuff =).
Z.
Ok. The camera can no long wander off the map =). It still needs a bit of polishing, though. If the proposed camera position isnt valid, the move is canceled, so you dont slide like you should.
Z.
Well, that was fast... I just threw some fairly random code in, and it worked... *shrug* =). Ive always said I do my best work at 3 am =).
Z.
Nice going too Zaei!
Thanks... Went and ran it again, and the code still works =).
Z.
Bah, that was 2 AM Z :)
Ok, well I've learnt *a bit* of C++, maybe enough to do a few simple things on my own, but I'd like to know a bit more Z, if you wouldn't mind.
Is there anything that checks key input of a console program? Ex., Inkey$ in QBasic? I don't want to use a cin thing because that would show it on the screen.
Check gametutorials.com sas. goto the tutorials page and goto Console. they have stuff to do with Console input ;)
Mwahahha, I have created a program that gives coordinates for a circcle >=)
More to come, mwahaha!
Nice :thumb: =)Quote:
Originally posted by Sastraxi
Mwahahha, I have created a program that gives coordinates for a circcle >=)
More to come, mwahaha!
You just have to keep working from there... we all did it =P.
Z.
This thinking in C++ book parksie recommended is excellent.. something I can really connect to! Onto chapter 5.... :)
Nice... youll be a C++ monkey like us soon!
Z.
Yes, hopefully soon. ;)
I've been looking lately at DirectPlay.
Stupid fecker wont install off either of the Direct X 8 SDK cds i have so im so bloody annoyed.
The editor is coming along okay tho.
Sas, what compiler you got ??
I was trying to get Visual Studio .NET from school but the stupid IT guy goes.
"It will take too much paper work and i haven't got the time"
Stupid ****, gimme the god damn cd. he gave it to the teacher. All he'll give me is Bloodshed DevC++ which sucks ass and i have. Which he says is much better than VC++
MY ARSE!!!
Aaaaaah, explains why the school system is such a pile of ****e n u an get on the root drive just by sticking in a floppy disk. opening a file from it in word. take the disk out n click save and ur on it.
*RANT* *RANT*
I use Dev C++ :)
I would use MSVC++ but for some reason my projects didn't compile..
Anyway, I'm happy with this at the moment, using the GNU C++ compiler.
gcc rocks =).Quote:
Originally posted by Sastraxi
I use Dev C++ :)
I would use MSVC++ but for some reason my projects didn't compile..
Anyway, I'm happy with this at the moment, using the GNU C++ compiler.
Z.
Psy or Zaei, can you give me an idea for a general learning project? Something that isn't too advanced, but incorporates all of the things? I think I have pointers down finally, the *((long*)bo) hw stuff gets kinda challenging ;)
But I'm fresh out of ideas!
My "Learning" project was an early iteration of the Divinity engine ;).
Try writing a basic inventory system. It should manage various items and maintain current statuses on each item. It should allow the user to change the status of each item. Allow the addition of item types, and the removal.
That should be pretty good =).
Z.
Alright... I think I'll use vectors... does that sound good? Is there something bad about vectors I should know? (I always see arrays used in lieu of them and I wonder why). Is it like collections vs. arrays in VB?
Vectors are good when you need dynamic, random access. A dynamic VB array is basically a vector, though the vector gives you much more flexibility and options =). Arrays are good when you know the amount of space you need, and never need to change it.
Z.
Ok, cool :) I read up on them and arrays are not redimensionable... it'll be a change, but I'll probably forget VB after all this :D
The trick is to forget VB before this =P.Quote:
Originally posted by Sastraxi
Ok, cool :) I read up on them and arrays are not redimensionable... it'll be a change, but I'll probably forget VB after all this :D
Z.
Have you guys got something something to download yet since your first chrismas release ?
No, but we are working for another Christmas release... Though this new one will easily kill the last one =).
Z.
The old one, however, is still available at the old site http://www.crystal-rain.com/.
The new one will feature units you can move, more of a traditional GUI (I'm working on this right now), and probably come with our map editor. However, it is getting really close to Christmas; hopefully we can get all of these done.
Oh yeah, a full console too ;)