Sorry your browser is not supported!

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

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

AppGameKit Classic Chat / [STICKY] Some usefull 2D and 3D tools effects and snippets

Author
Message
fubarpk
Retired Moderator
16
Years of Service
User Offline
Joined: 11th Jan 2005
Location: Adelaide
Posted: 27th Jan 2021 12:42
Thanks scraggle somehow i knew you would be the one to know the simplified math
with your distance squared algorithym does that mean in relation of an object being inside a 10 by 10 grid would it return 100

fubarpk on Itch...………...https://fubarpk.itch.io/
fubarpk on googleplay..https://play.google.com/store/apps/developer?id=fubarpk
Scraggle
Moderator
17
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 27th Jan 2021 12:53 Edited at: 27th Jan 2021 14:18
Not necessarily but if it was exactly 10.0 units away then it would return 100.0 which is why I said you should check your distance against a squared value instead.

If you are in a fixed 2D grid and can only travel vertically or horizontally then you should use the Manhattan Distance (or Taxi-Cab Distance) check instead.

Manhattan distance is so called because it is the distance you would have to travel on roads in Manhattan which are all horizontal or vertical and you obviously can't travel in a straight line because ... buildings.


Using the example coordinates from the previous post: (0, 0, 1, 2)
GetDistance2D(0, 0, 1, 2)
returns 2.36

GetManhattanDistance(0, 0, 1, 2)
returns 3 because you have to traverse 3 squares (Two vertically plus one horizontally)

There is also the Chebeshev Distance which returns the maximum distance on any axis in a 2D grid.
Because of how it works I prefer to think of it as the MaxGridDistance

Attachments

Login to view attachments
fubarpk
Retired Moderator
16
Years of Service
User Offline
Joined: 11th Jan 2005
Location: Adelaide
Posted: 29th Jan 2021 22:22
Thanks Scraggle very handy,

Something thats very handy for coders i feel and worth a mention if youve overwritten your source file
doesnt always work tho unfortunately

Step 1. Open Windows Explorer and find the folder where the file was located in.

Step 2. Right-click anywhere inside this folder and select "Properties".

Step 3. Select the "Previous Versions" tab. Look for an earlier version of the overwritten file and restore from it.


fubarpk on Itch...………...https://fubarpk.itch.io/
fubarpk on googleplay..https://play.google.com/store/apps/developer?id=fubarpk
blink0k
Moderator
8
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 6th Feb 2021 21:02 Edited at: 6th Feb 2021 21:24
To determine if you are running in debug (Windows only but there's probably a similar structure in mac i would imagine)
Ortu
DBPro Master
13
Years of Service
User Offline
Joined: 21st Nov 2007
Location: Austin, TX
Posted: 11th Feb 2021 01:35
Quote: "Something thats very handy for coders i feel and worth a mention if youve overwritten your source file
doesnt always work tho unfortunately

Step 1. Open Windows Explorer and find the folder where the file was located in.

Step 2. Right-click anywhere inside this folder and select "Properties".

Step 3. Select the "Previous Versions" tab. Look for an earlier version of the overwritten file and restore from it.
"


I think you have to have enabled backups for this.

Better yet, use git, preferably with a remote on a separate device and/or location
http://games.joshkirklin.com/sulium

A single player RPG featuring a branching, player driven storyline of meaningful choices and multiple endings alongside challenging active combat and intelligent AI.
fubarpk
Retired Moderator
16
Years of Service
User Offline
Joined: 11th Jan 2005
Location: Adelaide
Posted: 24th Mar 2021 17:14
Another terrain creator
This one may be suitable for those that want a low poly retro feel to a game
No media required
1> w a s d/shift move camera (camera needs work)
2> space saves
the file will save to a location of your choice but you meed a file that exists there first ie dummy.obj
the program will then save dummy.obj and dummy.mtl at that location
3> you may wish to bring into a program like blender to weld close verts etc effectively shrinking the file size
USE AT OWN RISK



fubarpk on Itch...………...https://fubarpk.itch.io/
fubarpk on googleplay..https://play.google.com/store/apps/developer?id=fubarpk
fubarpk
Retired Moderator
16
Years of Service
User Offline
Joined: 11th Jan 2005
Location: Adelaide
Posted: 24th Mar 2021 17:14 Edited at: 24th Mar 2021 21:23
Another terrain creator
This one may be suitable for those that want a low poly retro feel to a game
No media required
1> w a s d/shift move camera (camera needs work)
2> space saves
the file will save to a location of your choice but you meed a file that exists there first ie dummy.obj
the program will then save dummy.obj and dummy.mtl at that location
3> you may wish to bring into a program like blender to weld close verts etc effectively shrinking the file size
USE AT OWN RISK



fubarpk on Itch...………...https://fubarpk.itch.io/
fubarpk on googleplay..https://play.google.com/store/apps/developer?id=fubarpk

Login to post a reply

Server time is: 2021-04-11 00:15:22
Your offset time is: 2021-04-11 00:15:22