• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
Michael Tanczos

New forum - Coding Horrors

17 posts in this topic

if (x^2>0) then patato else tomato

is it supid enough for this new forum ? ^^

Sorry =)

 

This is stupid because the answer is always potatoph34r.png

Of course you can replace patato with tomato. If you prefer tomato. Do you like patato ?

Edited by Tournicoti
0

Share this post


Link to post
Share on other sites

I wish this forum would've been around when I posted this!
 

  • Using Goto is perfectly fine

This just popped into my mind:

goto.png

0

Share this post


Link to post
Share on other sites

I wish this forum would've been around when I posted this!
 

 

  • Using Goto is perfectly fine

This just popped into my mind:

goto.png

 

Brilliant.  =)    I was trying to find a comic that embodied this idea.. yours is better.   

0

Share this post


Link to post
Share on other sites

   ....
   // tCount keeps showing up negative here for some reason..  it should never be negative
 
   tCount = sqrt(tCount*tCount);  // Fixed!
 

o god, i laughed far too hard at this one.

1

Share this post


Link to post
Share on other sites

33 parameters? Yikes. Reminds me of something I did once when I was learning, a long long time ago. I wrote a function that took 25 parameters. It was for a tile engine, and the 25 parameters represented the values of each tile in a block of 5x5 tiles that were used to calculate some sort of classification code. Even worse, I named them all letters of the alphabet, so I had something like [b]int calculateMegaTileCode(char a, char b, char c....)[/b]. It was... man, it was horrible. I spent [i]hours[/i] laboriously writing that function as a HUGE chunk of [b]if (a==0 && b==0)[/b] statements. I was actually proud of it and myself when I finished it. I was 14, and I felt like I had just completed the most complicated and awesome piece of code anyone had ever written. Eight years later when I looked at it just for nostalgia's sake I nearly wept.

1

Share this post


Link to post
Share on other sites

33 parameters? Yikes. Reminds me of something I did once when I was learning, a long long time ago. I wrote a function that took 25 parameters. It was for a tile engine, and the 25 parameters represented the values of each tile in a block of 5x5 tiles that were used to calculate some sort of classification code. Even worse, I named them all letters of the alphabet, so I had something like int calculateMegaTileCode(char a, char b, char c....). It was... man, it was horrible. I spent hours laboriously writing that function as a HUGE chunk of if (a==0 && b==0) statements. I was actually proud of it and myself when I finished it. I was 14, and I felt like I had just completed the most complicated and awesome piece of code anyone had ever written. Eight years later when I looked at it just for nostalgia's sake I nearly wept.

when i was starting out in lua(and in programming in general), i wrote a risk clone(the board game), i hard-coded each country connection by using huge if/else if blocks, the pain of making a small change was....intense... worse yet, i repeated the huge if/else if block at several diffrent points in the program.

 

the game was never finished, and the file was a couple megs big(i didn't even break the game into seperate files cause i didn't know how).

 

it probably stands as the worse most complicated thing i've ever programmed. (and for some reason, i was really proud of what i was doing.)

1

Share this post


Link to post
Share on other sites

While helping with QA for Lotus Notes, I found my favorite all-time bug.  The symptom was that somehow application processing became gated by mouse interrupts.  So nothing would process at all unless you moved the mouse.  Better, the faster you moved the mouse the faster things got done!  Interrupt processing must have become entangled somehow, but it was really fun to demonstrate!

1

Share this post


Link to post
Share on other sites

if (x^2>0) then patato else tomato

is it supid enough for this new forum ? ^^

Sorry =)

 

This is stupid because the answer is always potatoph34r.png

Of course you can replace patato with tomato. If you prefer tomato. Do you like patato ?

 

Wrong. Your code is obfuscated way of checking if (x != 0)

 

I can't find the screenshot any more, but in one of my past companies, we had cool functions like this one:

int GetID()
{
    return 4;
}

 

and this function would be overloaded for each and every object, with different (well, not always, as I noticed during debugging), typed by hand (sometimes commented // this ID is 4!) value.

 

Yay!

1

Share this post


Link to post
Share on other sites

post removed because of stupid contents ;)

should wake up before I post...

Edited by Olof Hedman
0

Share this post


Link to post
Share on other sites

@Mantistongue.png

Yes, not great wink.png, let me elaborate :

 

optimistic version :

if (x==0) then rolleyes.gif   else angry.png

 

pessimistic version :

if (x!=0) then angry.png  else rolleyes.gif

 

 

Now it should make perfectly sense blink.png  (cf ZE state of the art in term of conditional branch)

 

By the way, do you like boats ? (I'm about to create a poll on that)

Edited by Tournicoti
0

Share this post


Link to post
Share on other sites
Sleep sort!
#!/bin/bash
function f() {
    sleep "$1"
    echo "$1"
}
while [ -n "$1" ]
do
    f "$1" &
    shift
done
wait
example usage:
./sleepsort.bash 5 3 6 3 6 3 1 4 7
edit: removed link to source since it apparently has NSFW material that I didn't notice before posting. Edited by Oberon_Command
2

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0