• 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
Josip Mati?

Games by younger me

15 posts in this topic

ah, if only i had the code from some of my very earliest games, they were travesty's to say the least. (i once wrote risk in lua, with no concept of loops, and functions....the file was well over several megs big, had multiple repeated sections of code, and was so incredibly bloated, it only partially functioned, but overall was just....terrible...*shudders*)

 

is this game based on some existing game, or is it an original construction?

 

edit: i should re-phase, because i do think i may have had an understanding of functions at the time, but not how to utilize them correctly, which lead to me re-writing massive portions of the game, that could have been neatly summed into functions.  also, combined with no real knowledge of for-loops i was hand-writing massive loops, and hard-coding country borders.

Edited by slicer4ever
0

Share this post


Link to post
Share on other sites

It's pure copy of Nine Men's Morris board game. It was easier for me (and still is; there is still long way to go for me to design new games) to use existing games as a core or entire project. It should've been easy to "convert" it into digital format due to its simple board and rules. I just had to use that thing in my head called "brain".

 

Oh well, everybody has to start from somewhere, right? XD

 

EDIT: Even today, I still find myself not utilizing what C# has to offer and instead rewriting massive pieces of code. I passed several times over the code of Battle City and found numerous situations where I could (and did) eliminate copies of code and replace them with one or two methods which do the same job, but better. In the above code, all that placement could easily be summarized into 1 void method with 2 to 4 parameters, instead of doing massive if...then...else if.. tree which is insanely hard to read.

Edited by Aurioch
0

Share this post


Link to post
Share on other sites

"It's okay. My state machine just uses code instead of memory." cool.png

1

Share this post


Link to post
Share on other sites

 

This is gonna be hard to beat, but look at my first games Menu.h file tongue.png This was written about 3 years ago as well tongue.png The funny part, game works perfectly fine here is a video of it http://www.youtube.com/watch?v=4y-5io98vys

 

 

That's not terrible, I have (many times) seen worse stuff, written by supposed professionals...

1

Share this post


Link to post
Share on other sites

I see it as very bad. It used to be about getting something working, now it's about getting something working in optimized way hehe :)

 

I can't really imagine anything worse tho. What could they do, What can be worse then having 3000 if statements in one file .h file under one function?

 

...Memory Leaks?

0

Share this post


Link to post
Share on other sites

 

 

This is gonna be hard to beat, but look at my first games Menu.h file tongue.png This was written about 3 years ago as well tongue.png The funny part, game works perfectly fine here is a video of it http://www.youtube.com/watch?v=4y-5io98vys

 

 

That's not terrible, I have (many times) seen worse stuff, written by supposed professionals...

 

 

There is worse out there, but it's still terrible. ;)

0

Share this post


Link to post
Share on other sites


If I would write it right now, I would make field on board as its own class. That way, in main code I can simply hold a list of fields and manipulate with it, instead of... doing... what I did.

 

Been there, done that... share your pain, and shame. Just when I thought programming was about handling each case individually with a series of Ifs :)

0

Share this post


Link to post
Share on other sites

Phew, weekend started, now I finally have time to be here a little XD

 

@Konrad Jablonski

Wow, game looks nice. As for the code... at least it's readable XD Now, if you would want to make one change, would you be able to do it without breaking whole thing? XXDD

 

@Arthur Souza

Thanks... I guess XD Wrote first thing which came to my mind, and LotR ended up being that...

 

@Orymus3

People learn whole life ^^ Luckily, I improved my code writing... curently I have about 30 classes of my own all communicating with other objects and/or inheriting other classes - something younger me wouldn't even think about doing.

 

What's even more embarrasing is that instead of using Rectangle to represent each board field and just use Rectangle.Contains(Point) method, I invented hot water. >.<

0

Share this post


Link to post
Share on other sites

Phew, weekend started, now I finally have time to be here a little XD

 

@Konrad Jablonski

Wow, game looks nice. As for the code... at least it's readable XD Now, if you would want to make one change, would you be able to do it without breaking whole thing? XXDD

 

Well probably not, I haven't touched this code in over 3 years. Now I would use classes and functions for this like any normal person :)

0

Share this post


Link to post
Share on other sites

When I started XNA, I used to load files whenever I needed them. I recently found my first pong game and I had Content.Load lines all over the place. The nice thing about XNA is that it still worked!! But with a bigger project you  probably don't want Content.Load in the Update or Draw method -.-

0

Share this post


Link to post
Share on other sites

I made multi threaded code without even knowing I was doing it before...  that was many years ago.

0

