Author Topic: Your first programs  (Read 19326 times)

0 Members and 1 Guest are viewing this topic.

Offline AGVolnutt

  • LV3 Member (Next: 100)
  • ***
  • Posts: 58
  • Rating: +4/-0
    • View Profile
Re: Your first programs
« Reply #60 on: May 28, 2011, 08:40:08 pm »
[insert nspire header here]
disp "POKE POKE POKE HER FACE"
EndPrgm.

It did nothing but print "POKE POKE POKE HER FACE".

Ashbad

  • Guest
Re: Your first programs
« Reply #61 on: May 28, 2011, 09:23:14 pm »
I'm now gonna expand this to any computer related languages as well :)

z80 assembly: first program for this was my really screwed up hello world program:

Code: [Select]
LD A,"Hello, World!"
OUT A
RET

I did this before reading past page 2 of the 28 days tutorial :P


Lua: I made a simple 3D game using LOGL, an OpenGL wrapper for Lua, and I am actually quite sad because I'm failing at finding a source example (or even an executable source file :/)

C/C++: A dysfunctional hello world program.  No code example needed :P

Java: I actually learned enough about Java in 2 days and then took over for a week or two as our FIRST Robotic's FRC head robot programmer, and the source file(s) are way too long, it had >150 netbeans class files, each one at least on the average 300 lines.  No true example, but as a hint it took 300 lines in the FRC_Main.java file to instantiate all of the instances like jaguars and solenoids and 50 other types of mechanical stuff x.x

Ruby: My really overdone quadratic solver that proved I'm a Ruby Tool:

Code: [Select]
Qvalue = lambda {|a, b, c|
  Qlambda = lambda{|a, b, c, plus|
    if plus; -b + Math.sqrt(b**2-(4*a*c)).div(2*a)
    else;-b - Math.sqrt(b**2-(4*a*c)).div(2*a);end
  }
  if a == 0;nil;else
    [Qlambda.call(a,b,c,true),Qlambda.call(a,b,c,nil)];end }

Args = Array.new(3);Names = ['A','B','C']

3.times do |location|
  puts "Input: " << Names[location] << "?"
  Args[location] = gets.chomp;end
Ans = Qvalue.call(Args[1].to_f.to_r,Args[2].to_f.to_r,Args[3].to_f.to_r)

if Ans;puts 'Answer is ' << Ans[0].to_s << ' and ' << Ans[1].to_s << ' '
else;puts 'No Real Answers';end

Damn that was fun to code :P

Prizm C While it's not a different language than C, it was my first honest attempt at trying to learn C, two years after the previous failure with C/C++.  My first routine ever made was a somewhat-decently done routines that draws an Alpha-Coded sprite to the screen:

Code: [Select]
void AlphaSprite(short* data, int x, int y, int width, int height, char alpha) { 
   short* VRAM = (short*)0xA8000000;
   int CurColor = 0; 
   VRAM += (LCD_WIDTH_PX*y)+x;
   for(int j=y; j<y+height; j++) { 
      for(int i=x; i<x+width;  i++) { 
        CurColor = (*(VRAM) + (alpha*(*(data++))/256))/2;
        *(VRAM++) = CurColor % (65536);
      } 
      VRAM += (LCD_WIDTH_PX-width); 
   } 
}

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: Your first programs
« Reply #62 on: May 28, 2011, 11:07:24 pm »
My first ASM program basically said "THIS PROGRAM WILL NOT QUIT UNLESS YOU PRESS THE RIGHT BUTTON >:D" until you pressed the RIGHT button :P

My first Java program was a tic-tac-toe applet. I wrote it on paper because I didn't have access to a computer at the time. Never actually found out if it worked or not. Probably not.

My first Python program is DThought up there in Omnom ^^




Offline ruler501

  • Meep
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2475
  • Rating: +66/-9
  • Crazy Programmer
    • View Profile
Re: Your first programs
« Reply #63 on: May 28, 2011, 11:50:20 pm »
My first on paper program was a python/C++ hybrid. I need to stop doing that it breaks things a lot, but it is a ncie exceptionally powerful idea
I currently don't do much, but I am a developer for a game you should totally try out called AssaultCube Reloaded download here https://assaultcuber.codeplex.com/
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCM/CS/M/S d- s++: a---- C++ UL++ P+ L++ E---- W++ N o? K- w-- o? !M V?
PS+ PE+ Y+ PGP++ t 5? X R tv-- b+++ DI+ D+ G++ e- h! !r y

