About Monkey 2 › Forums › General Discussion › Developing My Game
This topic contains 8 replies, has 4 voices, and was last updated by
cocon 1 year, 9 months ago.
-
AuthorPosts
-
June 15, 2017 at 3:26 pm #8753
I am a refugee in these forums poveniente of a missing city (blitzbasic.com) :D, and I have nowhere else to go. So I show you what I’m doing right now. The game is about a robot that lost its human friends as it enters the atmosphere of Mars. And after the accident has been expelled in an emergency capsule. The first target after the incident on the Red Planet is to get to the nearest shelter, as the only visual guide to accomplish this goal, can be guided by the vents from a base underground to reach the shelter. So the idea is to hurry up, as the dust storm is damaging your energy system and is crucial to your goal.







I highly appreciate the constructive criticism of seasoned programmers like you.
June 16, 2017 at 7:04 am #8765Looks good, it seems that it has potential. My estimations on this would be something about adding more details to the world, even the most simple low poly rocks would do.
But it depends on the mission goal, are you planning to create a full prototype from this? Or is it just for experiments?
June 17, 2017 at 4:06 am #8786Hello Cocon, thank you for your appreciation. I think you can do a lot of things to improve the scenario, but obviously I have no knowledge about how to do certain things.
For example you could put rocks, but the correct way is that a rock that is some distance away disappears and then appear in a range of 360 degrees in the distance of the player. This way we would have 100 rocks that follow the player. But I do not know how to do this.
So I try to focus on what I can do, a simple game based on my acquired knowledge.
About the mission is very simple and can be improving. Initially after the accident, there is a dust storm on the red planet, so the robot has to reach an underground complex and its only way to get to this point is through the visualization of ventilation points that protrude on the surface. The more time you expose yourself in the storm and fail to reach, your energy system is affected by dust and your energy goes down until you lose the game.
For now that is the first mmision, I plan to put background music and some sound in the steps of the player to release a demo. What I can offer is that other users can modify and improve the mission through scripts.
Best regard.
.
June 17, 2017 at 7:14 am #8788Don’t worry, knowledge is easy to acquire, you only need to take notes on what you want to do and then at some point you might find it somewhere in the internet. Asking at forums helps also because you can get direction on where to look.
For example the problem of the distance is solved like this.
http://www.blitzbasic.com/codearcs/codearcs.php?code=2739
If you are interested to use 3D distance, you can do this:
dx = x2 – x1
dy = y2 – y1
dz = z2 – z1
sqr(dx*dx + dy*dy + dz*dz)Keep up the good work!
June 17, 2017 at 12:24 pm #8793What language is this written in?
And what’s up with the low FPS? heheJune 19, 2017 at 2:59 am #8811Hi, @cocon.

What I am trying to do is for example 100 rocks follow the player. That the rocks that fade the distance fade and randomly appear outside the range and then be visualized. It would be the only viable way to flood the land with many rocks that only rendered close to the player, and that could look like thousands.
Monkey12345678910for stones:Tstones = eachin stones.listif xEntityDistance stones.stone, player > 50xHideEntity(stones.stone);Else' New position 360.End ifnextHi, @hezkore, it’s BlitzMax… and Fps low for my card graphics is bad.
June 19, 2017 at 3:04 am #8812Instead of blaming your graphics card maybe you should blame the number of particles you are drawing for your smoke effect
June 19, 2017 at 3:43 am #8813@Simon Armstrong,
The problem is not the number of particles, the bottleneck is produced by the system of shadows, and is not a complaint, only a presentation on what is a gs 7100 of 256 megs.
June 24, 2017 at 5:58 pm #8892Here is how it would work.
Monkey123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141#Import "<std>"#Import "<mojo>"Using std..Using mojo..Class MyWindow Extends WindowField items := New Vec2f[1000]Field TeleportDistance:Float = 200Field VisibleDistance:Float = 100Field VisibleDistanceFade:Float = 80Field speed:Vec2fMethod New()' create all of the itemsFor Local i := 0 Until items.LengthLocal item := New Vec2fitem.X = Rnd(-TeleportDistance, TeleportDistance)item.Y = Rnd(-TeleportDistance, TeleportDistance)items[i] = itemNextEndMethod OnRender(canvas:Canvas) Override' change position of the items and teleport themspeed *= 0.9If (Keyboard.KeyDown(Key.W)) Then speed.Y += 5If (Keyboard.KeyDown(Key.S)) Then speed.Y -= 5If (Keyboard.KeyDown(Key.A)) Then speed.X += 5If (Keyboard.KeyDown(Key.D)) Then speed.X -= 5For Local index := 0 Until items.LengthLocal item := items[index]item.X += speed.X * 0.05item.Y += speed.Y * 0.05If (item.X < -TeleportDistance) Then item.X = TeleportDistanceIf (item.X > TeleportDistance) Then item.X = -TeleportDistanceIf (item.Y < -TeleportDistance) Then item.Y = TeleportDistanceIf (item.Y > TeleportDistance) Then item.Y = -TeleportDistanceitems[index] = itemNext' start drawing stuffApp.RequestRender()canvas.Clear(Color.Black)' draw the visibility distancecanvas.PushMatrix()canvas.Translate(Width/2, Height/2)canvas.Color = New Color(0.1, 0, 0)canvas.DrawCircle(0, 0, VisibleDistance)canvas.PopMatrix()' draw all of the items' canvas.PushMatrix()' canvas.Translate(Width/2, Height/2)' For Local i := Eachin items' canvas.Color = Color.White' canvas.DrawRect(i.X, i.Y, 2, 2)' Next' canvas.PopMatrix()' draw all of the items within the visibility distance' canvas.PushMatrix()' canvas.Translate(Width/2, Height/2)' For Local i := Eachin items' If Distance(0, 0, i.X, i.Y) < VisibleDistance' canvas.Color = Color.White' Else' canvas.Color = Color.Grey' End' canvas.DrawRect(i.X, i.Y, 2, 2)' Next' canvas.PopMatrix()' draw all of the items but this time apply the visibility fadecanvas.PushMatrix()canvas.Translate(Width/2, Height/2)For Local i := Eachin itemsLocal distance := Distance(0, 0, i.X, i.Y)If distance < VisibleDistanceLocal visibility := Remap(distance, VisibleDistance, VisibleDistanceFade, 0.0, 1.0)If distance < VisibleDistanceFadevisibility = 1Endcanvas.Color = New Color(visibility, visibility, visibility)canvas.DrawRect(i.X, i.Y, 2, 2)EndNextcanvas.PopMatrix()EndEndFunction Distance:Float(x:Float, y:Float, x2:Float, y2:Float)Local dx := x2 - xLocal dy := y2 - yReturn Sqrt(dx * dx + dy * dy)EndFunction Remap:Float(value:Float, firstStart:Float, firstStop:Float, secondStart:Float, secondStop:Float)' For more information: http://monkeycoder.co.nz/forums/topic/math-remapvalue/Return secondStart + (secondStop - secondStart) * ((value - firstStart) / (firstStop - firstStart))EndFunction Main()New AppInstanceNew MyWindowApp.Run()End' Notes' ... canvas.Translate(Width/2, Height/2)' For presentation reasons I want to draw things to the centered of the screen' this is only a rendering matter, it does not affect how the coordinates of the system' work, which are within the limits of -TeleportDistance..TeleportDistance' ... If Distance(0, 0, i.X, i.Y) < VisibleDistance' Assuming that at position 0,0 is the player, and the i.X/Y is the item. -
AuthorPosts
You must be logged in to reply to this topic.