Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Some "concept" question about developing

Author
Message
alteredsunset
13
Years of Service
User Offline
Joined: 10th Jul 2011
Location:
Posted: 10th Jul 2011 16:57
Hi there to all.
After several years I've decided to clean from dust and rust my programming notes and my brain XD
I've never coded in 3d.
If you would like to spare some tips and suggestions about my questions, well, I'll be very grateful.

I've planned to start with a "3d RPG" game project because I think it will be almost "complete" and complex to realize, and gives to me the "mind" to problem-solving step-by-step.

I premise that few days ago I've started to read and study both forum and some books, and I've some old-basic knowledge about programmation and coding.

Cut to the chase XD, here we are:

About terrain and world creation
1- I would like to create a "big" and "living" 3d big world. In order to don't "overflow" the memory and "breaking" the CPU fatigue, is it right the concept to create a A x B matrix in which store the reference of the terrain to load (render)?
And, obviously, (in addition to regulate the range of camera-view) render only the adiacent 8 terrains and not the whole "big" matrix?

2- about Terrain creation, I've found two main difficulties: texturing the height-map terrain manually generated and how successfully import and render a terrain made with the T.Ed (which setting or exported file to use?). I've tried to export a simple T.Ed terrain in .x format but I'm not able to render it in GDK (the viewer shows correctly the .x file).
Is there an "easy" and alternative way to make a detailed texture starting from the heightmap?

3- about textures and heightmaps: which dimensions are supposed to be used for a nice quality? Multiple of 2^x?
Are 512x512 sizes suitable for a good "compromise" between quality and speed of rendering?
I know that they have to be "mainly" square pictures and that i can resize o re-adapt the proportion in my rendering procedures.

4- about memory usage, may I referr to my FPS, RAM and CPU usage, or I would better to referr to some standard? In case of the last choice, where could I find some reference? (i mean, a sort of "first" home benchmark)

5- If I code referring to external files, shall be the compiled .exe "smaller" (in byte) and "easy to run"?
When I complete a project, in order to "release" the whole work, have I to do a particular "build/exportation" or it shall be sufficient to "comprime" the .exe and related data files?
If I use some particular lib, when I would like to "release" the working program, have I to export it also, or is it compiled and stored in the bin file (.exe) when I build it?


Last, but I think most important main general concept I've forgotten: when i run a compiled project, where are global vars stored and where are stored pointers? Header or buffer of the Ram?
I my thinking that pointers are "an easy" way to manage (and optimizing) the loading and unloading from memory, am I correct?

Thank you for reading ^^
alteredsunset
13
Years of Service
User Offline
Joined: 10th Jul 2011
Location:
Posted: 12th Jul 2011 00:15
Sorry guys, finally I've found this thread:

RPG Creation: A Technical Guide (by RiiDii)

very VERY interesting ^^

Sorry for the "double" post XD
alteredsunset
13
Years of Service
User Offline
Joined: 10th Jul 2011
Location:
Posted: 13th Jul 2011 13:52
A question about the "Advanced Terrain" technique:

if I didn't misunderstood, I can create terrains from heightmaps and and tile them toghether.
Is this process better than creating .x terrains?

And, more, what is the sense of "splitting" terrain? I've read that it improves the frame-per-second, and ok. I think that there are more advantages, but I still don't understand in what it consists.
Maybe to "customize" a particular "tile/sector"?

And again, in order to place 3d objects (mainly static), which way is the most suitable?
Doing it from "zero" in a function LOADTERRAIN( terrainX[a], terrainY[b]), in a 3d program (T.Ed or 3dmax) and saving a whole mesh, or by compiling a "personal" editor to load/modify/save the complete asset of the terrain with 3d objects?

May I use a sort of .jpg mask to detect the coordinates in which place/spawn a particular kind of 3d object?
alteredsunset
13
Years of Service
User Offline
Joined: 10th Jul 2011
Location:
Posted: 2nd Aug 2011 22:34
Well, here I am again XD
I think I've solved the "terrain" question running a matrix with referrence to the terrain to render.

At now I'm trying to manage my "spaghetti-code" inventory system.
Let me say that the sprites of inventory slots are 35x35 px, and each slot can be: empty, hovered by cursor, pressed and selected.
I would like to keep the graphic of the Selected slot until I press again the right mouse button.
The code I've written doesn't show me a persistent "selected" state.

Hodgey
15
Years of Service
User Offline
Joined: 10th Oct 2009
Location: Australia
Posted: 3rd Aug 2011 12:03 Edited at: 3rd Aug 2011 12:03
Hi alteredsunset, I'm not too knowledgeable about Advanced terrain but may be able to help with your latest problem.

First off, since you are using DarkGDK then you may get a bit more help from the DarkGDK board.

Second, my c++ and DarkGDK knowledge is limited but I think what you should do is make a boolean in your slot structure such as "selected".
Then if the mouse hovers over the sprite and slot.selected = false then slot.selected = true; you'll have to remember to 'unselect' the other slots.
Then you make an if statement such as if slot[n].selected then show that it is selected.

I hope that makes sense and helps

Login to post a reply

Server time is: 2024-11-24 03:06:25
Your offset time is: 2024-11-24 03:06:25