Offline ben_g

  • Hey cool I can set a custom title now :)
  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1002
  • Rating: +125/-4
  • Asm noob
    • View Profile
    • Our programmer's team: GameCommandoSquad
Re: Your first programs
« Reply #64 on: June 04, 2011, 06:14:12 pm »
My first basic programs were just some random basic commads to see what they did...
My first real basic program was a maze game, which was lost when i had to reset my calc at my exam :(

For my first real asm program: I'm trying to port a 3D engine that i made in GML to ASM
My projects
 - The Lost Survivors (Unreal Engine) ACTIVE [GameCommandoSquad main project]
 - Oxo, with single-calc multiplayer and AI (axe) RELEASED (screenshot) (topic)
 - An android version of oxo (java)  ACTIVE
 - A 3D collision detection library (axe) RELEASED! (topic)(screenshot)(more recent screenshot)(screenshot of it being used in a tilemapper)
Spoiler For inactive:
- A first person shooter with a polygon-based 3d engine. (z80, will probably be recoded in axe using GLib) ON HOLD (screenshot)
 - A java MORPG. (pc) DEEP COMA(read more)(screenshot)
 - a minecraft game in axe DEAD (source code available)
 - a 3D racing game (axe) ON HOLD (outdated screenshot of asm version)

This signature was last updated on 20/04/2015 and may be outdated

Offline ruler501

  • Meep
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2475
  • Rating: +66/-9
  • Crazy Programmer
    • View Profile
Re: Your first programs
« Reply #65 on: June 04, 2011, 06:16:23 pm »
My first Basic game was a space invaders like program. It actually ran pretty well
I currently don't do much, but I am a developer for a game you should totally try out called AssaultCube Reloaded download here https://assaultcuber.codeplex.com/
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCM/CS/M/S d- s++: a---- C++ UL++ P+ L++ E---- W++ N o? K- w-- o? !M V?
PS+ PE+ Y+ PGP++ t 5? X R tv-- b+++ DI+ D+ G++ e- h! !r y

Offline ben_g

  • Hey cool I can set a custom title now :)
  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1002
  • Rating: +125/-4
  • Asm noob
    • View Profile
    • Our programmer's team: GameCommandoSquad
Re: Your first programs
« Reply #66 on: June 04, 2011, 06:24:40 pm »
My maze game also worked pretty well. It was one of my two(yes, only 2) basic games that actually got finished. (most of them were lost when i had to reset my calc and i didn't knew you could transfer programs to your PC back then.
My projects
 - The Lost Survivors (Unreal Engine) ACTIVE [GameCommandoSquad main project]
 - Oxo, with single-calc multiplayer and AI (axe) RELEASED (screenshot) (topic)
 - An android version of oxo (java)  ACTIVE
 - A 3D collision detection library (axe) RELEASED! (topic)(screenshot)(more recent screenshot)(screenshot of it being used in a tilemapper)
Spoiler For inactive:
- A first person shooter with a polygon-based 3d engine. (z80, will probably be recoded in axe using GLib) ON HOLD (screenshot)
 - A java MORPG. (pc) DEEP COMA(read more)(screenshot)
 - a minecraft game in axe DEAD (source code available)
 - a 3D racing game (axe) ON HOLD (outdated screenshot of asm version)

This signature was last updated on 20/04/2015 and may be outdated

Offline ruler501

  • Meep
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2475
  • Rating: +66/-9
  • Crazy Programmer
    • View Profile
Re: Your first programs
« Reply #67 on: June 04, 2011, 06:28:15 pm »
I lost my game when I upgrade my Nspires OS to 3.0.1(with TNOC thankfully). I also lost my factorization(optimized brute force) and prime finder(Fermats Theorem) program
I currently don't do much, but I am a developer for a game you should totally try out called AssaultCube Reloaded download here https://assaultcuber.codeplex.com/
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCM/CS/M/S d- s++: a---- C++ UL++ P+ L++ E---- W++ N o? K- w-- o? !M V?
PS+ PE+ Y+ PGP++ t 5? X R tv-- b+++ DI+ D+ G++ e- h! !r y

Offline pianoman

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 426
  • Rating: +24/-0
  • ♪♫ ♪♫ ♪♫ ♪♫ ♪♫ ♪♫ ♪♫
    • View Profile
Re: Your first programs
« Reply #68 on: June 04, 2011, 06:34:02 pm »
My first program for calc was an Nspire blackjack game... it actually wan't too bad.

Offline ben_g

  • Hey cool I can set a custom title now :)
  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1002
  • Rating: +125/-4
  • Asm noob
    • View Profile
    • Our programmer's team: GameCommandoSquad
