Phong shading! Still not using deprecated APIs! Now with free screen recorder lag!
[media]http://www.youtube.com/watch?v=70iPM71U_1I[/media]
[url=http://pastie.org/private/altp5gtsdydnwvtnuv7og]Current API[/url]
[QUOTE=Zoey Artyom;27707263]
[QUOTE=R0ck4x3;27695636]I think it'd be cool if you had it display the head of the player's model, but regardless it still sounds good and I do like your stuff so I might give this a go when my Gmod installation is back to snuff.[/QUOTE]I would love to do that by taking screenshots of the player, But sadly i cant. Because the player models are in no way high enough quality to mess around with in .net
In other words, It looks sorta bad.[/QUOTE]
:psypop:
(from a gmod HUD thread)
[QUOTE=CarlBooth;27918238][code]
class Dog
{
string _nameOfDog;
int _ageOfDog;
public string Name
{
get { return _nameOfDog; }
set { _nameOfDog = value; }
}
public int Age
{
get { return _ageOfDog; }
set { _ageOfDog = value; }
}
public void HappyBirthdayDog()
{
_ageOfDog++;
}
}
[/code]
Then in your form:
[code]
Dog Doggie = new Dog();
private void button1_Click(object sender, EventArgs e)
{
Doggie.Name = txtName.Text;
Doggie.Age = Convert.ToInt32(txtAge.Text);
}
private void btnAge_Click(object sender, EventArgs e)
{
Doggie.HappyBirthdayDog();
MessageBox.Show("Jasper is now: " + Doggie.Age.ToString() + " years old.");
}
[/code]
On my form there are 2 text boxes, txtName and txtAge and 2 buttons, button1 and btnAge[/QUOTE]
Well basically what I am trying to do is this in the class:
(This is not in a seperate class but in the form1.cs)
[csharp]
private void refSearchBtn_Click(object sender, EventArgs e)
{
referenceTB.Text = "";
if ((referenceTB.Text == "body") || (referenceTB.Text == "<body>"))
{
refSearchLabel.Text = "Every object or group needs to be inside a body tag.";
}
else
{
refSearchLabel.Text = "Use search reference (above) and info will appear here!";
}
}
[/csharp]
Pictures of what this does.
[media]http://i455.photobucket.com/albums/qq280/MooMooUdder/uboxeditorsearch1.png[/media]
[media]http://i455.photobucket.com/albums/qq280/MooMooUdder/uboxeditorsearch2.png[/media]
[media]http://i455.photobucket.com/albums/qq280/MooMooUdder/uboxeditorsearch3.png[/media]
[QUOTE=limitofinf;27921095]Hey,
I saw your maze generators, and with another bored day at school:
[img_thumb]http://filesmelt.com/dl/maze_gen_2.png[/img_thumb]
(excuse the shitty quality - I used my scanner; hopefully, it is visible enough for demonstration)
It didn't finish because it maxed out L1's dimensions; I need to make it switch to L2 when L1 is filled up.
That said, it took an insane amount of effort to get it to fill up anything bigger than 20x20. My initial version (recursive) ran out of memory at anything bigger than 20x20. I wrote an iterative version, and that ran out of memory at anything bigger than 30x30. I further optimized it by combining several variables into a single float (every float has 11 digits of precision, IIRC), saving an insane amount of memory and running up to 60x60 relatively fine.
Writing cool programs on the TI-83 is insanely difficult, yet oddly rewarding if you're capable of making it work :v:. Just for comparison, the current version took me the whole school day to write (screw boring school classes), whereas a console Java version took me literally 10 minutes.[/QUOTE]
Kind of reminds me of John Carmack and when he started developing game, how he had to hack around all kinds of things to get stuff running on the hardware he had.
Hey,
[QUOTE=Xeon06;27922449]Kind of reminds me of John Carmack and when he started developing game, how he had to hack around all kinds of things to get stuff running on the hardware he had.[/QUOTE]
Ha, yes, indeed. I just edited my post; I managed to get the full-size maze working.
[QUOTE=Richy19;27919664]Dont know where but i read that you shouldnt attempt to make openGL contexts in linux as its very low level stuff, is this true?[/QUOTE]
That is not true at all. Here's some code for X11:
[cpp]GLXContext context = glXCreateContext( display, vi, None, true );
glXMakeCurrent( display, window, context );[/cpp]
Got my HTC Desire last Wendesday (upgraded from an AAAANCIENT [url=http://www.phonestore.ie/images/6230ibla-large_000.jpg]6230i[/url]), started learning the language and api (didn't know Java at all before, and obviously therefore not android's API) and started developing on it almost instantly. I'm a fairly fast learner from all my previous programming languages though, so the starting steps were really easy, and the programming language doesn't really seem like that big a challenge to me.
[media]http://www.youtube.com/watch?v=17tRSDU1HaU[/media]
It's a remake of my flashgame, "The Blockfather". The meaning is to remove the - and + on the top (speed), and replace it with a slider on the left, so you can control the game with two thumbs, and obviously add collision detection and highscores like in the original game.
Only click this if you want to see a shitty "My first OpenGL Program" image.
Coming with its own model format (no textures or even colors yet)
[url]http://img8.imageshack.us/img8/8725/openglf.png[/url]
Oh you! You made me lost the game with your image!!
[QUOTE=h2ooooooo;27922879]Got my HTC Desire last Wendesday (upgraded from an AAAANCIENT [url=http://www.phonestore.ie/images/6230ibla-large_000.jpg]6230i[/url]), started learning the language and api (didn't know Java at all before, and obviously therefore not android's API) and started developing on it almost instantly. I'm a fairly fast learner from all my previous programming languages though, so the starting steps were really easy, and the programming language doesn't really seem like that big a challenge to me.
[media]http://www.youtube.com/watch?v=17tRSDU1HaU[/media]
It's a remake of my flashgame, "The Blockfather". The meaning is to remove the - and + on the top (speed), and replace it with a slider on the left, so you can control the game with two thumbs, and obviously add collision detection and highscores like in the original game.[/QUOTE]
Why is there a helicopter lifting off in the background?
I thought I fixed the problem I was having with my A*. I had a value wrong when parsing the image (it was going through as RGBAA instead of RGBA).
I ran it again, it went about 20 steps and failed, printed the output file (which is now the same as the image instead a cluster fuck mess it was before :buddy:). I know it's in the actual A* now and I have a hunch on where it's going wrong.
[editline]7th February 2011[/editline]
Well, my hunch was wrong. Time to add a bunch of outputs telling what's screwing up...
Saw someone make a cool cloth simulator on Reddit, so I decided to try making my own in Love2D:
[img]http://i.imgur.com/ayj1y.png[/img]
[img]http://i.imgur.com/dYISY.png[/img]
[img]http://i.imgur.com/BYzz4.png[/img]
[img]http://i.imgur.com/WDnZA.png[/img]
Awesome!
I'm trying to write some physics for a platformer, so far I have the basic stuff down, but I having trouble with collisions. :saddowns:
Right now I just set an object's velocity to zero if it collides with something. What is the right thing to do?
I found this helpful [url]http://gafferongames.com/game-physics/[/url]
[QUOTE=ZenX2;27926693]Awesome!
I'm trying to write some physics for a platformer, so far I have the basic stuff down, but I having trouble with collisions. :saddowns:
Right now I just set an object's velocity to zero if it collides with something. What is the right thing to do?[/QUOTE]
You also have to move the object left/right or wherever it came from until it's free again.
[QUOTE=Naelstrom;27926747]I found this helpful [url]http://gafferongames.com/game-physics/[/url][/QUOTE]
You beat me to it, I was about to link there. As for your question, Zen, it depends on what sort of physics you are looking for. If it is just a basic platfomer, setting the velocity to zero should be fine. If you need something more advanced, check out the link Naelstrom posted, but remember that there is more than one good way of doing something. That article focuses on Runge-Kutta integration, but I've always preferred verlet integration for my purposes.
I'm trying to do more of the friction part, but I think I can do it on my own for now.
Cool, 900 posts.
[editline]7th February 2011[/editline]
Success!
So I'm part of a FIRST (For Inspiration and Recognition of Science and Technology) Robotics Competition team. We've been working for four or so weeks now, and I'm the only programmer on the team.
Normally, we have tankdrive--left joystick controls left wheels, right joystick controls right wheels. This year, we're doing some insane shit. We're doing OMNIDRIVE. Omnidrive is where each wheel has its own motor. But that's not all. This year, we have special wheels that allow the robot to [b]strafe[/b].
I had written the code to strafe in the second week but the robot wasn't ready to test. We finally got to test it right as we were closing up tonight.
[b]Our robot fucking strafes.[/b]
[editline]0[/editline]
I'll upload a video when we next meet on Wednesday.
I was going to work on my 3D game, but then I realized I don't have the source code for it anymore.
Now I literally have no idea what to create, and it seems to never work :frown:
God damn it, rating me dumb once again because I brought up 3D.
[QUOTE=geel9;27927249]So I'm part of a FIRST (For Inspiration and Recognition of Science and Technology) Robotics Competition team. We've been working for four or so weeks now, and I'm the only programmer on the team.
Normally, we have tankdrive--left joystick controls left wheels, right joystick controls right wheels. This year, we're doing some insane shit. We're doing OMNIDRIVE. Omnidrive is where each wheel has its own motor. But that's not all. This year, we have special wheels that allow the robot to [b]strafe[/b].
I had written the code to strafe in the second week but the robot wasn't ready to test. We finally got to test it right as we were closing up tonight.
[b]Our robot fucking strafes.[/b]
[editline]0[/editline]
I'll upload a video when we next meet on Wednesday.[/QUOTE]
I did that last year, except the rest of the team couldn't do anything. They had a chassis and wheels that weren't attached to a motor
"Robert, go program something!"
"But you guys haven't even finished building it, I don't know how it'll work or what configuration to set for the motor/servo controllers"
"I don't care, just do it."
:sigh:
We're thinking of forming a team at the end of this year so we have the summer to work (or something like that), except now project lead will be someone else who can actually organize. We never competed last year, ended up with a half-working featureless robot. They blamed my code for the robot not being able to turn when I set one motor speed to 0 so it could pivot. A month or two ago, we took the robot apart and realized that the wheels were really loose and had other issues, and my friends fixed it. Dug up and compiled old code without modification, it worked perfectly.
Oh yeah, and I really dislike NQC, there's just something about it...
[QUOTE=robmaister12;27927712]I did that last year, except the rest of the team couldn't do anything. They had a chassis and wheels that weren't attached to a motor
"Robert, go program something!"
"But you guys haven't even finished building it, I don't know how it'll work or what configuration to set for the motor/servo controllers"
"I don't care, just do it."
:sigh:
We're thinking of forming a team at the end of this year so we have the summer to work (or something like that), except now project lead will be someone else who can actually organize. We never competed last year, ended up with a half-working featureless robot. They blamed my code for the robot not being able to turn when I set one motor speed to 0 so it could pivot. A month or two ago, we took the robot apart and realized that the wheels were really loose and had other issues, and my friends fixed it. Dug up and compiled old code without modification, it worked perfectly.
Oh yeah, and I really dislike NQC, there's just something about it...[/QUOTE]
My team is acceptable. I'll be waiting on DriveTrain to finish with the robot so I can test something and Lucius (The name fits) will say "Go program something, Josh." I explain that I'm trying to do just that and...gah
But yeah, the biggest gripe is that we have [b]two different gear ratios[/b] for our wheels. We have one set of gear ratios for the top wheels and one for the bottom. Why? Well, we only have two motors with the same gear ratios, and we ordered some but they won't be here until after ship date. So I have to manually cut down the power to those two motors in the code. A huge hack, if I may say so myself.
But surprisingly, Omnidrive was not complex at ALL.
[editline]8th February 2011[/editline]
Although last year, which was my first year on the team, it was even worse. They'd expected me to write the code for the entire robot before the first week was up. I can do that, sure, but that's just unrealistic since I'd need to know exact specifications which they don't have yet.
Also, last year we used C++ which was fine. This year, the team leaders demanded we use LabVIEW. Have you seen LabVIEW? It's a fucking MESS. There's no way to write pretty code on it, and it's near impossible to look at a function and see what it does. Visual programming is awful.
[QUOTE=geel9;27927758]My team is acceptable. I'll be waiting on DriveTrain to finish with the robot so I can test something and Lucius (The name fits) will say "Go program something, Josh." I explain that I'm trying to do just that and...gah
But yeah, the biggest gripe is that we have [b]two different gear ratios[/b] for our wheels. We have one set of gear ratios for the top wheels and one for the bottom. Why? Well, we only have two motors with the same gear ratios, and we ordered some but they won't be here until after ship date. So I have to manually cut down the power to those two motors in the code. A huge hack, if I may say so myself.
But surprisingly, Omnidrive was not complex at ALL.
[editline]8th February 2011[/editline]
Although last year, which was my first year on the team, it was even worse. They'd expected me to write the code for the entire robot before the first week was up. I can do that, sure, but that's just unrealistic since I'd need to know exact specifications which they don't have yet.
Also, last year we used C++ which was fine. This year, the team leaders demanded we use LabVIEW. Have you seen LabVIEW? It's a fucking MESS. There's no way to write pretty code on it, and it's near impossible to look at a function and see what it does. Visual programming is awful.[/QUOTE]
C++ is not good for low level stuff like that.
[QUOTE=DevBug;27927869]C++ is not good for low level stuff like that.[/QUOTE]
Anything is better than Labview when you're trying to write code as a team.
Which isn't the case here but I still despise it.
[editline]8th February 2011[/editline]
And it's not even low-level; they built an API for us that works perfectly fine on C++.
[editline]8th February 2011[/editline]
I'm thinking of setting up a live stream of the build site just for the possibility of getting some award. There are so fucking many of them.
Probably a wrapper.
[QUOTE=DevBug;27927916]Probably a wrapper.[/QUOTE]
Probably. Do you know what LabVIEW is?
A visual programming language.
[QUOTE=DevBug;27927944]A visual programming language.[/QUOTE]
And it is awful.
My team just got out drive train working, and by god it is fast.
I'm one of three programmers, so far everything is going pretty well. We've only been working for about a week on programming, but most of it done already.
Luckily, I managed to convince the team to use C++ instead of labview, that I just couldn't stand the idea of using that.
[QUOTE=ZenX2;27928086]My team just got out drive train working, and by god it is fast.
I'm one of three programmers, so far everything is going pretty well. We've only been working for about a week on programming, but most of it done already.
Luckily, I managed to convince the team to use C++ instead of labview, that I just couldn't stand the idea of using that.[/QUOTE]
You fucking lucky guy. How did you do it? They would not listen to me. What kind of driving are you guys doing? What team number are you? How are you doing your minibot?
Most of my team is new, all but two members of last year's team graduated. The other programmers are beginners, so all I had to do is tell them it's easier and more powerful. We're using a type of six-wheel drive, which lets us drive on four wheels at a time, then spin on two wheels with almost no trouble. We don't have much to our minibot but three wheels that snap around the pole. As for my team number, I'm paranoid about my identity on the internet. I'm located in California, did pretty well in the Cal Games, too. The team Grant Immahara was on is pretty cool.
Sorry, you need to Log In to post a reply to this thread.