Share this post


Link to post
Share on other sites

That reminds me of how I still tend to avoid multithreading like the plague as if I had never used it... even after making a whole sound driver that has to cope with two completely different processors without any proper way to do handshake and the most atomic operation I can get is reading or writing a byte in RAM (I don't even get multibyte values!), which must be like the worst of the worst when it comes to multithreading =P

 

The only time I did it on PC (that didn't involve other library doing it for me - the one I mentioned before was not on PC) was recently in my game for the loading screen (otherwise the game can hang without pumping any events, which can make the OS think it got stuck and try to kill it). Given what I said above, I guess it shouldn't be surprising that it worked on the first try (even if it was quite simplistic).

Edited by Sik_the_hedgehog
0

Share this post


Link to post
Share on other sites

Goodie goodie, look what I found on my old PC from 1991 biggrin.png

Few years ago, I was bored on vacation and all other electronic devices were used by other family members, so I wrote this little gem in QBasic which needs serious refactoring:

CLS

DIM a, b, i, n, s AS INTEGER
DIM button AS STRING
DIM direction AS STRING
DIM x(100) AS INTEGER
DIM y(100) AS INTEGER

s = 0
n = 1
direction = ""
x(1) = 12 '25 max
y(1) = 40 '80 max
RANDOMIZE 1
a = INT(RND * 20) + 3
b = INT(RND * 77) + 2

COLOR 9
PRINT "Welcome to Aurioch's ASCII Snake"
COLOR 3
PRINT CHR$(201); STRING$(78, 205); CHR$(187)
FOR i = 1 TO 20
  PRINT CHR$(186); STRING$(78, " "); CHR$(186)
NEXT i
PRINT CHR$(200); STRING$(78, 205); CHR$(188)
LOCATE 1, 60
COLOR 12
PRINT "Score:"; S

DO
  FOR i = 1 TO n
    LOCATE x(i), y(i)
    COLOR 10
    IF i = 1 THEN
      PRINT CHR$(2)
    ELSE
      PRINT CHR$(254)
    END IF
  NEXT i

  LOCATE a, b
  COLOR 14
  PRINT CHR$(42)
  FOR i = 1 TO 5000 'delay
  NEXT i
  button = INKEY$
  FOR i = 1 TO n
    LOCATE x(i), y(i)
    PRINT " "
  NEXT i

  IF button = "w" THEN direction = "up"
  IF button = "s" THEN direction = "down"
  IF button = "a" THEN direction = "left"
  IF button = "d" THEN direction = "right"

  IF (direction = "up") AND (x(1) > 3) THEN
    IF n > 1 THEN
      FOR i = n TO 2 STEP -1
        x(i) = x(i - 1)
        y(i) = y(i - 1)
      NEXT i
    END IF
    x(1) = x(1) - 1
  END IF

  IF (direction = "right") AND (y(1) < 79) THEN
    IF n > 1 THEN
      FOR i = n TO 2 STEP -1
        x(i) = x(i - 1)
        y(i) = y(i - 1)
      NEXT i
    END IF
    y(1) = y(1) + 1
  END IF

  IF (direction = "down") AND (x(1) < 22) THEN
    IF n > 1 THEN
      FOR i = n TO 2 STEP -1
        x(i) = x(i - 1)
        y(i) = y(i - 1)
      NEXT i
    END IF
    x(1) = x(1) + 1
  END IF

  IF (direction = "left") AND (y(1) > 2) THEN
    IF n > 1 THEN
      FOR i = n TO 2 STEP -1
        x(i) = x(i - 1)
        y(i) = y(i - 1)
      NEXT i
    END IF
    y(1) = y(1) + 1
  END IF

  IF (x(1) = a) AND (y(1) = b) THEN
    a = INT(RND * 20) + 3
    b = INT(RND * 77) + 2
    s = s + n
    n = n + 1
    IF direction = "up" THEN
      x(n) = x(1) + 1
      y(n) = y(1)
    END IF
    IF direction = "down" THEN
      x(n) = x(1) - 1
      y(n) = y(1)
    END IF
    IF direction = "left" THEN
      x(n) = x(1)
      y(n) = y(1) + 1
    END IF
    IF direction = "right" THEN
      x(n) = x(1)
      y(n) = y(1) - 1
    END IF
    LOCATE 1, 66
    PRINT s
  END IF

LOOP UNTIL button = CHR$(27)
COLOR 7
END

Yesterday, I was rewriting it on my laptop and noticed that I made game loop without knowing about it at all XD

Edited by Aurioch
0

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