Re: Your first programs
« Reply #69 on: June 04, 2011, 06:38:50 pm »
this was my first screenshot made from the calculator. It's one from my second basic game that ever finished, and the best basic program i ever made.
« Last Edit: June 04, 2011, 06:39:41 pm by ben_g »
My projects
 - The Lost Survivors (Unreal Engine) ACTIVE [GameCommandoSquad main project]
 - Oxo, with single-calc multiplayer and AI (axe) RELEASED (screenshot) (topic)
 - An android version of oxo (java)  ACTIVE
 - A 3D collision detection library (axe) RELEASED! (topic)(screenshot)(more recent screenshot)(screenshot of it being used in a tilemapper)
Spoiler For inactive:
- A first person shooter with a polygon-based 3d engine. (z80, will probably be recoded in axe using GLib) ON HOLD (screenshot)
 - A java MORPG. (pc) DEEP COMA(read more)(screenshot)
 - a minecraft game in axe DEAD (source code available)
 - a 3D racing game (axe) ON HOLD (outdated screenshot of asm version)

This signature was last updated on 20/04/2015 and may be outdated

Offline ruler501

  • Meep
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2475
  • Rating: +66/-9
  • Crazy Programmer
    • View Profile
Re: Your first programs
« Reply #70 on: June 04, 2011, 06:40:32 pm »
I've never made a screenie from my calc. I think I might have made one from wabbitemu but I lost that when I wiped out my windows install
I currently don't do much, but I am a developer for a game you should totally try out called AssaultCube Reloaded download here https://assaultcuber.codeplex.com/
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCM/CS/M/S d- s++: a---- C++ UL++ P+ L++ E---- W++ N o? K- w-- o? !M V?
PS+ PE+ Y+ PGP++ t 5? X R tv-- b+++ DI+ D+ G++ e- h! !r y

Offline AngelFish

  • Is this my custom title?
  • Administrator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3242
  • Rating: +270/-27
  • I'm a Fishbot
    • View Profile
Re: Your first programs
« Reply #71 on: June 04, 2011, 06:54:49 pm »
My first TI-BASIC program: A mathematical simulation of Brownian motion/Random walk. Horribly coded.
My first Axe program: A 1-D cellular automata generator. Very slow, because I updated the screen after Every. Single. Pixel.
My first Prizm Program: A program to test overclocking. It almost bricked z80man's Prizm :D
∂²Ψ    -(2m(V(x)-E)Ψ
---  = -------------
∂x²        ℏ²Ψ

Offline ruler501

  • Meep
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2475
  • Rating: +66/-9
  • Crazy Programmer
    • View Profile
Re: Your first programs
« Reply #72 on: June 04, 2011, 06:57:15 pm »
wow Qwerty I scared to use your programs now
I currently don't do much, but I am a developer for a game you should totally try out called AssaultCube Reloaded download here https://assaultcuber.codeplex.com/
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCM/CS/M/S d- s++: a---- C++ UL++ P+ L++ E---- W++ N o? K- w-- o? !M V?
PS+ PE+ Y+ PGP++ t 5? X R tv-- b+++ DI+ D+ G++ e- h! !r y

Offline Quigibo

  • The Executioner
  • CoT Emeritus
  • LV11 Super Veteran (Next: 3000)
  • *
  • Posts: 2031
  • Rating: +1075/-24
  • I wish real life had a "Save" and "Load" button...
    • View Profile
Re: Your first programs
« Reply #73 on: June 04, 2011, 08:44:05 pm »
My first complete program in most programming languages is generally a Mandelbrot Set program, unless I'm taking a class on a new language, then its whatever the first assignment is.
___Axe_Parser___
Today the calculator, tomorrow the world!

Offline ruler501

  • Meep
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2475
  • Rating: +66/-9
  • Crazy Programmer
    • View Profile
Re: Your first programs
« Reply #74 on: June 04, 2011, 08:55:28 pm »
I usually will right math programs now first(my C++/BASIc/Lua programs were all math)
C++=base conversion supporting all real numbers in the range {2,10}
Basic=Brute force factorization
Lua=prime testing
I currently don't do much, but I am a developer for a game you should totally try out called AssaultCube Reloaded download here https://assaultcuber.codeplex.com/
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCM/CS/M/S d- s++: a---- C++ UL++ P+ L++ E---- W++ N o? K- w-- o? !M V?
PS+ PE+ Y+ PGP++ t 5? X R tv-- b+++ DI+ D+ G++ e- h! !r y