Right now, working on a basic calculator in Java:
Main:
[code]public class Main
{
public static void main(String[] args)
{
int first_num;
int second_num;
int added_together;
Calculator_method calc = new Calculator_method();
Scanner scan = new Scanner(System.in);
System.out.println("Enter first digit to add");
first_num = scan.nextInt();
System.out.println("Enter second digit to add");
second_num = scan.nextInt();
System.out.println("added together: " + calc.add(first_num,second_num));
}
}
[/code]
Calculator method class:
[code]
package tacopack;
public class Calculator_method
{
private int number_1;
private int number_2;
private int number_final;
public Calculator_method()
{
number_1 = 0;
number_2 = 0;
number_final = 0;
}
public int add(int firstnumber, int secondnumber)
{
number_1 = firstnumber;
number_2 = secondnumber;
number_final = number_1 + number_2;
return number_final;
}
}
[/code]
Also, would anyone know a good if statement that could tell if the number added is a decimal or not in the calculator method class? I was thinking of making a separate method specifically for a double and setting up an if and else statement in the main class, but if I can find a better way to set it up, I would do that.
[QUOTE=Titz;33426797]So seeing as I missed the post (if there was one) with information on this, what is it?[/QUOTE]
Me accidentally flooding my program with black goop in one click.
Also, water blending! (Water is not affected by light at the moment)
[img]http://puu.sh/9i0t[/img]
[editline]25 November 2011[/editline]
Now in video form!
[vid]http://dl.dropbox.com/u/8745051/facepunch/tilesV7%20water%20blending.webm[/vid]
This perfectly describes every big project ever:
[img]https://lh6.googleusercontent.com/-sEcXpY_dxKc/TsKg2cf7sqI/AAAAAAABkTk/skUdxSYMb9s/s1048/2011.11.15_life_of_a_swe.png[/img]
I'm done with my [i]FUCKING[/i] comp entry.
That post, with more info is [url=http://www.facepunch.com/threads/1140473?p=33428617&viewfull=1#post33428617]here[/url].
[quote]
[img]http://img443.imageshack.us/img443/3964/screen3di.jpg[/img] [img]http://img69.imageshack.us/img69/1946/screen1ec.jpg[/img] [img]http://img838.imageshack.us/img838/2279/screen2dd.jpg[/img]
[/quote]
[QUOTE=benji2015;33427918]Me accidentally flooding my program with black goop in one click.
Also, water blending! (Water is not affected by light at the moment)
img
[editline]25 November 2011[/editline]
Now in video form!
vid[/QUOTE]
Congratulations, my Son! This is what I've created you for!
[QUOTE=I am God.;33428659]Congratulations, my Son! This is what I've created you for![/QUOTE]
This is going to be interesting.
(but bed now. sleeping needs to happen some time)
[QUOTE=Austech2;33420991]For a while (about a month and a half?), I stopped coding because I felt like I needed to take a break for a while, I didn't want to get bored. And then I've worked on a few learning projects (mainly to get better at networking) that unfortunately never got finished. And then I ate a pizza yesterday.
I just got tired of posting projects that never got finished, or projects that eventually get dropped, but if you guys are fine with that then let me know and I'll be more active. :D[/QUOTE]
It's the "What Are You Working On" thread, not the "What Have You Finished".
Finishing your projects is not a requirement, so go ahead and post stuff! :D
[QUOTE=q3k;33376965]So I'm an arsehole and wrote a python program to download music from Grooveshark...
[img]http://i.imgur.com/INbcD.png[/img][/QUOTE]
Aaand here's the library, if anyone wants to play around with it: [url=https://github.com/SergeB/pythonshark]pythonshark[/url].
[QUOTE=Robber;33428583]This perfectly describes every big project ever:
[img]https://lh6.googleusercontent.com/-sEcXpY_dxKc/TsKg2cf7sqI/AAAAAAABkTk/skUdxSYMb9s/s1048/2011.11.15_life_of_a_swe.png[/img][/QUOTE]
Every single fucking time
I'm think I am going to buy a Texas Instruments microcontroller/microprocessor. And then program it in C. And why not integrate it with my bicycle to control lights and shit? The possibilities are endless.
[thumb]http://www.1337upload.net/files/IMG_0005.JPG[/thumb]
Got a free book! I thought it was going to be 'crap' like VB. But no, it's pascal. Not sure if pascal's any good, but they have this graph showing how it originated from the same root's as c++.
[thumb]http://www.1337upload.net/files/IMG_0014.JPG[/thumb]
which I think is wrong because I know C originated from B and that from BCPL. But anyway.
Also, it's got algoritms for making graphics:
[thumb]http://www.1337upload.net/files/IMG_0015.JPG[/thumb][thumb]http://www.1337upload.net/files/IMG_0016.JPG[/thumb]
Sorry for shitty phone cam.
In highschool (about 10 years ago) we learned Pascal, I thought it was great.
Then time passed by, I went to Uni and started using C,C++ and some other language and then in one course we used pascal for one of the assignments (it's a programming language course - so every assignment is written in a different language) and sucked so much.
Everything is hard, it's strictly typed it's ridicules.
Strict typing isn't a bad thing.
Long-ass road to rendering begins... 1117 lines just to set up the viewport, because I'm just going straight into it. Boilerplate code is still kinda interesting for me anyway.
[img]http://dl.dropbox.com/u/9038221/Rendering%20Engine/EngineWindow2_NowDX11.png[/img]
It's using DX11 too, no point using anything less really. Hopefully by the end of these tutorials I'll have learned enough to just keep adding features.
[QUOTE=ROBO_DONUT;33423197]How exactly are you handling switch statements. Generating a good mapping function for jump tables seems like it could be difficult.[/QUOTE]
If you are referring to how I compile the switch statements to asm, I haven't written that part yet. I'm not using jump tables, anyways (mostly because I don't know what a jump table is :v:).
[QUOTE=swift and shift;33425726]What if I want to do
[code]
switch(this.that) { ... }
[/code]
You should allow any arbitrary expression in your switch statement, not just a variable unless you want to create another PHP[/QUOTE]
Hmm, maybe you're right. It is pretty easy to change what the switch statement accepts as argument, so I might just change it to a statement instead of a single variable.
Thanks for the input, guys.
[QUOTE=Legend286;33430563]It's using DX11 too, no point using anything less really.[/QUOTE]
Except for blocking out a good 90% of video cards.
After a coding hiatus of about 5 months I decided to go back to C# with a new state of mind!
And I am wondering if it is a good one:
Basically I just want thinks to work, no abstraction at first, no optimization until it works and just get stuff done.
Perhaps a lot of you already think like that or something, but it took me quite some time to come to this. Before I got pretty obsessed with making everything perfect despite knowing that my skills were not good enough to actually do it, so some time later, often about a week later, my projects just got a huge clusterfuck and it wasn't fun anymore...
Anyway after getting used to C# again and relearning most of the things I forgot ( Functions names mostly ) I decided to make a simple vertical scrolling game we all have already played. And that just for the sake of getting something done, and until now I have already lots of fun!
[thumb]http://puu.sh/9iO1[/thumb]
I am using those sprites as placeholders for now.
[QUOTE=Legend286;33430563]Long-ass road to rendering begins... 1117 lines just to set up the viewport, because I'm just going straight into it. Boilerplate code is still kinda interesting for me anyway.
[img]http://dl.dropbox.com/u/9038221/Rendering%20Engine/EngineWindow2_NowDX11.png[/img]
It's using DX11 too, no point using anything less really. Hopefully by the end of these tutorials I'll have learned enough to just keep adding features.[/QUOTE]
What's that windows theme, I must have it.
[QUOTE=Mr.T;33429655]I'm think I am going to buy a Texas Instruments microcontroller/microprocessor. And then program it in C. And why not integrate it with my bicycle to control lights and shit? The possibilities are endless.[/QUOTE]
Are you thinking about getting the TI launchpad?
[QUOTE=Jookia;33430715]Except for blocking out a good 90% of video cards.[/QUOTE]
I mean for now, I can always add in lower support after I've got all the base code sorted out, I'd rather start at the top so that I have the broadest range of learning (how can I learn to do compute shaders etc if I'm using dx9?)
[QUOTE=Loli;33430794]What's that windows theme, I must have it.[/QUOTE]
Soft 7, by AP-Graphik.
[url]http://ap-graphik.deviantart.com/art/Soft7-2-0-161602097[/url]
Win8Orb black, by AP-Graphik.
[url]http://ap-graphik.deviantart.com/art/Win8-orb-black-edition-205020472[/url]
Token Icons, by ~brsev.
[url]http://brsev.deviantart.com/art/Token-128429570[/url]
There we go. Switch/case statements now support expressions instead of just a single variable. I also added highlighting in the console to get a better (or maybe even worse) overview.
[img_thumb]http://i.imgur.com/v11rQ.png[/img_thumb]
Here's the source code:
[code]
function bool main(int value1, int value2)
{
switch(value1 + value2 << 10)
{
case(10 + 16)
{
return true;
}
default()
{
return false;
}
}
if(value1 * value2 + 5 * (4-value1))
{
return true;
}
else
{
return false;
}
}
[/code]
I've also thought of a name. How does Lambda++ sound? It would be written Λ++.
^ Remove the ++ and just name it Lambda.
I guess this looks better.
[img]http://i.imgur.com/cZtWg.png[/img]
[QUOTE=icantread49;33426767]nope, you can't. if i end up creating geometry per-particle, i'll definitely take your suggestions :)[/QUOTE]
Honestly, no offense but your fire looks like ass. Just write an actual particle system, it's not going to kill your performance. Plenty of IOS/Android games render like Xbox quality shit, they can handle a few particles.
[QUOTE=Legend286;33430563]
It's using DX11 too, no point using anything less really.[/QUOTE]
I though to my self, woo can't wait to test that etc.
Then it struck me that I [I]still[/I] have a HD4*** Series.
[QUOTE=Jawalt;33431531]Honestly, no offense but your fire looks like ass. Just write an actual particle system, it's not going to kill your performance. Plenty of IOS/Android games render like Xbox quality shit, they can handle a few particles.[/QUOTE]
I think he just needs better sprites for his fire.
[QUOTE=benjojo;33431616]I though to my self, woo can't wait to test that etc.
Then it struck me that I [I]still[/I] have a HD4*** Series.[/QUOTE]
So do I.
My 4870 can still play anything I throw at it, though.
uh, unless it uses dx11, obviously. but that's never happened
[QUOTE=Mr.T;33431391]^ Remove the ++ and just name it Lambda.[/QUOTE]
Hmm, maybe. I just think the "++" is good to have there, because when people see the name they'll instantly know it's a programming language.
On another topic, what do you guys think looks best, lower case or upper case lambda? I personally like the upper case, since the lower case letter just screams half-life (to me, at least). I also find the upper case more visually pleasing.
Tell you what, let's vote over it:
[img]http://www.facepunch.com/fp/ratings/wrench.png[/img] for "Λ++"
[img]http://www.facepunch.com/fp/ratings/information.png[/img] for "Λ"
[img]http://www.facepunch.com/fp/ratings/zing.png[/img] for "λ++"
[img]http://www.facepunch.com/fp/ratings/palette.png[/img] for "λ"
[editline]lol[/editline]
Reply if you have any other suggestions.
Lower-case reminds me of lambda calculus which is not what you're doing.
So let's go with Λ
[QUOTE=Matte;33431908]Hmm, maybe. I just think the "++" is good to have there, because when people see the name they'll instantly know it's a programming language.
On another topic, what do you guys think looks best, lower case or upper case lambda? I personally like the upper case, since the lower case letter just screams half-life (to me, at least). I also find the upper case more visually pleasing.
Tell you what, let's vote over it:
[img]http://www.facepunch.com/fp/ratings/wrench.png[/img] for "Λ++"
[img]http://www.facepunch.com/fp/ratings/information.png[/img] for "Λ"
[img]http://www.facepunch.com/fp/ratings/zing.png[/img] for "λ++"
[img]http://www.facepunch.com/fp/ratings/palette.png[/img] for "λ"
[editline]lol[/editline]
Reply if you have any other suggestions.[/QUOTE]
name it DSOM
Sorry, you need to Log In to post a reply to this thread.