[QUOTE=Sporbie;15910845]It's kinda stupid to open up a new thread just for this, and this is almost like a chat thread so why not:
I need a formula to find out a normal vector to a line defined by two points (the points have x and y values). I assume a normal vector is the vector perpendicular to the line and of length 1. Google didn't help much.
Also there should be two normals to one line amirite?[/QUOTE]
Just cross it with a vector in the z direction, eg:
( x, y, 0 ) x ( 0, 0, 1 )
where x is the cross product.
And then you have to normalise the result. If you want the other normal for the line just cross it with ( 0, 0, -1 )
A vector has an infinitive amount of normals (at least in a >2D space).
And yes, normals don't have to be unitvectors.
To find one of the two in a 2D space, you can simply switch the x and y coordinates and negate one element != 0 (since you are in a 2D space :D).
Learning C++, using the best guide out there (according to some of the people I know)
Working on my website.
[url]http://www.clavusstudios.nl/index_new.php[/url]
[QUOTE=Sporbie;15910845]It's kinda stupid to open up a new thread just for this, and this is almost like a chat thread so why not:
I need a formula to find out a normal vector to a line defined by two points (the points have x and y values). I assume a normal vector is the vector perpendicular to the line and of length 1. Google didn't help much.
Also there should be two normals to one line amirite?[/QUOTE]
This is actually quite simple. Find the direction from one point to the other, and then rotate the vector 90 degrees: r90(x, y) -> (-y, x)
[code]
vec2 dir = point0 - point1;
vec2 perpendicular(-dir.y, dir.x);
[/code]
And then you can normalize it:
[code]
perpendicular.normalize();
[/code]
[QUOTE=Joerdgs;15911446]Working on my website.
[url]http://www.clavusstudios.nl/index_new.php[/url][/QUOTE]
not programming and looks like shit regardless
[highlight](User was permabanned for this post ("troll" - garry))[/highlight]
I got vector graphics working. I don't know how I'm going to do my borders between Green (Buildable) zones and Red (not buildable) zones.
[img]http://www.kylegar.net/stuff/ctdvectors.png[/img]
Got a basic calculator going for windows mobile. It's not much at all, but it still looks better than the default one. I'll probably get a scientific mode going, and then start work on skinning it to make it better looking.
[img]http://jivemasta.com/programs/JiveCalcScreen.PNG[/img]
.exe link(also works in windows)
[url]http://jivemasta.com/programs/JiveCalc.exe[/url]
.cab installer(for phones)
[url]http://jivemasta.com/programs/JiveCalcSetup.cab[/url]
[QUOTE=jivemasta;15912499]Got a basic calculator going for windows mobile. It's not much at all, but it still looks better than the default one. I'll probably get a scientific mode going, and then start work on skinning it to make it better looking.
[img]http://jivemasta.com/programs/JiveCalcScreen.PNG[/img]
.exe link(also works in windows)
[url]http://jivemasta.com/programs/JiveCalc.exe[/url]
.cab installer(for phones)
[url]http://jivemasta.com/programs/JiveCalcSetup.cab[/url][/QUOTE]
Nice and simple, looks good.
[QUOTE=Kylegar;15912426]I got vector graphics working. I don't know how I'm going to do my borders between Green (Buildable) zones and Red (not buildable) zones.
[img]http://www.kylegar.net/stuff/ctdvectors.png[/img][/QUOTE]
loving the coder design
[QUOTE=LICK MY SHITTER;15913024]loving the coder design[/QUOTE]
except it looks terrible and I'm not sure how to fix it. I think I'm going to remove the border between the red tiles, and make a bold red border for the green tiles
I love the bloom!
[QUOTE=Kylegar;15913582]except it looks terrible and I'm not sure how to fix it. I think I'm going to remove the border between the red tiles, and make a bold red border for the green tiles[/QUOTE]
Why aren't you using a background image and sprites for the objects?
[QUOTE=Pirate Ninja;15908002]Can i haz source? :3[/QUOTE]
I'm thinking about making this open source depending on how well it goes :). So if I muck it up and just not use it, then yeah sure :D.
[QUOTE=nos217;15917285]I'm thinking about making this open source depending on how well it goes :). So if I muck it up and just not use it, then yeah sure :D.[/QUOTE]
Cool. .D
There are no graphics there either, it's all just SDL rectangles.
Pretty cool.
I've been making a bit of progress on my maze game, here's some screen-shots I took of it in action.
- I've now got start and end flags
- A lot of the UI done (I'm not a photoshop genius so C&C welcome)
- Efficient level loading and saving. Level loading is instant and level saves don't go above 10KB. I've also got a system in place to read all .maz files (maps) from a specific folder and list them
- Particle effects for the sun and teleports.
1. Playing (player flags are little markers you can drop around the maze to help you navigate)
2. Editor
3. Main Menu
4. Map List (I need to parse the names properly at some point)
5. Win Screen (in progress, I'm working on high scores)
6. Particle system for teleports (currently halfway through getting this to work)
[img]http://filesmelt.com/Imagehosting/pics/cf4e6695d09d98a8e40975f7ef2b6974.png[/img]
[QUOTE=MADmarine;15918344]I've been making a bit of progress on my maze game, here's some screen-shots I took of it in action.
- I've now got start and end flags
- A lot of the UI done (I'm not a photoshop genius so C&C welcome)
- Efficient level loading and saving. Level loading is instant and level saves don't go above 10KB. I've also got a system in place to read all .maz files (maps) from a specific folder and list them
- Particle effects for the sun and teleports.
1. Playing (player flags are little markers you can drop around the maze to help you navigate)
2. Editor
3. Main Menu
4. Map List (I need to parse the names properly at some point)
5. Win Screen (in progress, I'm working on high scores)
6. Particle system for teleports (currently halfway through getting this to work)
picz[/QUOTE]
Looks pretty awesome.
[QUOTE=MADmarine;15918344]I've been making a bit of progress on my maze game, here's some screen-shots I took of it in action.
- I've now got start and end flags
- A lot of the UI done (I'm not a photoshop genius so C&C welcome)
- Efficient level loading and saving. Level loading is instant and level saves don't go above 10KB. I've also got a system in place to read all .maz files (maps) from a specific folder and list them
- Particle effects for the sun and teleports.
1. Playing (player flags are little markers you can drop around the maze to help you navigate)
2. Editor
3. Main Menu
4. Map List (I need to parse the names properly at some point)
5. Win Screen (in progress, I'm working on high scores)
6. Particle system for teleports (currently halfway through getting this to work)
[/QUOTE]
Nice man! Looking good, and pretty speedy development.
[QUOTE=r4nk_;15918475]Nice man! Looking good, and pretty speedy development.[/QUOTE]
Unemployment and boredom :v:
Nice dude :).
Awesome, going to release it when its done?
[QUOTE=ddrl46;15918729]Awesome, going to release it when its done?[/QUOTE]
Yeah I don't see why not, it'll be a while before I'm happy with it though.
[QUOTE=MADmarine;15918344]I've been making a bit of progress on my maze game, here's some screen-shots I took of it in action.[/QUOTE]
That looks pretty nice!
I'm working on some 2D platformer type game.
I've got alot of work to do though. Right now I've got the editor working. Now I just need to make all gameplay mechanics and such.
I can upload it if you want. It's a Java applet, so you simply try it out in the browser.
Here's the editor so far anyway: (The angles are there for debugging purposes, ignore them)
[img]http://files.getdropbox.com/u/99714/LineDrawing.jpg[/img]
Everything is bound to hotkeys right now; I'll probably make a more simple GUI for it later on.
I haven't implemented the features for loading foreground and background images yet either.
[QUOTE=MADmarine;15918344]I've been making a bit of progress on my maze game, here's some screen-shots I took of it in action.
- I've now got start and end flags
- A lot of the UI done (I'm not a photoshop genius so C&C welcome)
- Efficient level loading and saving. Level loading is instant and level saves don't go above 10KB. I've also got a system in place to read all .maz files (maps) from a specific folder and list them
- Particle effects for the sun and teleports.
1. Playing (player flags are little markers you can drop around the maze to help you navigate)
2. Editor
3. Main Menu
4. Map List (I need to parse the names properly at some point)
5. Win Screen (in progress, I'm working on high scores)
6. Particle system for teleports (currently halfway through getting this to work)
[/QUOTE]
You need to add a random maze generator. That would be awesome.
[QUOTE=Xeon06;15919712]You need to add a random maze generator. That would be awesome.[/QUOTE]
I would love to do that, but I have no idea how to do it :(
[QUOTE=MADmarine;15922263]I would love to do that, but I have no idea how to do it :([/QUOTE]
My friend tried it for his computing project (mine was a roller coaster simulator, his was a game where you made a robot complete a maze by giving it steps of what to do)
It didn't prove simple and there were all kinds of wierd patterns created. Good fun watching the patterns he came up with trying different algorithms though.
started my habbo 'clone' for experience.
[img]https://files.getdropbox.com/u/99765/1.png[/img]
I fucking love 2d arrays
Sorry, you need to Log In to post a reply to this thread.