Posted: 23rd May 2007 20:26
Here's my new Thread.

My dilemma stems from my misunderstandings of Blender, when building 3D objects for my FPS with radar in DBPro.

17thSky has contibuted to some of the graphical wizardry (some 3D objects). I plan on using some way to 'mine' space rocks to provide specific minerals for special weapons (but I want to test all of these things first).

Any help along these lines would be awesome. I'm compiling a Credits Page with Logos/Pics of contributors. Any help. Any suggestions.

I'm on my way to work and I'll stop in and check this, tonight. Drop me links or other threads (on this site) or tutorials for DBPro or texturing DBPro primitives. Anything, at this point, would be helpful.

I want to finish this game by 01-JUL-07. I really need a demo by this date. It's something I'm farming out to a publisher, and if this goes well -- who knows, maybe you'll see it on the shelves (or as a download somewhere!).

Anyone who contributes to making this game a reality: one free FULL VERSION. FREE UPDATES for the life of the TITLE. And your names/Aliases in the credits.

Thanks.
Posted: 23rd May 2007 21:42
why the mention of GMAX in the title?
Posted: 24th May 2007 9:01
This is not the name of the game, but the name of this Thread. I'm just asking for a bit of assistance.

Thanks, H.L.

I don't want to give out the name until I get much of it done, and to be sure nothing else has the name I have chosen. Suffice it to say, that when I'm sure I can name this game, and that name isn't used for something else, I'll reveal the name. Until then, it's "R&S", "Rocks & Stuff".
Posted: 24th May 2007 9:27
It primarily uses 2 cameras: 0 is the player view; 1 is the overhead/radar view.

