Rover On Mars By Yue.

Community Forums/Showcase/Rover On Mars By Yue.

Yue(Posted 2015) [#1]



GfK(Posted 2015) [#2]
I honestly have no idea where you're going with this. It's on Mars, nothing else is on Mars, and the video represents that. I just don't know what else you could do to it.


Derron(Posted 2015) [#3]
In later stages of the video you can clearly see... that textures are a bit blurry / missing details. Add them.

AND

Think of something to do in this "game". Maybe riddles/puzzles like "how to repair a broken wheel" or how to re-wire things to replace broken sensors with different things.


I have read "The Martian" some weeks ago. It was about an astronaut who was accidentally left on Mars (explosion, mission aborted, thought he was dead ...). He had to travel from the "house" they build (more like a air-filled tent) to a 4.000 kilometres far away landing station of the "next" mission.
So what does this have to do with your game? In the book he visited "old mars vehicles" who landed years before - because they still had working components he wanted to re-use (eg. communication).

So you could do something similar: if things are broken, you have to find other vehicles to extract components to replace yours. In that moment you will have to leave reality: imagine there are more than just 1-2 vehicles to "find" on Mars.

Then add things like "find spot X" and make some researches there (eg. collect stones).

To make it more exciting: add sand storms (they take away sun -> no sun -> no battery -> no movement). Add breaking-away ground (creating danger in movement).

...


bye
Ron


xlsior(Posted 2015) [#4]
I have read "The Martian" some weeks ago. It was about an astronaut who was accidentally left on Mars (explosion, mission aborted, thought he was dead ...). He had to travel from the "house" they build (more like a air-filled tent) to a 4.000 kilometres far away landing station of the "next" mission.


A bit off-topic, but just an FYI: "The Martian" will be released as a movie too, November 2015. Matt Damon as the main character, and directed by Ridley Scott (Alien, Blade Runner)
http://www.imdb.com/title/tt3659388

Pretty good book, I'm curious how it will work as a movie.


Yue(Posted 2015) [#5]
Good An image of before going to sleep.




Derron(Posted 2015) [#6]
@Xlsior
Last time I saw matt damon was in Interstellar (even not credited in the big cast list et the end...only in the small complete one). So he already was alone on one planet for years... seems this made them chose him...hehe.

Solo-actor-movies should be less expensiclve. For me it does not need a Ridley Scott to direct such a kind of movie...but I will surely watch it...am into scifi.


@yue:
were you able to translate my post? You did not reply to it. I am sure I could create a complete gameplay out of "rover on mars" but you will have to introduce a fictionous part. Drop a line if you are interested.


Bye
Ron


AdamStrange(Posted 2015) [#7]
Last image:
There is no water on mars!


Derron(Posted 2015) [#8]
Maybe its the rover of an ancient cilization...when there still was water :-)

Bye
Ron


xlsior(Posted 2015) [#9]
Last image:
There is no water on mars!


Seeing is believing.




Yue(Posted 2015) [#10]


The idea to do something real behavior rover on Mars, touch spend sometime to fiction and film that tells our friend Derron, gives rein to the imagination.

For example if I get to roll the rover as it does in real life, the gameplay would be very bad, the rover walking very slowly but very slowly.

On the water, who knows ?, rehash that from a conspiratorial aspect already been discovered. : D

@xlsior Water on Mars oO? :D


Derron(Posted 2015) [#11]
Ok, so I assume you are fine with adding some "gameplay":


- rover is send to mars to accomplish missions

- if rover fails x of y missions, game over (they remotely power off the rover)

- missions are send via "TransCom" (or how you call it)

- missions could come simultaneously (for more difficulty)

- missions:
- - collect stones from "valley x" (location pinned at minimap)
- - collect earth from "spot y" (location pinned at minimap)
- - catch the "uncontrollable robot z" (ping-signal on minimap "from time to time") - such robots are other machines send to mars
- - ...
- - bring dropped items to specific places (eg to build up a mars station)

- next to missions you have to care for batteries and sand storms (they decrease solar panel efficiency)

All in all you need some "fiction elements" to make it playable (in a limited way). NASA is able to investigate things on Mars without any robot being there ... just using sensors. We have to think of this thing being _not_ possible. Same for uncontrollable machines etc.

You wont get the perfect game out of it - but at least "something to do" for the rover. The missions I suggested are more like simple quests just needing good control over the robot (to not fall to the side on slopes or so).


bye
Ron


Yue(Posted 2015) [#12]
Derron Hi, thanks for your ideas are really great and serve me a lot :)


degac(Posted 2015) [#13]
Hi

surely the texture are too 'flat'. I would add some rocks (if you look at some real images from Mars there's no sand... just many rocks small and big).
Of course you should use some dynamic 'LOD', just rocks in a determinated range should be rendered.

About the game:

the rover - at the moment - is 'driven' from Earth. But each command (or sequence) tooks 20 minutes (+-) to reach the rover. This means that is not a 'real time driving'.

You could use this factor as a variant of the gameplay: you just 'send' the sequence (ahead 10mt, right 30°, ahead 200mt) on a map and the 'see' the results: of course you have no control (remember the 20 minutes of time-gap?!) and if your route-plan is wrong your rover could crash/fall/finish in a shadow zone etc


Derron(Posted 2015) [#14]
If you do what degac suggests, you will more likely have some kind of "learning programming" game (like "turtle graphics") with a list of commands per "turn":

moveLeft, moveLeft, turnLeft, moveForward, moveForward ...


I would instead prefer to have some kind of "autonomous robot" (robot with "ai") -> fiction but maybe more fun.


bye
Ron


Yue(Posted 2015) [#15]


Hi, I 'm trying to find a way to embed stones in the ground without affecting the performance .

on the idea of Degac is really very interesting.

Create some suggestion stones on the ground?


Yue(Posted 2015) [#16]


Hi, I 'm trying to find a way to embed stones in the ground without affecting the performance .

on the idea of Degac is really very interesting.

Create some suggestion stones on the ground?


degac(Posted 2015) [#17]
@Derron

I know it could be a little 'boring' game... but

1. it could be a 'variant' of the game (real time driving)
2. planning the route is based on the info you collect: like in the real situation you have only a low res image of the ground (from satellite) and few infos about the land around the rover. At each 'step' you collect more infos and you can planning a better the route. It could be funny if you consider you can't know what there's behind a hill, if you take in consideration the solar exposition, the weather conditions and so on.

About the stones

Some possible solutions: some 'sprites' to keep the polygon count lower and only the nearby to rover using real polyon but I think only for the bigger stones.


Yue(Posted 2015) [#18]
Well , I will try do my best.




Yue(Posted 2015) [#19]



Ploppy(Posted 2015) [#20]
You seem to have a nice fluid fps, good solid collision routines and IMHO a good marsy atmosphere going on there. There's also a great shadow effect and the distant landscape look nice and rocky. Camera seems to be pretty free and configurable too.

Personally I say very well done for all that already. It may take time, but I think you already have a good base already to build on. The rest will follow.


Yue(Posted 2015) [#21]
Ploppy Thanks for the comment. I think things could be done better, talking more specifically the field but I think my abilities do not give more.

I hope to continue for a few and have something playable shortly.

Currently I'm trying to think how to implement rocks, similar to the video and do not know if it's the texture or patterns.

Gretings.




Hardcoal(Posted 2015) [#22]
Derron rocks.. Good ideas


Rick Nasher(Posted 2015) [#23]
IMHO it's easy to imagine a nice little game from the Mars setting..


Dangers:
- Steep cliffs (Rover falls to pieces when driving in).
- Steep craters(can't get out).
- Dust pools(like quicksand).


Dangers that come at regular intervals:
- Magnetic dust storms that make you loose track.
- Meteor storms (search for protective hideouts to shelter)

Range:
- Limited due to solar power needed for driving, charge lasts only 2hrs after dark, so not at night. 1 day = 1 level.

- Range can be extended by finding batteries that are scattered around in form of droppings by previous ships. If you run out of power before back at base then you fail a level: restart level and retry.


Levels:

LEVEL 1:
The correct landing of Rover#2 at the target zone.
-Reward: next level.

LEVEL 2:
Wheel is damaged so can only drive slow speed. Locate spare part package that has been dropped earlier and fix wheel for speed up.
-Reward: speed up + next level.

LEVEL 3:
Locate a small radar station which will allow an uplink to the mother ship in orbit.
-Reward: mother ship shows you where to find Rover#1 that landed earlier + next level

LEVEL 4:
Rescue mission for Rover#1, which is stuck in a crater. Needs to be pulled out using the arm of rover#2.
-Reward: Rover#1 will give Rover#2 a tool to find water + next level.

LEVEL 5:
Find odd looking rocks and take sample, analyze level of minerals the more minerals the better. Follow the trail of rocks with high minerals and will lead to possible water area.
-Reward: New area + next level.

LEVEL 6:
Find water in area of level 5.
-Reward: next level.

LEVEL 7:
Analyses of water shows life should be present. Go find life forms.
-Reward: next level.

LEVEL 8:
Who knows? Little green men? An alien kidnapping? Building a concrete residence for the new pioneer settlers from earth?

One could easily extend this with different power ups, like laser drilling shooting/tools, instruments and hideouts to be found in different levels.


stayne(Posted 2015) [#24]
I think it would be cool if the player could somehow discover that life on earth originated from Mars. Maybe we ruined the planet and migrated here and now we are doing the same thing but moving back.


Yue(Posted 2015) [#25]


Thanks for brainstorming , is excellent .

I commented that I have now worked in the shutter of the game.

This works on the head of Rover where are the cameras, and depending on where you look, this is updated.

Soon I 'll take care of the wheels and gradually will implement the contributed ideas.




Yue(Posted 2015) [#26]


:)


Blitzplotter(Posted 2015) [#27]
It's on Mars, nothing else is on Mars, and the video represents that. I just don't know what else you could do to it.



How about using images from the Mars one project for inspiration ?

http://www.mars-one.com/

;)


Yue(Posted 2015) [#28]


Hello, A New Development demonstration , someone wants Helping an active test this ?

Greetings. :)

Alpha Development Version - 0.1.

Download Here: http://www.iris3dgames.com/descargas/

Edit: BlitzPlotter, Thanks You for the Web Mars One :)


degac(Posted 2015) [#29]
Hi

just download R-A.01...

I have not found options to configure it (of course it's an ALPHA), so it runs only in window mode.

I don't know if there are 'commands' to turn on/off camera (nice!), radar and so on.

I got a max FPS of 22 and min of 14. Surely the terrain has an impact on it.

suggestions:
1. options (window,full screen) - shadown : ON-OFF (to see if it has an impact on the FPS)

2. on loading... a 'countdown' (or other indicator) will be fine (you just read on screen what is done, but you have no idea of what are the total 'steps' before starting

3. about the game:

* add some 'control panel' to manage energy - like: turn off camera, sensors, radars and so on to get more energy to move (it's less 'arcade' but more RPG/Managment!)

* I suppose there is a 'terrain map' or (better) the light map of the terrain: you could use this to determine if the rover is in a shadow zone or not (and stop charging or not the battery)

* if you have a camera, you should use it. Switch (to camera vision) to look around and find targets. I would add a zoom of course!

In any case NICE project!

ps: this is computer where I tested it

PhenomII X4-955 - AMD Radeon HD5700 (Yes it's old... but it works!:))


Ploppy(Posted 2015) [#30]
Can't download, I clicked on download icon in dropbox but nothing happens. What am I doing wrong?


virtlands(Posted 2015) [#31]
THat's a superb job on the rover scene. Version 0.1 is higher performance than 00.00 !

@Ploppy
For those that can't access that Descargas link, -- you can also get it from here --> http://bit.ly/19bTLl3




virtlands(Posted 2015) [#32]
You know, ...
if you look very carefully, you can find several interesting things on Mars.


;)


Yue(Posted 2015) [#33]
Hello !, Thank you all for your comments and for helping to use our Rover on Mars.

I'm trying to optimize the field and am aware that as it releases new versions of development will implement new things.

I thought Ratings Set opcoines to power cycle the shadows and you can choose the quality of the shadows.

Regarding the time of loading the game, and implement a simple progress bar.

Thanks degac for Your Info and for your recommendations, you are really valued for creativity. :). :)

Ho Plopy Link Which has been our friend virtlands :) Thanks YOu virtlands. :)

Best regard.






Yue(Posted 2015) [#34]


ZZzZzz


xlsior(Posted 2015) [#35]
Looking nice.


degac(Posted 2015) [#36]
Well, new terrain texture are very good!


Ploppy(Posted 2015) [#37]
I agree, I managed to download it this time - drobox didn't even want to let me yesterday. Nice work indeed Yue, I'm so glad you have gone much further than just creating main menus, it is definately worth it ;D Your alpha demo is solid on my machine, it runs at a good 60fps without hitch. The physics seem great so far, I've paying special attention to the wheels of the rover and the respond greatly to uneven terrain.

I did manage to make the rover fall when I drove it off a steep incline. Any way to put it back on its wheels??

Keep up with the good work Yue, you alreay have the base for a good game...


RemiD(Posted 2015) [#38]
@Yue>>I have tried your demo, it looks good (but empty !), the controls and resulting actions feel ok, and it seems to work properly on my computer (depending on the view it can run at less than 20fps, but that's playable).

Some suggestions :
-add a turbo to your vehicle to move faster when going uphill
-should there be clouds in the sky ? what are they supposed to be ? water clouds ? dust clouds ? gaz clouds ?
-the far away hills/mountains on the skybox should be of the same color than the terraincolor+fogcolor at this distance.
-add a key to reset the vehicle so that it is back on its wheels
-maybe add some irregularities on the terrain ? (move each vertex randomly between -0.1 +0.1 ?)
-maybe add some additional obstacles (rocks ? holes ?)
-maybe add some natural phenomenons which can cause damage to the vehicle (asteroids falling from the sky ? wind ? rocks falls ? collapsing grounds ? radioactive areas ? )
-maybe add some ancient buildings of an ancient civilisation ?

Good luck for the next steps !


Guy Fawkes(Posted 2015) [#39]
Works fine for me. Just a few concerns I have. Space bar shouldn't be stop. The spacebar should be jump or hover. Hopefully hover. :) Runs at a smooth 59-60 Frames on my NVidia GeForce GTX 750 Ti ;)

Nice job! =)


Derron(Posted 2015) [#40]
@ "key to reset"

Nope ... you should have tools on your rover to "repair" on your own - for example a kind of "crane"-arm, the same tool you use to collect things like small rocks for exploration missions.
This "crane" is your universal tool. You could even make it controllable via "W-A-S-D" and the rover itself via "cursor keys" (or you have some kind of "activate crane"-button).


@clouds
On Mars you would more likely just have dusty skies / sand storms. So if view range is limited, this means that there is a sand storm (which lowers sun influence and therefore power, it also might danger your tools, so it is needed to "pack" them into the inners of the rover or so...).

@obstacles
Yepp...think this is needed (and already was suggested in a similar way).


@ancient building
I think this is some good idea for "later missions" if you want to have some kind of story.

a) measure things, do simple missions - and also "collect stones"
b) the collected stones somehow didnt look "formed by nature"
c) further exploration of ground -> target location contains some kind of "collapsing ground" -> artificial cave
d) need to lighten the cave but you do not have a light on your hover: collect mirrors from other "old/unused" rovers on the mars, place them at specific parts of the "way to the cave" so light is reflected and lightens cave
e) ... you could even start with "logic puzzles" now in the inner of the cave

Do not forget that "from time to time" the rover needs power, so maybe create spots in such a cave with holes in the ceilings so you have to wait some time there to power-up ("sleep for 6 hrs" button :p).

and so forth.


bye
Ron


degac(Posted 2015) [#41]
@Derror:

mission C is nice! (Indiana Jones on Mars :P)


Yue(Posted 2015) [#42]
Hi all, is very encouraging to read your comments, that engages me further with this. I'm trying to get better at something basing lighting in photos and I think he fails to as I show in this picture.


Currently I work in health HUD rover and I'm doing the robot arm which carry a camera.

About falls on the cliffs, unfortunately the rover will suffer serious damage from the breakdown of one of your tires to the loss of the cameras, and when no longer useful but the mission is reset to the last point of the mission.



Derron(Posted 2015) [#43]
"health hud"

the rover should not have "health" - it should have "battery level" (gets lower with every "driving", a bit when moving the robot arm or using sensors).

Also the battery level should raise from the "sun" (solar power) so standing around will regenerate battery power (except things are "broken" and need some kind of emergency-repair using repair-kits somewhere on the planet).

@hud elements
I would try to implement only basic things "graphically" - you can improve that later on: first make the gameplay, then the "sugar".


bye
Ron


Yue(Posted 2015) [#44]
@Derron, sorry, yes it's Hud energy :D




The idea is that the indicator down and up and the amount of energy that has the rover is known, if not more climbs halfway down again and indicates that something is wrong.


Blitzplotter(Posted 2015) [#45]
Loving the new textures Yue!


Yue(Posted 2015) [#46]
Thanks You Blitzploter :)

Launcher.


Loading.


Camera Gray Scale and Energy Low.


:D


Hardcoal(Posted 2015) [#47]
The whole Idea of this Rover Lures me..
and the idea of missions is even greater..
I would really love playing such a game with a luring music..

You can make it work if you will listen to people advices.. here

I admit it makes me want to make a similar type of game.

Well not exactly.. :)

Atm still Kinda busy with my editor


Rick Nasher(Posted 2015) [#48]
Looking very good Yue.

See: lots to do on Mars. It is where the Pyramids come from(but now buried under sand). ;-)

I normally don't run unknown exe's, but for you I made an exception and happy did: I want to see version 2.0 in dropbox.

Great stuff.


Yue(Posted 2015) [#49]



BlitzSupport(Posted 2015) [#50]
Starting to look really nice... I think it's a bit too red now, though.


Yue(Posted 2015) [#51]
If I am in agreement , I think That looks very red texture, What do you think now ?




xlsior(Posted 2015) [#52]
That last one probably looks more realistic.


Derron(Posted 2015) [#53]
On the right bottom area of your last screenshot the texture looks "stretched" ...

Maybe you should adjust your camera's "lens" to be more a "orthogonal" one. (don't know things about the engine you use and if you can adjust things in it - but I assume so).


bye
Ron


Yue(Posted 2015) [#54]
Hi I am aware that I have to improve lighting, and the case is not to find the most accurate that abut on Mars, but rather the most accepted by most of us.

For now I show the first rock on Mars.

:)




Blitzplotter(Posted 2015) [#55]
Great to see Mars's first rock Yue, keep up the good work ;)


Rick Nasher(Posted 2015) [#56]
Ah, you already solved the gray cam issue.
It looks like the Rover has suspension, that is really cool.


Yue(Posted 2015) [#57]
Well, is total Turn the camera on and off . Same way you can turn on and off the radar.

C = Camara key.
Key R = Radar.

Yes Camera oo turned the radar has the energetic consumption will be higher and collected at the power indicator when much energy is consumed this indicator rises and falls faster.

When the power is turned off the vehicle is stopped and the radar and the camera turns off .


Yue(Posted 2015) [#58]
Power Consumption Rover.
Camera OFF and Radar OFF.
Motor : 50




Camera ON or Radar ON
Motor: 35



Camera ON and Radar ON
Motor : 20




Yue(Posted 2015) [#59]
The Sun on Mars.




Rick Nasher(Posted 2015) [#60]
Very nice. Can we download a new demo?


Yue(Posted 2015) [#61]
@Rick Nasher
Hi, I am implementing the charging system of solar panels Rover.

The is the following.

When the batteries can discharge, with the key T enters solar charging mode, in this mode can not be absolutely nothing, only the indicator of energy that you maximize returns to zero and rises again seen.

Charging mode will be faster or slower according to certain conditions, for example if the sunlight viewable, and if in the top of a hill will be faster if you live in the foot of a mountain.

The camera and radar are lit only when the rover is braking.


I think if I finish this later implement this release a demo test.


Rick Nasher(Posted 2015) [#62]
Sounds good. That will add to the game strategy.


Yue(Posted 2015) [#63]


Pitching the game. Where you can choose the quality of the shadows, language, if running full screen or windows screen resolution.

;)


Yue(Posted 2015) [#64]



He finished the game Launcher , over time new features will be added .

For now you can choose the language of the pitcher, the quality of the shadows to the Rover and if you run in full screen or Windows mode.

:)


degac(Posted 2015) [#65]
Hi, nice improvements!

Just a note: if the camera is OFF I think it's better showing nothing than a 'black' screen.


Yue(Posted 2015) [#66]
Hello, is that I thought that when the camera breakdown showing a broken lens.


Well, I show the robot arm.




Yue(Posted 2015) [#67]
Ok, new Release Alpha 0.2

notes:

Movement rover:

Forward: Key W.
Back: S Key
Turn to the Right: Key D.
Left Turn: Key A.
Brackes : Key Space.

Turn on and off systems.
Radar: Key R.
Camera: C. Key
Charge Mode: Key T.

When you run out energie, precione the T key

This is not playable.

Greetings.


Download Here: https://www.dropbox.com/sh/s7svtlsgr0g6lpk/AAD_LPPmG7pe5lpvs_NsC4ova?dl=0


Rick Nasher(Posted 2015) [#68]
Took it for a ride. It's looking pretty good. I wonder how the arm will be.

I only don't understand the charger display behavior. Shouldn't it be like:

For all full battery: ||||||||||||
For half a battery : ||||||
For empty battery: |

And gradually increasy with 1x | when charging in the sun and slowly decreasing by 1x | when using power?


Yue(Posted 2015) [#69]
Hello, I think I have to improve a lot.

What is really sad is that would improve land but can not, the fact of putting stones around the grounds is a really difficult task. I would try to find a way to make a field with several layers of textures, but not how. :(




On the arm is to be handled with the arrow keys and have another camera to view the stones.

Greetings.


Blitzplotter(Posted 2015) [#70]
Hello, I think I have to improve a lot.


I do not think you have to improve that much at all ;)

I really like the implementation of the radar in the top right and the camera is also an interesting addition. I also like the launcher you have made, good work !


RemiD(Posted 2015) [#71]

What is really sad is that would improve land but can not, the fact of putting stones around the grounds is a really difficult task.


You could use have a temporary list to store the xzposition of each stone and the xzradius of each stone and randomly choose the xzposition of the stone, then check if this position is too near or far enough from others stones,
if too near
choose another position
else if far enough
use linepick to determine what is the height (y) of the terrain at this xzposition
position this stone at this xyzposition

I don't see a problem here.


Krischan(Posted 2015) [#72]
Infinite Rocks? No problem, I just reworked my Infinite Starfield code from the Code Archives and added Perlin Noise for more procedural density changes, you only need a proper rock texture:





Oh, and wait for my next milestone in miniB3D which is related to Mars, too (but not only) - my BrushPlanet project. This creates a large and infinite/seamless (!) planet terrain using only two single brush images and you can drive around seamless using quaternion rotation.

But I still have to clean up the messy code and hunt some bugs.






Yue(Posted 2015) [#73]
Krischan Hello, I wish you success in your project Mars, and I feel intimidated because your abilities to land is very professional no matter what tool you use. :)

I commented that I appreciate the help regarding the code of stones, but I have a problem trying to move the camera jumps me wrong.





Only error move cámara Key W or Key S or Key A or Key D.


Krischan(Posted 2015) [#74]
Hmm strange its working here even in Debug mode but you could try to change the line to this, I'm not sure if the Mod Command is needed and it was set twice in the Y option (and it is only for the radar which is not needed).

WritePixelFast ((imagesize/2)+x),((imagesize/2)+y),rgb,buff

On the other hand, it's just a quick+dirty test to show how to realise it. There are other, perhaps more efficient and more random methods you have to find yourself.


Yue(Posted 2015) [#75]
Ok , if you remove that line of code works correctly , sin embargo You Can not see the radar, something that is not Necessary right now. While it is very nice of ESE radar That Displays the stones.

The question is , how do I detect the height of the quadrant of the field to set the stones in Y Mas up ?, I discussed with entries LinePick , you have a simple example of this.


best regard.


Krischan(Posted 2015) [#76]
No working example but to do a linepick in general, do this:

1. get source position of camera or pivot or whatever is there
2. set target coordinates far below (Y-10000 for example)
3. calculate the delta vector between these coordinates
4. Linepick with the source and delta values
5. read the pick values (only if there is a valid pick, else error)

To make it work the target entity must be pickable with Entitypickmode and Updateworld (if I remember this correct). In this piece of code I'm doing a linepick to find the Y terrain height for the camera XYZ position to put my player on ground. And if you only need the Y height the DX values could be simplified to 0,-10000,0 which is slightly faster.

cx# = EntityX(camera)
cy# = EntityY(camera)
cz# = EntityZ(camera)

tx# = cx
ty# = cy - 10000
tz# = cz

dx# = tx - cx
dy# = ty - cy
dz# = tz - cz

l = LinePick(cx, cy, cz, dx, dy, dz)

if l then height# = PickedY()



Yue(Posted 2015) [#77]


I've Since All stones , but does not work properly .

I have the land divided into 64 quadrants , the camera goes behind the rover , and pick line only manages to put a stone on the ground, the other left floating at the camera.


Any suggestions ?

Note : Krischan , if you need any model for your project on Mars , I can create ;)


Krischan(Posted 2015) [#78]
Ok, a more advanced example - please note that only the rocks which are flagged as r\visible and r\update are linepicked. And very important: Entitypickmode terrain,2 + Updateworld()!!! And for the pink rock color: I've made them only in a nice pink color that you can see the code working :-D





For crater.png use this texture:


EDIT: to make the flying rocks outside the terrain invisible change the linepick line to this:

If l Then r\y = PickedY() Else r\y=-2^32 : r\visible=False



JBR(Posted 2015) [#79]
Nice rocks! I too get the MAV on the writepixel.


Krischan(Posted 2015) [#80]
And another edit: to align the rocks to the terrain normals check this out: it uses AligntoVector to align the rocks (now cubes for better effect visualization) to the terrain:






Yue(Posted 2015) [#81]


Hello Christian thoughts about my field is very large and from the perspective of land (flat) only see few stones ( pink cubes ) , the most reasonable is that I'm doing something wrong.

Any Suggestion ?

I also really appreciate your help on this , because this encourages me to continue my project.

We can say that when I see your work I realize I 'm not a programmer , I'm just a simple user program , you maybe a designer.

kind regards.


Krischan(Posted 2015) [#82]
I think you have now enough simple, commented and working examples to play with (there is even a highly sophisticated source to create your own endless terrain on the fly you can use for your game).

Again: check if your terrain mesh is pickable and try to understand the technique behind it. It should work on every pickable terrain mesh. It is no witchcraft :-D


Krischan(Posted 2015) [#83]
Witchcraft is this full running example. I've been bored today and so I created this little demo on the fly. The Mars Exploration Rover Model ist from 3dlenta.com. It is not perfect but I'm happy with it. With ENTER you can create a new landscape, moving with WASD or arrows, SHIFT=Turbo and LMB/RMB or Q/E zooms.



Download Demo+Source+Media: MarsRoverDemo.zip [3.5MB]




Yue(Posted 2015) [#84]



Christian, this is really beautiful and powerful. This confirms to me that I still have much to learn and improve and healthily envy your talent.

Many say that Blitz3D is bad, however whenever I realize that it is the artist behind the tool can be a great talent.

Hey, can I use is code in my project?

I loved the map, it's great and I went and caught the pyramid, it's really great.

:)


Yue(Posted 2015) [#85]
I am really impressed, you left me with my mouth open, sure if I had enough money I would pay to work for me, is really great what you do. :)




Krischan(Posted 2015) [#86]
Use the code like you want - there are no secrets inside :-) Only the secrets you have to dig out yourself and learn from them. Yes, it looks nice for Blitz3D and I think it deserves a separate thread. Today, Blitz3D is only nice for rapid prototyping, beside that it's a dead horse. I really love Blitzmax and miniB3D now and wouldn't start to write a whole game in B3D.

The pyramid was just a test for my gravity / keep the player on the ground algorithm which was the hardest part for me and I decided to keep it because many people once thought there were pyramids or even a face on mars :-D

And I hope you're not depressed when I say that I still have to learn a lot of things, too. For example I'm a total dumbass when it comes to 3D modelling or I'm still struggling with my Brush Planet which is only a small part of my own space exploration game.


Rick Nasher(Posted 2015) [#87]
Krischan always has some coding masterpieces. As I said before: he's a wizard. :-)

However, they are not always easy to combine with your own code. But don't let that put you off Yue, because you have a good feel for atmosphere and composition and produced some really good looking stuff already.

I think your Rover is really well done, same as the controls and physics.
So don't worry. I really like to see what you come up with next.

I admire your style as well as Krischan's. The trick is to combine that with your own and make it better. Your last piece of code made me feel like on Mars for real, perhaps due to lighting, color, textures etc. I miss that a bit in Krischan's example, edges of crater and hills are too sharp there also.


Yue(Posted 2015) [#88]
What really frustrates me is that I have no knowledge as I wish, for example, vectors, normals, are concepts for my enteneder complicated, like when you see Blitz commands as Cosine.

What excites me ally for example not understand the application of a LinePick, and at last I have managed displaying examples of our master Cristian.

What I value Blitz is to always have something new to learn, I swear I intententado with other Motros as Unity, Torque, Cry engine, but one of my biggest problems is that I think I do not speak English. But at least the beauty of this is that pus put stones in my field of Mars :) basing on Cristian code.

Best Regard.


Krischan(Posted 2015) [#89]
> perhaps due to lighting, color, textures etc. I miss that a bit in Krischan's example, edges of crater and hills are too sharp there also

The steepness depends on the octaves/factor values, for example octaves=5 and factor=12 creates "softer" hills. The detail could be increased by splitting the terrain like in Blitztiles (or even act as a source for the BlitzTiles map). Craters are possible, too but this needs a lot of tuning in the SIN/COS values in my noise combinations (and hey, in my latest example there is a huge crater) ;-)

Yue, your map already looks good but you really need to understand the techniques behind before you start to create more complex environments. You have to play around with examples, I've only learned from examples and ten years ago, I didn't even knew about Blitz3D :-D


RemiD(Posted 2015) [#90]
I really like your creations Krischan, your terrain looks nice, but imo the demo of Yue is much better, especially because of the controls turns moves of the rover with physics. So don't get discouraged Yue, you are making progress.


not understand the application of a LinePick


Maybe this will help :
with dim arrays :
http://www.blitzbasic.com/codearcs/codearcs.php?code=3094
with custom types :
http://www.blitzbasic.com/codearcs/codearcs.php?code=3095

take a look at the code inside the function ThrowLinePick()

TFormVector(vx#,vy#,vz#,Entity,0) allows you to create a vector from the position rotation of an entity in the direction and with the length that you want, and then you can use these global vector values to throw a linepick in the world from the position of the entity with the direction and with the length of this vector. (with or without a radius)


degac(Posted 2015) [#91]
Well, Krishan's example is like a 'toy' compared to Yue's one (I don't want to offend anyone!) ;D

I mean, terrain is superb - and I like the stones field.
Rover's reaction/control is indeed too 'simple' compared to Yue's example.
(your rover is 'glued' to every surface :P)

In Yue's creation terrain is (maybe) too big and causes slowdown on my machine (I don't know how it's handled and what is the impact of the physic engine on it)

I think Krishan's example must be learned, it's very well written, and he's kind of you to post it.

Yue don't give up! Try to integrate the Krishan' source and use it as motivation!

The race for Mars is just started!


Yue(Posted 2015) [#92]


This seems to stop being a game and became a learning laboratory where I'm trying to understand the linepick and other things, in the end I get tired and leave the project.

My concern is that I managed to put the rocks on a plane, I do not understand is I'm com happens because I can not put it on the 64 stitches that form the vast terrain.

Now my question is how aumenteo range of stones around the Rover ?, seems that the range is very small.


Yue(Posted 2015) [#93]
Looks like I'm doing well, but only if flattened all 64 meshes. EscaleMesh Terrain, 45, 1.45, I can see the rocks, but if I leave in 45,45,45 are not displayed.




Krischan(Posted 2015) [#94]
Perhaps your Linepick Y starts *below* the pickable terrain? Then the linepick ray can't find any mesh to intersect with. Try to increase the distance in the linepick Y vector or inverse the linepick Y vector.


Rick Nasher(Posted 2015) [#95]
Linepick isn't that difficult I think: it's just a virtual line shooting from an entity. When it hits something that is defined as 'pickable' (= test worthy) then it will return a value that represents the entity type picked. (anybody please correct me if I'm putting this wrong)

But what I'm wondering about: will collision detection of the stones impact the frame rate?


Krischan(Posted 2015) [#96]
> But what I'm wondering about: will collision detection of the stones impact the frame rate?

Yes it will. In my example every rock is a separate mesh entity (but using Copyentity). But you can create an invisible but collision present second single surface mesh and add a cube or a simple sphere to it around every rocks position and scale. Then you only check the collisions against this mesh. It's fake but with much less triangles to check against collision it should be much faster but a little bit less accurate.

And for linepick: yes, but you must shoot the line in a direction using a vector, but it is easy if you have two XYZ coordinates, the linepick vector is just the delta vector between the two coordinates.

cx,cy,cz ---> tx,ty,tz = tx-cy,ty-cy,tz-cz


Yue(Posted 2015) [#97]
I'm really confused, I have a property with 64 units. I have to have a linepik for each quadrant of the field ?.


Krischan(Posted 2015) [#98]
64 units? The screens and your demo look like you're using my BlitzTiles engine? Then each of the 8x8 Terrain Meshes must be made pickable first. And yes, the pick length must match the dimensions of the terrain, to be more precise: it should be larger then the largest height/depth of the terrain. I doubt we will see some code example to play with and if yes I couldn't run it here in vanilla Blitz3D as it looks like you're using an extension für Blitz3D (shadows, physics)? Then we could hunt for the bug. It's hard to help you solving this linepick problem without having an example to play with.

Rick+degac+RemiD: I know that my example doesn't look that good and the steering could be improved, beside that it completely lacks of physics. But that is no competition or it is my intention to look better. It is just an easy to understand and fully commented example to help Yue and in addition I put as lot as nice to have features in it to look even better. I'm not offended but this should be clear, I started with a starfield which became rocks and finally it became a Mars like terrain with a simple rover, that's funny isn't it?

And degac, my nick is Krischan which is just a pet name of my real name Christian. Krishan without the c looks more like Indian/Romanian but I'm from Germany (that's why my english is not perfect, too) and here it looks very odd without the c :-D


Yue(Posted 2015) [#99]
I 'm just trying to learn .

The terrain is made BlitTiles is desert plateaus. What I did was export to b3d , then with parti blender mesh in 64 units , all with the aim of establishing physical parameters of the rover .

But if I leave the normal field is very small.



I just do not understand the LinePick and learn after trial and error, and I have the idea that it is a lina crossing the space and what crosses it, returns both the point of motor vehicle crash as the mesh with which it was found .

I repeat I am not a programmer , only one user application , physics is given by the system of physical bullet, I have not done anything special , just pass parameters and for sure our friend Krischan , with their knowledge can do better I , but really programming.

The problem with the pick line is that updates the position in the height of the stones , likewise appreciate the help .


Yue(Posted 2015) [#100]
Where I can send the entire project ?

:)


Krischan(Posted 2015) [#101]
Just send me a mail with a download link (see my profile for the adress).


Yue(Posted 2015) [#102]
Ok, one moment. :)


degac(Posted 2015) [#103]
@Krischan
:)
I was just kidding about the 'race for Mars', and both examples are very complex and looks great!
Of course I understood your help for Yue, very kind as I said.
And with 'toy' I mean the lack of a proper physic - compared to Yue's example , not really to understimate your great work (I mean: in a single source code there is infinite-terrain, stone fields and rover control. More than I could do (really!)
And I hope Yue don't give up!

And about your name.. ouh sorry I read it wrong!
btw, Christian is my name too, and I didn't know that there was a 'pet' version of it! I learn something everyday!


Yue(Posted 2015) [#104]
You so I Sent.
Feel free to change anything :)


Yue(Posted 2015) [#105]
Trial and error is the only way to learn and the truth is that not learn, just fix problems without the idea as I do.

Apparently they had just set this up.

Global SCALEX#		= 320.0           ; rockfield scale X
	Global SCALEY#		= 320.0	*3		       ; rockfield scale Y
	Global SCALEZ#		= 320.0*2				   ; rockfield scale Z
	Global FARDIST#		= 320.0*2				   ; fade out distance
	Global DENSITY#		= 100.0				   ; 100% density




In this case the ground has been something totally different plane.



So without further behind with head eyes sleep, see you tomorrow.


Krischan(Posted 2015) [#106]
Ok got it but didn't got it running yet. Some suggestions first:

1) structure your code! - you won't find anything when the project becomes much larger (and it will become much larger later!) your code looks often like spaghetti code which will kill your project at a certain level of complexity (you will be confused, stop working and must restart again, this happened always to me before I started structuring the code from the very beginning)

1a) structure means: declare ALL variables first: use Const, Global and Local and use them later in the code, don't cast them in the middle of the code

1b) structure means: name variables exactly and unique after what they do so that you can see all the time what is happening when

1c) structure means: have a main program which is small as possible and include all other functions like what they do, for example math.bb, mesh.bb, fx.bb and so on

2) comment your code! preferred is english language, so that other people like me can read it when you need some help (I didn't had spanish in school)

3) I need instructions how to setup my environment, you are using external DLLs - I have only vanilla Blitz3D installed and I'm not familiar with these extensions nor I have the time to dig deeper

Here is a Structure example of one of my main programs (that's why I love Blitzmax Superstrict mode over Blitz3D so much: you can (and must!) structure your code). You should have no problems at all to read it:
Superstrict

Framework sidesign.minib3d
Import brl.random
Import brl.timer
Import brl.freetypefont
Import brl.tgaloader
Import brl.pngloader
Import brl.oggloader
Import brl.wavloader
Import brl.directsoundaudio

Include "include\Functions\FBanks.bmx"
Include "include\Functions\FCrypt.bmx"
Include "include\Functions\FFilter.bmx"
Include "include\Functions\FMath.bmx"
Include "include\Functions\FMesh.bmx"
Include "include\Functions\FMouse.bmx"
Include "include\Functions\FNoise.bmx"
Include "include\Functions\FPixmap.bmx"
Include "include\Functions\FSound.bmx"
Include "include\Functions\FSprite.bmx"
Include "include\Functions\FText.bmx"
Include "include\Functions\FTexture.bmx"
Include "include\Modules\TStarmap.bmx"
Include "include\System\GUI.bmx"
Include "include\System\Init.bmx"
Include "include\System\Keyboard.bmx"
Include "include\System\Media.bmx"
Include "include\System\Objects.bmx"
Include "include\System\System.bmx"
Include "include\System\Update.bmx"
Include "include\System\Variables.bmx"
Include "include\Types\TFlag.bmx"
Include "include\Types\TFPS.bmx"
Include "include\Types\TInfotext.bmx"
Include "include\Types\TMedia.bmx"
Include "include\Types\TQuad.bmx"
Include "include\Types\TTime.bmx"
Include "include\Types\TCam.bmx"
Include "include\Types\TGradient.bmx"


' ------------------------------------------------------------------------------------------------
' Init Graphics
' ------------------------------------------------------------------------------------------------
AppTitle = "Extrasolar " + Round(GAME_VERSION, 3)
GLShareContexts()
Graphics3D SCREEN_WIDTH, SCREEN_HEIGHT, SCREEN_DEPTH, SCREEN_MODE
ClearTextureFilters()

' ------------------------------------------------------------------------------------------------
' Main loop
' ------------------------------------------------------------------------------------------------
InitGame()

While Not AppTerminate()

	' Timed VSYC loop
	MainLoop()
	
	' 3D Output
	Wireframe FLAG.Get("WIREFRAME")
	
	RenderWorld
	FPS.Update()
	
	' 2D output
	GUI()
	
	Delay 1

	' Bufferflip
	Flip FLAG.Get("VSYNC")

	' Memory Garbage Collection
	GCCollect()

Wend

EndGraphics

End

' ------------------------------------------------------------------------------------------------
' Update Game Logic
' ------------------------------------------------------------------------------------------------
Function MainLoop()
	
	' read current time
	TIMER_Timer = MilliSecs()

	' check if update is allowed
	If (TIMER_Timer > TIMER_Update + TIMER_Lasttimer) Then

		' calculate new timer interval		
		TIMER_Interval = TIMER_Timer - TIMER_Lasttimer

		If TIMER_Interval > TIMER_Safe Then

			' check for framedrops
			TIMER_Interval = TIMER_Safe
			FPS.framedrops:+1

		End If
		
		FPS.multi = GAME_SPEED * TIMER_Interval
		
		' Update Game Logic
		UpdateGame()
		
		' get current camera position
		CAMERA.GetCameraPosition()

		' store last timer
		TIMER_Lasttimer = TIMER_Timer
			
	EndIf

End Function

	
' ------------------------------------------------------------------------------------------------
' Update Game Logic
' ------------------------------------------------------------------------------------------------
Function UpdateGame()

	' Keyboard
	PollKeyBoardInput()
		
	' Hide all Module Pivots	
	HideModules()

	' check which module to display	
	Select GAME_MODULE
	
		Case "Starmap" STARMAP._Show() ; STARMAP._Loop()
	
	End Select
	
End Function


Structure example of Variables.bmx:
' ------------------------------------------------------------------------------------------------
' Paths
' ------------------------------------------------------------------------------------------------
Const PATH_Font:String = "font/"                            ' Path: Font
Const PATH_Texture:String = "textures/"                     ' Path: Texture
Const PATH_Sound:String = "sound/"                          ' Path: Sound



' ------------------------------------------------------------------------------------------------
' Game Global Values
' ------------------------------------------------------------------------------------------------
Global GAME_STARS:Int = 1000                                ' Game: Number of Stars
Global GAME_SIZE:Int = 1000                                 ' Game: Size of Starfield
Global GAME_LOD:Int = 512                                   ' Game: Map Level of Detail
Global GAME_SEED:Int = 2                                    ' Game: Initial Seed
Global GAME_MODULE:String = "Starmap"                       ' Game: Current Module to show
Global GAME_VERSION:Float = 1.000                           ' Game: Version
Global GAME_SPEED:Float = 0.01                              ' Game: Speed Multiplicator


' ------------------------------------------------------------------------------------------------
' System Globals
' ------------------------------------------------------------------------------------------------
Global SCREEN_WIDTH:Int = 2560                              ' Graphics: Screen Width
Global SCREEN_HEIGHT:Int = 1440                             ' Graphics: Screen Height
Global SCREEN_DEPTH:Int = 32                                ' Graphics: Screen Depth
Global SCREEN_MODE:Int = 1                                  ' Graphics: Screen Mode
Global CHANNEL_MUSIC:TChannel                               ' music channel
Global CAMERA_NEBULA_FACTOR:Int = 32                        ' resolution of the starmap nebula cam

' ------------------------------------------------------------------------------------------------
' Types
' ------------------------------------------------------------------------------------------------
Global FLAG:TFlag = New TFlag                               ' Flag Management
Global FPS:TFPS = New TFPS                                  ' FPS Counter
Global INFO:TInfo = New TInfo                               ' Information Text
Global MEDIA:TMedia = New TMedia                            ' Media Management
Global TIME:TTime = New TTime                               ' Time measurement



' ------------------------------------------------------------------------------------------------
' Modules
' ------------------------------------------------------------------------------------------------
Global STARMAP:TStarmap                                     ' Module Starmap
Global STAR_ROWS:Int = 4
Global NEBULA_ROWS:Int = 4



' ------------------------------------------------------------------------------------------------
' Timed VSYNC
' ------------------------------------------------------------------------------------------------
Global TIMER_Safe:Int = 60                                  ' Safe FPS limit
Global TIMER_Update:Int = 0                                 ' Update Frequency
Global TIMER_Interval:Int = 0                               ' Update Interval Helper
Global TIMER_Timer:Int = MilliSecs()                        ' Current Timer
Global TIMER_Lasttimer:Int = MilliSecs()                    ' Last Timer



' ------------------------------------------------------------------------------------------------
' Arrays
' ------------------------------------------------------------------------------------------------
Global Switch:String[] = ["off", "on"]                      ' simple on/off Array
Global Array:Int[(GAME_SIZE * GAME_SIZE) + 1]               ' star position shuffle array


I'll have a closer look after work this evening (in about 11 hours), but I really need to know how to set up the environment first.


(tu) ENAY(Posted 2015) [#107]
What happened to Pawn?


Yue(Posted 2015) [#108]
Hi, something tells me what I'm not ready to make a game. My skills are still developing acquire knowledge and're right, this in the last becomes untenable. For example finished so tired last night was like giving birth to a child, but at least understand achieved using a pick line.

About the code I think I always have that problem, I learned certain things and when I apply what I learned all goes well, then the Probelma is when I face what I know, normal vectors, commands Cos and math with my education degree third grade in school only subtract, add, multiply and divide and that not with great quality, however're absolutely right, you need to be very organized in writing the code. I think I have rather become a scholar to take code from third parties and accommodate my needs, that's not a programmer, I think that deep down my environment would be a Unity but with all documentation in Spanish, so for me would be paradise, but the process of learning for me is divided into two parts, for example translated into Spanish and try to understand the process for me is very tiring and ultimately control it in the trash.

Anyway, for now I will continue and try to better manage the code.

Best Regard.


Yue(Posted 2015) [#109]
@(tu) ENAY
Hello, Pawn, this pause for now :)


Yue(Posted 2015) [#110]
We have rocks in our Martian terrain . :)

special Thanks to our friend Christian , without their help this would be impossible .

It's not perfect , but I gsuta much .

Thanks Christian ! :)



Even if I do not finish the project I think I've gone too far .

Best regard.


Rick Nasher(Posted 2015) [#111]
Looking pretty cool. Doesn't matter how you got there, we all need to learn. Love the terrain and random look of the rocks. Keep up the good work.

Do the rocks have collision on them so rover will bump over them?


Krischan(Posted 2015) [#112]
Good to see you found a solution. Linepick isn't that hard, it's "only" simple vector math. I sometimes rely on other coder's functions like currently quaternions where I don't understand the matrices math behind but: I understand what they do and why I need them instead of euler rotations for example. The trick is to include ready functions where you're not good enough and use them even if you don't understand. Only the result counts :-)

But I'd suggest you improve your english skills first as many documentation, books and code out there in the internet is written in english language. Then improve your mathematic skills and know your tools (commands and functions) and do simple examples to underastand how they work and where you can insert them in your own game's logic to solve problems. I'm no native english speaker, too, but I've read and still read a lot of english articles and code and even in this forum I need to read/write in english to communicate and sometimes I have some questions or need help, too. And I've learned a lot in this forum here. The german blitz community is dead and I'm happy that the english community still exists. I'd be lost without this forum, believe me.

I'm just an IT engineer with a high school degree and I've visited the basic math courses only. When it comes to trigonometrics and other much harder math stuff I'm lost and even now after 10 years experience in Blitz3D/Blitzmax I'm still uncertain if Blitzmax+miniB3D and my skill are sufficient to finish the game I always wanted to code. And sometimes it is not a problem to code a function but to make it so efficient that you can use it realtime when you need to! Currently I need to solve the problem to drive around the surface of a huge planet, not in 3D but in a good looking 2D environment. That's really hard to code it efficient and to get nice looking and pseudorealistic landscape formations procedurally.

Efficieny is as much as important like code structure. And even if you are the top programmer and know all about efficiency and mathematics and stuff you first need a good game idea first, a stunning story and very important: you need to motivate the player all the time that he'll play the game all the time and over and over again. THAT is the hardest part making a game IMHO. The game mustn't look very good and we single Indie coder won't create a Triple-A game title in our lifespan (!) but when the idea is good and it makes fun you can beat a multi-million dollar game created by hundreds of very experienced people! Think about Minecraft or Flappy Birds. We could have done both in Blitz but we didn't had the idea. Keep this in mind. Your or my game - if done right - could be the next Minecraft. It's like playing lotto - if you hit the nerve of many people this can become true.

To be honest: I admire all users here who released a single game or two made in Blitz. I never progressed over a nice, efficient techdemo, so I finished only parts of a game. But I think it's time to put all together to a complete game. I don't want to become rich coding a good game or think "my game will be the next Minecraft", I just want to do it - and I'll release it for free if it is done some day! And if other people have fun playing it I'd be happy. Nothing more.

The sky is the limit but: the universe may be infinite!


Yue(Posted 2015) [#113]
@Rick Nasher I 'm working on it .

The idea is implemented in the launcher is an option called "detail terrain " where the lower quality, less rocks and the highest number of rocks much more .

By now a small video of the rocks.



If , cristian , that the end is just a hobby for me, maybe someday I win the lottery , but for now will not happen and I keep working as a doorman at a building.

Also I think I'm too old for trying to learn English , and always I have to play with my personal life , but at the age of 11 years in Colombia was part of an illegal armed group in Colombia , so I guess that the struggle is to survive as possible.



Best Regard.


Rick Nasher(Posted 2015) [#114]
@Krischan: Well spoken. Hope you succeed in creating a game, cos you definitely have skill, technique and knowledge to do it. Always wondered why you didn't up till now, as you produced such beautiful pieces of code.

Key question is can one accept the limitations/restrictions and still produce something good?
The answer should be yes, but it may take compromises, which is hard if you are a perfectionist. This is a necessity though, otherwise never anything will get to be released.
I think this very much applies to a lot od people here, me included: I start out with an great idea but forever keep adjusting the original goal until (almost) unreachable/unrealistic.


Krischan(Posted 2015) [#115]
To your video: looks even better, you only need some variation in the terrain surface color/structure, it looks too clean/artificial like somebody cleaned it up before :-) And Yue, you are never to old to learn something new. You even don't need a book today, we have the internet. And seek out for new friends in reality you need to talk in english. This improves your knowledge a lot, too. I don't know much about Colombia, only what our foreign ministry writes about what you need to know and consider as a tourist (and that's not funny what I read there).

It's always good to know a second language, perhaps you can even advance to a better job with that knowledge? I "only" had english in school for 7 years which has been 22 years ago and since then I read a lot and even need to talk to customers from UK and USA. Even if I'm no expert I think people understand what I have to say. And english is more easy than for example german, we have about 100.000 different words in german and use "only" 10.000 of it and the syntax is hard to understand for many non-germans. In english you need much less words to communicate and many words have double meanings. In english you just say "the" and in german we have "der", "die" and "das" (male, female, neutral) which can be very confusing.

And Rick, yes that's one of my personal main obstacles - I'm a perfectionist too and that's why I'm afraid that a game won't be good enough and everybody laughs at me :-D And one thing to mention: if you can't explain/describe the game in only one sentence, I doubt the game will work, IMHO.


RemiD(Posted 2015) [#116]

Key question is can one accept the limitations/restrictions and still produce something good?The answer should be yes, but it may take compromises, which is hard if you are a perfectionist. This is a necessity though, otherwise never anything will get to be released


i agree, and this can apply to any creation, it must be good enough but does not need to be perfect (exactly as you have imagined it)


degac(Posted 2015) [#117]
Good progress, I like the terrain and stones.I will just change the stone colour to match the terrain.
Keep on!


Yue(Posted 2015) [#118]





New texture on the ground , not sure if I should be that way .

Well, Colombia like any country in the world I humbly think you have problems, and it all depends where the place and who we are, is that it makes a difference.

Now the new problem I have is I can not implement collisions with rocks , apparently have to create rigid bodies with bullet for every rock and they have to eliminate them if the system is not overloaded.


Yue(Posted 2015) [#119]
Trying to put collisions rocks unfortunately based on the examples of physical bullet, the most feasible is to create 50 rocks which have a box of collision, if I think more than that number, the system collapses. And this hurts greatly than thought where levels of detail of rock were 1250 2500 and 5000.

My knowledge do not give more.




Yue(Posted 2015) [#120]
; add rocks to rockfield mesh
Function Addrocks(amount%=1,min#=0.01,max#=0.02,red%=255,green%=128,blue%=0)
	
	Local i%,R.rock
	
	For i=1 To amount
		
		Local rn#=Rnd(0.9,1.1)
		
		R.rock = New rock
		
		R\r=red*rn
		R\g=green*rn
		R\b=blue*rn
		R\x=Rnd(-SCALEX,SCALEX)
		R\y=0.0
		R\z=Rnd(-SCALEZ,SCALEZ)
		R\scale=Rnd(min,max)
		R\pitch=Rnd(360)
		R\yaw=Rnd(360)
		R\roll=Rnd(360)
		R\entity=CopyEntity(rock)
		R\update=True
		
		; Here Rock Collisions
	        R\rocasPX = btBodyCreateBox(1,1,1,0)
			
		
		If Rnd(1)>0.9 Then R\scale=R\scale*Rnd(1,3)
		If Rnd(1)>0.99 Then R\scale=R\scale*Rnd(3,6)
		
		; small rocks don't collide!
		If R\scale<0.4 Then EntityType R\entity,0; : r\r=255 : r\g=0 : r\b=0
		
		If Distance3D(0,0,0,R\x,R\y,R\z)<=FARDIST Then
			
			If Rand(100)<DENSITY Then R\visible=True
			
		Else
			
			If Rand(100)<DENSITY Then R\visible=True
			
		EndIf
		
	Next
	
End Function



; rebuild rockfield mesh
Function Updaterockfield(parent%,Camara%,fader%=False)
	
	Local r.rock,px#,py#,pz#,d#,a#,rgb%,x%,y%,rr#
	
	Local cx#=EntityX(parent)
	Local cy#=EntityY(parent)
	Local cz#=EntityZ(parent)
	
	visible=0
	rocks=0
	
;	SetBuffer buff
;	Color 0,0,0
;	Rect 0,0,imagesize,imagesize,1
;	LockBuffer buff
	
	For r.rock = Each rock
		
		rocks=rocks+1
		
		; calc rock position
		px=cx-r\x
		py=cy-r\y
		pz=cz-r\z
		
		rr#=Rnd(0.9,1.1)
		
		; check if rock must be moved, if yes: rock is invisible and must be updated
		If px<-SCALEX Then r\x=(r\x-(SCALEX*2)*rr) : r\visible=False : r\update=True : If Rnd(100)<DENSITY Then r\visible=True
		If px>+SCALEX Then r\x=(r\x+(SCALEX*2)*rr) : r\visible=False : r\update=True : If Rnd(100)<DENSITY Then r\visible=True
		If pz<-SCALEZ Then r\z=(r\z-(SCALEZ*2)*rr) : r\visible=False : r\update=True : If Rnd(100)<DENSITY Then r\visible=True
		If pz>+SCALEZ Then r\z=(r\z+(SCALEZ*2)*rr) : r\visible=False : r\update=True : If Rnd(100)<DENSITY Then r\visible=True
		
		; always hide all rocks
		HideEntity r\entity
		
		; check only visible
		If r\visible Then
			
			; new XY position
			x=Int(Normalize(px,-SCALEX,SCALEX,imagesize/2,-imagesize/2))
			y=Int(Normalize(pz,-SCALEZ,SCALEZ,-imagesize/2,imagesize/2))
			
			; rock is grey on radar
			rgb=64*$10000+64*$100+64
			
			; reposition rock And get distance 
			PositionEntity rock,r\x,r\y,r\z
			d=EntityDistance(rock,parent)
			
			; check if not to far away
			If d<FARDIST Then
				
				; rock is visible?
				If EntityInView(rock,Camara%) Then
					
					; rock is green on radar
					rgb=255*$100
					
					; add alpha
					a=1.0 : If fader Then a=Normalize(d,FARDIST*0.7,FARDIST*0.9,1,0)
					
					; rock must be updated? do a linepick for new height position
					If r\update Then 
						
						Local l = LinePick(r\x,r\y+1000,r\z,0,-10000,0)
						
						If l=marte1\mesh Or marte2\mesh Or marte3\mesh Or  marte4\mesh Or marte5\mesh Or marte6\mesh Or marte7\mesh Or marte8\mesh  Or marte9\mesh  Or marte10\mesh Or marte11\mesh Or marte12\mesh Or marte13\mesh Or marte14\mesh Or marte15\mesh Or marte16\mesh Or marte17\mesh Or marte18\mesh Or marte19\mesh Or marte20\mesh Or marte21\mesh Or marte22\mesh Or marte23\mesh Or marte24\mesh Or marte25\mesh Or marte26\mesh Or marte27\mesh Or marte28\mesh Or marte29\mesh Or marte30\mesh Or marte31\mesh Or marte32\mesh Or marte33\mesh Or marte34\mesh Or marte35\mesh Or marte36\mesh Or marte37\mesh Or marte38\mesh Or marte39\mesh Or marte40\mesh Or marte41\mesh Or marte42\mesh Or marte43\mesh Or marte44\mesh Or marte45\mesh Or marte46\mesh Or marte47\mesh Or marte48\mesh Or marte49\mesh Or marte50\mesh Or marte51\mesh Or marte52\mesh Or marte52\mesh Or marte53\mesh Or marte54\mesh Or marte55\mesh Or marte56\mesh Or marte57\mesh Or marte58\mesh Or marte59\mesh Or marte60\mesh Or marte61\mesh Or marte62\mesh Or marte63\mesh Or marte64\mesh Then
							
							r\y = PickedY()-r\scale/8.0
							AlignToVector(r\entity,PickedNX(),PickedNY(),PickedNZ(),2)
							
						Else
							
							r\y=-2^32
							r\visible=False
							
						EndIf
						
						r\update=False
						
						; set entity properties
						ScaleEntity r\entity,r\scale,r\scale,r\scale
						RotateEntity r\entity,r\pitch,r\yaw,r\roll
						PositionEntity r\entity,r\x,r\y,r\z
	; Here Scale Collisions Rocks.					

btBodySetPosition (r\rocasPX, r\x,r\y,r\z)
						btBodySetScale( r\rocasPX%, r\scale,r\scale,r\scale)
					EndIf
					
					; update mesh color and alpha
					EntityColor r\entity,r\r,r\g,r\b
					EntityAlpha r\entity,a
					
					; show it!
					ShowEntity r\entity
					If r\scale<0.4 Then rgb=192*$10000
					
					visible=visible+1
					
					
				EndIf
				
			EndIf
			
;			x=((imagesize/2)+x)
;			y=((imagesize/2)+y)
			
			;If x<imagesize And y<imagesize Then WritePixelFast x,y,rgb,buff
			
		EndIf
		
	Next
	
	;UnlockBuffer buff
	
	;SetBuffer BackBuffer()
	
	Return DENSITY
	
End Function

If you placed more than 50 rocks, the program crashed and gives no more.


RemiD(Posted 2015) [#121]
Some suggestions :
->Try to use one low tris mesh for the "collidable" of each rock
->The static rocks do not need to be rigidbodies, they can be static collidables
->you can do a distance check each loop between the rover and each rock in this zone (a 100width*100depth zone maybe ?) and set only the nearest rocks as collidables.

This will decrease collisions/physics time greatly.


Yue(Posted 2015) [#122]
Someone said I , " What has to know and not try What to do what you do not know . "

I'll leave this without rocks , I think it's better that way rather I focus on what I can do.
:)




Krischan(Posted 2015) [#123]
No, rocks are cool and Yue, this is an easy one - done in 10 minutes. Check out my latest update of my mars rover:
http://www.blitzbasic.com/Community/posts.php?topic=104373#1264519

The collision check is done by finding the nearest rock close to the player and placing a dummy twin rock at its position where the collision is checked against. And the check is made each loop against ALL rocks in 0-1ms!!! So you could have thousands of rocks and only the player, the terrain and the nearest rock are checked for collision. The magic is done by this trick and make sure that the other rocks have no more Entitytype flag:

before the main loop:
; find nearest rock only collision mesh
Global near=LoadMesh(rockmodel)
EntityTexture near,rocktex,0,0
UpdateNormals near
EntityFX near,1
EntityColor near,0,255,0
EntityBlend near,3
EntityType near,2

outside the rock update loop:
; reset nearest calculation
Local n#=0.0
Local n0# = 100000000.0
Local nearest.rock

inside the rock update loop (best after If x<imagesize And y<imagesize Then WritePixelFast x,y,rgb,buff and before the last Endif there)
; X
n=(r\x-cx)*(r\x-cx)

If n<n0 Then
	
	; Y
	n=n+((r\y-cy)*(r\y-cy))
	
	If n<n0 Then
		
		; Z
		n=n+((r\z-cz)*(r\z-cz))
		If n<n0 Then
			
			n0=n
			nearest=r
			PositionEntity near,nearest\x,nearest\y,nearest\z
			ScaleEntity near,nearest\scale*2,nearest\scale*2,nearest\scale*2
			RotateEntity near,nearest\pitch,nearest\yaw,nearest\roll
			
		EndIf
		
	End If
	
End If


This is what I've meant with "efficiency". Only calculate what needs to be calculated. And we only need one rock. Ok, if there are many rocks close together you must perhaps check more than one rock which makes it more complex but it can still be done like this. But you can avoid this extra amount of time if the rocks are not so close together. Fake where you can fake. It only must look like reality, it musn't be like reality. Like in a theater.


Yue(Posted 2015) [#124]


I've already put the arm on Mars explorer.

Edit:
@Krischan
Incredible, really do you usually be that easy ?, which I am far from being a programmer, again I appreciate your help, and I look at the code.

Thank you very much.

Best Regard.


Yue(Posted 2015) [#125]
@Krischan

Friend 're a genius , really admire those capabilities.

Remembered my story with Blitz3D five years or so and feel that I have not learned anything.

I really appreciate your help, and remember you if you need a 3d model for your project like I can do it .

Thank you very much , I'm happy .

The stone is with the cube of red línes is the one activated for the collision.


https://www.facebook.com/iris3dgames

This scene has 1250 Rocks .

:)






Krischan(Posted 2015) [#126]
Good to see you got it running. Remember, this is so efficient that it only works if the rocks have a certain distance between them. Otherwise you must keep a list of all close rocks and add a collision flag to them and that makes it more complex / less efficient.

> if you need a 3d model for your project like I can do it .

That's actually a good idea. For my own space exploration game I'll need a model for a space ship and a terrain exploration vehicle like the Mako from the game Mass effect. It mustn't be too detailed. Only some kind of rover with enough space for

- a crew of 3-6 astronauts
- 6 wheels like the mars rover to access steep terrain
- or two large chaindrives outside the vehicle like a tank
- some kind of a laser cannon to fight/stun hostile alien creatures and animals
- the mineral driller can be below the vehicle or like an arm or something like that
- enough cargo space for mineral deposits (up to 100 tons for example)
- futuristic design, but the design should follow function

With the terrain vehicle you can drive around the planet surface, collect alien creatures or fight them, collect mineral deposits and explore ruins. The terrain vehicle could look like that or different, but I think it must be a little bit larger than in this picture:


My global concept for a space ship so far: the main space ship will be a much larger vessel capable of travelling between the star systems. It mustn't be streamlined as its a space ship. But the front of the ship can be detached for plantery landings while the larger section remains in orbit, here is for example the ship design from the game Starflight 1, a large and very long interstellar space ship with a cockpit section, followed by a cargo section and the large hyperspace main engines and the weapons:



But in my game, the detachable front section could look like a super space shuttle (atmospheric landings!), for example like this one from the movie "Armageddon" or like other shuttle concepts like the X-33 but the engines must be placed different then:





And attached to or inside of this drop ship, the terrain vehicle can be detached again to drive around, perhaps like the Carryall in Dune 2:



So you can land on all kinds of planets with different sizes and mustn't land with the large ship which will be difficult due its huge mass. Think about the movie "Aliens" where they already had such a three-stage concept when they landed on LV-426:




Yue(Posted 2015) [#127]
Hi, I have started to work, I hope to fulfill your expectations.









This is my prototype developed in FragMotion.
Very simple, and missing some Sizes and later move to its textured.

I would like to know your opinion and suggestions to make changes or if instead this correctly according to your expectations.

Best Regard.


Yue(Posted 2015) [#128]
Working in the detail of the tires. :)



Wolf1870(Posted 2015) [#129]
There are countless opportunities to expand your class program.
Do you have any ideas yourself???


Yue(Posted 2015) [#130]


New options in the game launcher, where you can specify a new resolution for shade and amount of rocks on the ground, 50, 500, 1250, 2500 and new res screen.


Edit:
@Wolf1870
Sorry, you can not understand your question, I use google translator, you could do it again?

Best Regard.


Krischan(Posted 2015) [#131]
Yue, your rover looks good! For steep terrain access I'd suggest to put the wheels more outside that they can move in a Y vector, too. Take a look here what I mean: http://www.mocpages.com/moc.php/43765

But don't hurry, I would need such a model in a few months, at the earliest. First priority is your game.


Yue(Posted 2015) [#132]






Do not worry, when you need me know, modeling for me is much easier to write code and it only took about 20 minutes. Although I have to improve abilities to create textures.

When you need models let me know :)

About my game has begun stage make this as neat as possible, organize your code, add comments and display the most beautiful possible to make it easy to maintain. :)


Rick Nasher(Posted 2015) [#133]
@Yue: Great model.
@Krischan: funny how we all come up with similar ideas when comes to space. I was originally looking for a model of a scramjet like ship, such as the X-30, X-33, X-43 or an x-51 to put in there but couldn't find a suitable 3d model quick enough, so for time being I quickly assembled the Space Shuttle parts to a NASA model(doors, rockets etc) and stuck the textures to it. So that's why it's flying that fast. :-)


Yue(Posted 2015) [#134]
This leads me to think that much easier to do a project if two, three or more persons, each has certain capabilities that a small working group can focus on achieving an objective meet.

It may sound very atravida the question: Why do not we together a project on mars?

Eventually a popular saying in my Spanish language goes something like this: "Many Indian chief, and few workers."

A greeting.


Rick Nasher(Posted 2015) [#135]
Sounds like a good and tempting idea and I would like to, but:
1) I've got a lot too learn, not sure how I could actually be of much help,
besides having a lot of idea's.
2) I have like 5 projects running already for which I do not have enough time to work on next to my daytime job.
3) With this comes that I have an eye condition that prevents me from looking at LCD screens constantly. This greatly slows me down from time to time.

So in the end I'm not sure what and how much I would actually be able to contribute to the project. But thanks for your offer though. I'll try help with and whenever I can.


Yue(Posted 2015) [#136]


trying to earn as possible some performance. :)


Rick Nasher(Posted 2015) [#137]
You seem like a very capable modeler Yue. Happy Easter.


Yue(Posted 2015) [#138]
@Rick Nasher, Hey if you need a model I can do for you in my free time. :)


Rick Nasher(Posted 2015) [#139]
Thanks I'll keep it mind. Not needed yet, but in the future I may ask you for a favor. :-)