Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 [2]

Author Topic: Your best code  (Read 4154 times)

Armok

  • Bay Watcher
  • God of Blood
    • View Profile
Re: Your best code
« Reply #15 on: December 27, 2009, 04:21:49 pm »

Huh? what do you mean "necessary"? It was in a game I were programming for fun, the entire project wasn't "necessary"!
Logged
So says Armok, God of blood.
Sszsszssoo...
Sszsszssaaayysss...
III...

eerr

  • Bay Watcher
    • View Profile
Re: Your best code
« Reply #16 on: December 27, 2009, 05:18:08 pm »

Huh? what do you mean "necessary"? It was in a game I were programming for fun, the entire project wasn't "necessary"!
I mean, isn't assembly hard?
Logged

qwertyuiopas

  • Bay Watcher
  • Photoshop is for elves who cannot use MSPaint.
    • View Profile
    • uristqwerty.ca, my current (barren) site.
Re: Your best code
« Reply #17 on: December 27, 2009, 06:02:11 pm »

If I understand the context, it wasn't pure assembly, but http://en.wikipedia.org/wiki/Linoleum_(programming_language).
Logged
Eh?
Eh!

Armok

  • Bay Watcher
  • God of Blood
    • View Profile
Re: Your best code
« Reply #18 on: December 27, 2009, 06:15:40 pm »

Qwertyuiopas got it right, yea. It still *is* a lot more of a hassle than more high level languages, but it's very much worth it, both being more fun to program and getting MASSIVELY better prestanda than even C.
Logged
So says Armok, God of blood.
Sszsszssoo...
Sszsszssaaayysss...
III...

eerr

  • Bay Watcher
    • View Profile
Re: Your best code
« Reply #19 on: December 27, 2009, 06:36:45 pm »

Qwertyuiopas got it right, yea. It still *is* a lot more of a hassle than more high level languages, but it's very much worth it, both being more fun to program and getting MASSIVELY better prestanda than even C.
For christmas, My brother bought me "The C [ANSI C] Programming Language"
Supposedly it is the best book about C. I need suggestions on what I should write.

Logged

Armok

  • Bay Watcher
  • God of Blood
    • View Profile
Re: Your best code
« Reply #20 on: December 27, 2009, 06:53:52 pm »

A raytracer.
Logged
So says Armok, God of blood.
Sszsszssoo...
Sszsszssaaayysss...
III...

eerr

  • Bay Watcher
    • View Profile
Re: Your best code
« Reply #21 on: December 27, 2009, 07:13:28 pm »

A raytracer.
A raytracer, that draws a grid of ascii symbols?

I'm not familiar with drawing to the screen.
Paste me an example!
Logged

Armok

  • Bay Watcher
  • God of Blood
    • View Profile
Re: Your best code
« Reply #22 on: December 27, 2009, 07:40:54 pm »

I'm not very familiar with c, but you shuld be able to find some code by googling right? You just need something to convert arrays of floating points to pixels on the screen, nothing fancy.
Logged
So says Armok, God of blood.
Sszsszssoo...
Sszsszssaaayysss...
III...

eerr

  • Bay Watcher
    • View Profile
Re: Your best code
« Reply #23 on: December 27, 2009, 08:29:02 pm »

I'm not very familiar with c, but you shuld be able to find some code by googling right? You just need something to convert arrays of floating points to pixels on the screen, nothing fancy.
How would you do it?
Logged

qwertyuiopas

  • Bay Watcher
  • Photoshop is for elves who cannot use MSPaint.
    • View Profile
    • uristqwerty.ca, my current (barren) site.
Re: Your best code
« Reply #24 on: December 27, 2009, 09:28:11 pm »

It's complex 3D math. Stuff the graphics card or graphics system's software renderer usually does. When it doesn't, it's usually an advanced 3D rendering program, and only so that it can use even MORE advanced methods.

It is NOT easy stuff.


Now, on the other hand, raycasting is much easier (raytracing generally also includes reflection, refraction, shadows, etc...), but still complex 3D graphics rendering.


Armok just wants to have some sloppily coded and unoptimized C code to compare to a linoleum demo, that he didn't write himself. Not that it isn't a bad language, it's just a very hard task in any language that is best left to hardware or professionals (Best: the hardware and software interface for that hardware, when both are designed and implemented by teams of professionals, and have had 10 years at least to improve on the code.)

And Armok is jealous, because last I heard, Linoleum can't interact with said graphics hardware!

Edit: memory may have failed me, it was long ago that I think I remember reading that it had some hardware interface problems. Still looking, though.
« Last Edit: December 27, 2009, 10:21:34 pm by qwertyuiopas »
Logged
Eh?
Eh!

eerr

  • Bay Watcher
    • View Profile
Re: Your best code
« Reply #25 on: December 28, 2009, 04:08:06 am »

Armok is a Giraffe.
Logged

cowofdoom78963

  • Bay Watcher
  • check
    • View Profile
Re: Your best code
« Reply #26 on: December 29, 2009, 09:30:47 pm »

You guys may be doing complicated 3d maths but I just got the console to flash and make a beeping noise.


And on purpose too!
Logged

Blacken

  • Bay Watcher
  • Orange Polar Bear
    • View Profile
Re: Your best code
« Reply #27 on: December 30, 2009, 01:51:16 am »

I'm not sure what my best code is, but I'm probably most proud of writing an (admittedly very basic) operating system for an 80286 PC (though Andrew Tanenbaum probably deserves a lot of the credit, I did it when I was reading a first edition of Operating Systems: Design and Implementation). If I'd had an 80386 around I'd have probably tried to extend it to take advantage of its features, but I never did and didn't have a more modern computer to repurpose for it.
Logged
"There's vermin fish, which fisherdwarves catch, and animal fish, which catch fisherdwarves." - Flame11235
Pages: 1 [2]