This is what I have right now. The green box is the display of the second camera (#1). I have a picture of two of the primitives and the radar. It's kind of big, but I hope it gets the idea across.

I converted the BMP to JPG for space constraints. No score and no player infos, yet. Again this is still a WIP.
Posted: 24th May 2007 15:55
You don't need a second camera for the radar. Even if you use a tiny output image you'll lose FPS needlessly.

In my Physics compo entry, I had a radar that mathematically plotted each unit's position in relation to the PCs, and placed them on the radar screen as a small red dot.

It's hard for me to say more, as your project doesn't look far enough along yet.
Posted: 24th May 2007 19:13
I do lose some speed when this runs. All this WIP does is spin the player's ship clockwise and displays the images in FPS and from above in the little window.

The only reason I wanted to do a radar, was simply to see if it could be done. It can, but it does run slower when the items are closer to the player.

I want more than 30 objects on the screen, this does not include bonus items and the HUD. I figured I'd just pull together a couple of items for the HUD, hand-drawn, and some other items. I'd love to dump a background in it, one per level, but I want to see what I can do.

Please, any suggestions.
Posted: 24th May 2007 20:27
Hi, heres a simple radar code I made:
+ Code Snippet
sync on
sync rate 60



dim radar_objs(128,128)
global robj as integer



size_multip#=0.8
rad_x=100
rad_y=100

for x=1 to 10
` make some objects to show on the radar
make object box x,10,10,10
position object x,rnd(200),0,rnd(200)
` add the objectnumber to our radar
inc robj
radar_objs(robj)=x
next x

` make just an other object
make object box 300,20,20,20

inc robj
radar_objs(robj)=300

do
rem ink rgb(0,100,0),0
rem box 0,0,200*size_multip#,200*size_multip#


ink rgb(200,200,200),0

for x=1 to robj
dot rad_x+object position x(radar_objs(x))*size_multip#,rad_y+object position z(radar_objs(x))*size_multip#
next x

ink rgb(255,0,0),0
rem dot camera position x()*size_multip,camera position z()*size_multip
box rad_x+camera position x()*size_multip#-1,rad_y+camera position z()*size_multip#-1,rad_x+camera position x()*size_multip#+1,rad_y+camera position z()*size_multip#+1

control camera using arrowkeys 0,1,1
sync
loop




here's a more complex version:

+ Code Snippet
sync on
sync rate 60


type radar_def
num as integer
r as integer
g as integer
b as integer

endtype


dim radar_objs(128,128) as radar_def
global robj as integer



size_multip#=0.8
rad_x=100
rad_y=100

for x=1 to 10
` make some objects to show on the radar
make object box x,10,10,10
position object x,rnd(200),0,rnd(200)
r=rnd(255)
g=rnd(255)
b=rnd(255)

ink rgb(r,g,b),0
box 0,0,10,10
get image x,0,0,10,10
texture object x,x
rem color object x,rgb(r,g,b)


` add the objectnumber to our radar
inc robj
radar_objs(robj).num=x
radar_objs(robj).r=r
radar_objs(robj).g=g
radar_objs(robj).b=b

next x

` make just an other object
make object box 300,20,20,20

inc robj
radar_objs(robj).num=300

do
rem ink rgb(0,100,0),0
rem box 0,0,200*size_multip#,200*size_multip#



for x=1 to robj
ink rgb(radar_objs(x).r,radar_objs(x).g,radar_objs(x).b),0
box rad_x+object position x(radar_objs(x).num)*size_multip#-1,rad_y+object position z(radar_objs(x).num)*size_multip#-1,rad_x+object position x(radar_objs(x).num)*size_multip#+1,rad_y+object position z(radar_objs(x).num)*size_multip#+1
next x

ink rgb(255,0,0),0
rem dot camera position x()*size_multip,camera position z()*size_multip
box rad_x+camera position x()*size_multip#-1,rad_y+camera position z()*size_multip#-1,rad_x+camera position x()*size_multip#+1,rad_y+camera position z()*size_multip#+1

control camera using arrowkeys 0,1,1
sync
loop
Posted: 24th May 2007 21:32
I checked it out and it looks good. Very fast!
I want to use a generic cone for a facing pointer in the radar. Would I change the final BOX in the loop (the one after the INK RGB(255,0,0),0) to a CONE and then ROTATE it? It looks like that's the way to go about it.

And I love the clear background of the radar. Just wish I could get it to scale a little smaller, though, but be able to see the items.

My Primary Notes:
+ Black background for the radar, meaning no BLACK objects.
+ Brown rocks of varying sizes.
+ RED, GREEN, BLUE - Power-Ups.
+ ORANGE, LIGHT BLUE, PINK or PURPLE blaster bullets, based on the Power-Ups.
+ CYAN, YELLOW, MAGENTA - Bonuses & Crystals.
? (How can I attach the camera to the player's ship, a GOLD CONE that's ROTATEd to the proper facing, and use this in the code, instead of the RED BOX?)

Thanks to Jack for this code. He's #2 for the FREE GAME! Can I use your Avatar Pic for the Credz? (Jack, altered the Multiplier ["SIZE_MULTIP# = 0.8" to "SIZE_MULTIP# = 0.4" and it fits better.)

Also, I'm running my WIP in 1400x1050x24 color screen. (Settings configured using DBPro menus.) I will drop it to 16 colors, but, what's the typical settings for FPS/RTS games nowadays? 1024x768 or something?
Posted: 26th May 2007 2:56
I don't wanna sound nasty but this is pure "gimme the code"... If you want to know about DBP then buy the book on thegamecreators index... people generally contribute by will, requesting is never really appreciated. voila...
Posted: 26th May 2007 8:07
...so, you want people to give you models to use in yoru game...people to give you code for your game...and you want to give to a publisher for sale....and you offer peopsles free copy?

yoru a n idiot
Posted: 26th May 2007 16:59
Sorry, I was asking why you mentioned GMAX in the THREAD title then talking about a problem with blender. Wanted to know if there was actually a GMAX question (other than "can I use GMAX models in my game" to which the answer is No.)
Posted: 28th May 2007 17:49
To address TheBulk71 and Moondog:
The idea is to build the DEMO with the help from some of the members. I know GMAX can output to .X format! That's what I'm trying to use. (I already have 2 books FYI: "GMAX Bible" and "The GMAX Handbook".) The other idea is that I am offering to give free copies to anyone who assists me. I am not asking for any code. I am asking for methods in which I can translate into code! And, if I was an idiot, I'd at least try to spell "YOUR AN IDIOT" properly!

H.L.:
I guess I replied in the above paragraph. I apologize to you, H.L., for the way this seems to be going. There are some models I have created using GMAX, but in order for me to export them properly, I have to either create the GScript for the .X output or download it from somewhere. The ones I get from GMAX initially work, but are NOT able to be textured (in GMAX they are, in DBPro they are not). I can't apply textures in DBPro, either. Any suggestions?
Posted: 28th May 2007 18:06
It is illegal to use GMAX for making models to any other engine or games than what it says on licence.. Its only made for modding for Hl2 and etc games.. And Dark Basic isnt on the license so u really cant use it..
Posted: 29th May 2007 6:14
Blender can be used. It's free. It makes 3D models (with the user's help).

GMAX can be used. It's free. It makes 3D models (with the user's help).

Given the license of both of these AWESOME packages, how is it illegal to export a model into the DX format? You have put your heart into a model, tweaked the meshes, welded together the faces that weren't joined, and worked for weeks getting the model to look like the drawing, and then being told by anyone that I can't use my model because of a licensing agreement!?

Blender has it's OWN 3D ENGINE for games. GMAX, if you download the ModPacks for Q3A or DOOM3 or whatever, you're forcing yourself into that ONE ot TWO cool games, that have their OWN ENGINES, that you can export to.

I'm using an UNMODIFIED GMAX 1.2! Nothing in the license says I can't model my own stuff for whatever purpose I deem fit.

I can't, given your statement, FMC, use GMAX to model in Blender's 3D Game Engine...

Why, in the interest of all that is good in the world of coding (even DBPro) would a multi-million dollar(US) corporation like DISCREET, who is no longer supporting GMAX, allowing anyone to use GMAX for their own purposes?

Please, FMC, enlighten me. Am I wrong for the sake of being wrong, or am I facing a moral dilemma with the use of GMAX in my FPS?
Posted: 29th May 2007 8:26
As long as the games company has paid for the licence your ok to use GMAX.
http://www.turbosquid.com/Forum/Index.cfm/stgAct/PostList/intThreadID/8525
Posted: 29th May 2007 18:18
GMAX was designed for the modding community, to make new models for games that paid to use the GMAX license. It has since been cancelled since people were finding ways to export those models into other games and ignoring the EUL.
Posted: 30th May 2007 7:31
Thanks, HL. I knew GMAX had been dropped by DISCREET because of the Modding Community (of which I am a registered GMAX user).

EULAs typically allow users and developers to divert or alter the app/prog into new and better forms, on average. Too many people seem to think any prog with an EULA gives them the right to muck around in it and upload inferior versions of it's parent to the internet. (I know plenty about this so-called OpenSource EULA crap from the Macintosh community.)

Anyway, I've decided to self-publish! This gives me much more flexibility in the decisions that affect my development and to be more effectively creative. I hope this clarifies the problem...

----------------------------------------------------------
To Recap the Free "Rocks & Stuff" Registered Game Giveaway
----------------------------------------------------------
1) 17thSky
2) Hobgoblin Lord
3) Cash Curtis II
4) Jack
5) Indi
Posted: 1st Jun 2007 12:54
here's a radar system that can be scaled, and behaves a little more like you'd expect one to:
+ Code Snippet
`\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
`Simple Radar by Revenant_chaos\\
`>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
`Email-Revenant_chaos@yahoo.com//
`///////////////////////////////
sync on
hide mouse

distX as float
distY as float
posx as float
posz as float
objdist as float

radarscale as float=.5 `scale is expressed as a decimal, used to scale the radar's screen size
radardist=200 `range that radar will cover

numofradaritems=10 `number of objects to be checked for

`generate some random objects to detect
for tmp=1 to numofradaritems
   make object cube tmp,10
   position object tmp,rnd(200)-100,0,rnd(200)-100
next tmp

do

set cursor 1,1
if showhud=0 `Display Text
   print "fps=",screen fps() `show Frames per second
   print "use arrowkeys to move, and mouse to look"
   print "use the keypad's + and - to scale the radar"
   print "press H to toggle this text"
endif
`keyboard input
control camera using arrowkeys 0,.5,.33
if held=0
   if scancode()=78 then radarscale=radarscale+.05
   if scancode()=74 then radarscale=radarscale-.05
   if inkey$()="h" and showhud=0 then showhud=1
endif
held=scancode()
`mouselook
rotate camera 0,wrapvalue(camera angle Y()+mousemoveX()),0

gosub radar

sync ; loop

radar:
ink rgb(255,0,0),1 `RED
radarscreenposX=radardist*radarscale`Auto position the radar X
radarscreenposY=radardist*radarscale`auto position the radar Y
circle radarscreenposX,radarscreenposY,radardist*radarscale `draw the radar outline circle
dot radarscreenposX,radarscreenposY                         `draw the player's blip in the center
   ink rgb(255,255,255),1 `WHITE
   for tmp=1 to numofradaritems
      `get our distance from the target
      distX=camera position X()-object position X(tmp)
      distZ=camera position Z()-object position Z(tmp)
      objdist=abs(distX)+abs(distZ)       `convert to positive values, then add them
         if abs(objdist)<radardist        `if positive distance is within range
            `get its angle compared to the player's direction
            tmpang=wrapvalue(atanfull(distX,distZ)-camera angle Y())
            `calculate it's radar coords using trig
            posX=0-sin(tmpang)*objdist*radarscale
            posZ=cos(tmpang)*objdist*radarscale
            dot (radarscreenposX+posX),(radarscreenposY+posZ) `finally, place it's blip
      endif
   next tmp
return


let me know what you think. if you have any questions, just ask.

edit:
well I decided to further modify the code above, it fixes a bit of the jitters when you get close to an object. the blips are color coded to match the target, and now scale according to the radar scale.

The really only bug comes from the way the distance is checked combined with the sin()/cos(). since the distance is combined (distX+distZ) to place the blip, it isn't really proportional to the actual distX/distZ. for instance, if distX>distZ, the blip's Xdistance and Zdistance (from center) are still equal, because the combined distance is the radius that positions the point in respect to the player.

here it is:

+ Code Snippet
`\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
`Simple Radar by Revenant_chaos\\
`>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
`Email-Revenant_chaos@yahoo.com//
`///////////////////////////////
sync on ; hide mouse
distX as float ; distY as float
posx as float ; posz as float
objdist as float
radarscale as float=.08 `scale is expressed as a decimal, used to scale the radar's screen size
radardist=1000 `range that radar will cover
numofradaritems=30 `number of objects to be checked for
refresher as float

set ambient light 50

dim boxcolor(numofradaritems,3)

for tmp=1 to numofradaritems `generate some random objects to detect
   make object cube tmp,10
   boxcolor(tmp,1)=rnd(255)
   boxcolor(tmp,2)=rnd(255)
   boxcolor(tmp,3)=rnd(255)
   color object tmp,rgb(boxcolor(tmp,1),boxcolor(tmp,2),boxcolor(tmp,3))
   position object tmp,rnd(1000)-500,0,rnd(1000)-500
next tmp


do
set cursor 1,1
if showhud=0 `Display Text
   print "fps=",screen fps() `show Frames per second
   print "use arrowkeys to move, and mouse to look"
   print "use the keypad's + and - to scale the radar"
   print "press H to toggle this text"
endif
control camera using arrowkeys 0,.5,.33 `keyboard walking
if held=0
   if scancode()=78 then radarscale=radarscale+.01 `scale radar
   if scancode()=74 then radarscale=radarscale-.01 `scale radar
   if inkey$()="h" and showhud=0 then showhud=1 `toggle HUD
endif ; held=scancode()
rotate camera 0,wrapvalue(camera angle Y()+mousemoveX()),0 `mouselook
gosub radar
sync ; loop

radar:
ink rgb(255,0,0),1 `RED
radarscreenposX=radardist*radarscale`Auto position the radar X
radarscreenposY=radardist*radarscale`Auto position the radar Y
circle radarscreenposX,radarscreenposY,radardist*radarscale `Draw the radar outline circle
dot radarscreenposX,radarscreenposY `draw the player's blip in the center
`Draw cross in center of radar
line radarscreenposX,radarscreenposY-(radardist*radarscale),radarscreenposX,radarscreenposY+(radardist*radarscale)
line radarscreenposX-(radardist*radarscale),radarscreenposY,radarscreenposX+(radardist*radarscale),radarscreenposY
ink rgb(255,255,255),1 `WHITE

   for tmp=1 to numofradaritems
      distX=camera position X()-object position X(tmp)`get our X distance from the target
      distZ=camera position Z()-object position Z(tmp)`get our Z distance from the target
      objdist=abs(distX)+abs(distZ)  `convert to positive values, then add them
         if abs(objdist)<radardist   `if positive distance is within range
            tmpang=wrapvalue(atanfull(distX,distZ)-camera angle Y()) `get its angle compared to the player's direction
            ink rgb(boxcolor(tmp,1),boxcolor(tmp,2),boxcolor(tmp,3)),1
            circle (radarscreenposX+(0-sin(tmpang)*objdist*radarscale)),(radarscreenposY+cos(tmpang)*objdist*radarscale),(12*radarscale)*(13*radarscale)
         endif
   next tmp

return



what do you think?
Posted: 7th Jun 2007 7:23
Sorry, I've been away at (online) school and it's taking a lot of time out of my coding and forum-sniffing schedule.
I like this version of the radar, but there is a little weirdness in the 'blip' distances (as you've mentioned, RC).

Inventive.

I'm trying to run this game in 1400x1050x24 resolution as an FPS.
I'm not trying to One-Up the assists here, but I'd like to be able to scale this into a size no larger than 10% of the actual size of the screen (if it can be done!).
Any larger, it would interfere with the other on-screen stuff, possibly. Can the radar be built into a sprite?

Ideas? Suggestions?
Posted: 7th Jun 2007 7:30
Or maybe the resolution doesn't matter, as long as it plays well and is FUN.

Which are the best resolutions to run games in with Windows? With larger screens, LCD and Plasma widescreens, can I truly build a game that runs in an HD resolution?

I work for a discount retail department store chain that has an extensive smattering of mid-range and lower-end HDTVs. Many of the larger sized ones can run in 1080p, most of the rest can manage 720p or 1080i. So there's my other dilemma: Should I just go for the typcial PC resolution (1024x768x24) or go with something larger (1366x1080x24) that my computer can't handle (but can be switched to in a menu)?