nesrocks
He/Him
Player (246)
Joined: 5/1/2004
Posts: 4096
Location: Rio, Brazil
So, I decided I wanted to learn C#. Don't ask why C# please, it's just that. So, first I started remaking arkanoid. I got bored of it though, but it's got "a lot" going on in the game. Here are the games (you'll need .Net framework 2.0): Karanoid 0.8 (use the mouse to play) (warning: I didn't use directx for the graphics, so I think the game will lag on anything below a pentium 2.4) The Platformer Game 0.01 (plays on the keyboard: arrows and Z) (I made it in about 4 hours) If you're a total newb at programming, you may want to look at this. Platformer Game 0.01 Source Code I'm having fun doing these, will keep going further. If you have any tips or source code from your game, I'd like to know.
Player (68)
Joined: 3/11/2004
Posts: 1058
Location: Reykjaví­k, Ísland
I made a paddle game in Ruby not so long ago. It is obviously complete crap and I kinda don't have any time to try and improve it/learn more. It was fun to make, though. (not so much fun to play it..... ) http://www3.hi.is/~tog3/paddlegame0.2.rb My favorite part is how I handle the ball movement. Yes, I know it's nothing that hasn't been done before but it was fun be able to use trigonometry in a practical way ( I don't get to do that much). But overall this code is probably pretty terrible. Edit: I had a later version of the game but it's supremely bugged and not really any better anyway) Comment about "Karanoid 0.8": As a game, it's pretty lacking, but obviously this takes practice and experience. The collision detection is pretty horrible, in fact it might be slightly worse than in my Ruby game :) It's a little bit tricky to do.
Joined: 7/2/2007
Posts: 3960
I'll say this -- game programming's really solidified my basic trig knowledge. That stuff comes up a lot. :)
Pyrel - an open-source rewrite of the Angband roguelike game in Python.
nesrocks
He/Him
Player (246)
Joined: 5/1/2004
Posts: 4096
Location: Rio, Brazil
Humm I can improve the collision in karanoid but my code got overly complicated (I think) and that's partly what bored me. So I wasn't programming for a few days until I thought to make something different and that's how I started the platformer game. But the problem with the collision in my breakout game is that I have multiple ball speeds and the direction wasn't programmed using trigonometry, it was programmed on a simplistic way (I think what I did is exactly what they did on the NES arkanoid game, that is a simple pixel based math). So my approach to the collision is something like this: 1 - Detect which of the four diagonal directions the ball is moving (NE, NW, SE or SW), so I can limit the way it'll bounce to 2 alternatives. 2 - For one of these options, let's say, Northeast, if the current ball position + its next increment intersects a block, there will be a collision. 3 - in the case of a collision, I test if the ball's center is nearer the block's horizontal center or its vertical center (adjusted proportionaly to the block's size), and bounce down or left, accordingly. The problem is that there are so many variables for the ball's speed and vertical direction or horizontal direction that I messed up somewhere in those, I don't know, 8 bouncing codes, which I programmed separately (ctrl+C ctrl+V). Ugly stuff. I really like the result though, for a first code ever and in the short time I made it. edit: I see, so you sum the cos and sin to the coordinates of the ball. I'll try that later :)
Joined: 8/27/2006
Posts: 883
I don't know if you are using XNA for game developpement, but it's a pretty nice framework. I used it to do some little stuff. Nothing complete because of a lack of motivation, but it's pretty nice. And with a subscription (it's not free) you are able to develop game for Windows and Xbox 360. I think you can even sell your game for Xbox 360. You should take a look ;)
nesrocks
He/Him
Player (246)
Joined: 5/1/2004
Posts: 4096
Location: Rio, Brazil
No I didn't use XNA or directx, it's all forms and system.drawings and system.media I have been advised to try XNA, and I will do that soon, thanks :)
Active player (312)
Joined: 2/28/2006
Posts: 2275
Location: Milky Way -> Earth -> Brazil
I'm jealous. I always wanted to learn some programming language, but all thanks to my arrogance and wilfulness, my brain survived school and I ended up really "right-minded". Actually this is not a problem, because real life is almost all the time NOTHING about linear thinking and the problems we face don't come with decent rules but it's somewhat difficult for me to think one step at a time, in following sequences item by item. I just can't stand the slow pace and lose interest fast. There's no game as boring as chess. I like to calculate things fast (faster than most "rational" guys... I don't bother anymore trying to convince these people because it's so amusing to see their unconfessed but evident grudge against me when they finally find out I was right from the beginning and they just wasted their time... fighting for a lost cause... hah!), I like to look at the whole problem (and at various unrelated problems too, because one of those questions could very well be an answer), holistically, having insights (it's a rush), calculate it all mostly based on intuition rather than solid and carefully verified bases... and that's something difficult to do by looking at the long lines of ordinary high level source code. Unless someone comes up with a language that uses cute IMAGES instead of ugly WORDS (or some tool that can convert boring text to interesting graphics) I can't get involved. Recently I started messing with Game Maker. Even though I often yawn when I'm using it, I must admit the the drag n drop method is interesting and I can usually tell what a piece of code does just by taking a glance at the action icons. Maybe once I'm accostumed with it, I'll be able to read some of the written code because I'll see the words and think of images in my mind. Maybe I can even empty a swimming pool using a dropper... Ah, I'm tired of this message
"Genuine self-esteem, however, consists not of causeless feelings, but of certain knowledge about yourself. It rests on the conviction that you — by your choices, effort and actions — have made yourself into the kind of person able to deal with reality. It is the conviction — based on the evidence of your own volitional functioning — that you are fundamentally able to succeed in life and, therefore, are deserving of that success." - Onkar Ghate
Bisqwit wrote:
Drama, too long, didn't read, lol.
Joined: 8/27/2006
Posts: 883
Well I started programming with mIrc scripting. It was pretty nice to do some mp3 player, away system, etc. Then I tried VB6 and tried to do a IRC client. It's not that hard for simple thing. If you want php is pretty easy to learn too. I did some dynamic webpage and a forums. It's really not that hard. But game programming is harder. I just did a Tetris but I'd like to do something else. I lack motivation, I wonder how people are able to do programming after a days of work in a programming environnement. Just lack the motivation after my job.
Joined: 4/30/2006
Posts: 480
Location: the secret cow level
I've had a semester each of VB and C++... friend of mine has been after me to write a scorekeeping program for when we play darts and I haven't even started working on it. I really should keep up with writing code before I forget it all.
Active player (312)
Joined: 2/28/2006
Posts: 2275
Location: Milky Way -> Earth -> Brazil
The problem is that I'm terrible with words. I can't "write" code. I tend to lose track of big sequences after a while. Also when we learn to program we do programs to convert celsius to fahrenheit, to sort objects, etc. That's really dumb. Games are the only thing that interests me.
"Genuine self-esteem, however, consists not of causeless feelings, but of certain knowledge about yourself. It rests on the conviction that you — by your choices, effort and actions — have made yourself into the kind of person able to deal with reality. It is the conviction — based on the evidence of your own volitional functioning — that you are fundamentally able to succeed in life and, therefore, are deserving of that success." - Onkar Ghate
Bisqwit wrote:
Drama, too long, didn't read, lol.
Joined: 7/2/2007
Posts: 3960
If you'd like to get into writing games, my advice is to get Python, download Pygame, and start working from there. Pygame gives you easy-to-use access to graphics and sound and is a good way to get your feet wet with game programming. And Python is probably the easiest language I've seen to learn. Not only that, but it's not a "baby" language; it retains all its power without being more complicated than other imperative languages.
Pyrel - an open-source rewrite of the Angband roguelike game in Python.
Joined: 8/27/2006
Posts: 883
In any case, the best way to learn, is to follow some basic tutorial. I bought a book about XNA, read it and followed the exemple. At the middle of the book, I little game that I had to not get hit by asteroid, and collect gas to continu. It's pretty nice.
Joined: 3/7/2006
Posts: 720
Location: UK
Absolutely, I recommend Python. Unlike a lot of other 'learning languages' cough cough Pascal cough it doesn't have massively annoying syntax to learn, plus it's almost as powerful as something more general like C. I've used pygame for a bunch of things (that 'visualising input movie files' topic has something of mine in, for example) after reading the tutorials, and now I feel like I could write a game.
Voted NO for NO reason
Banned User
Joined: 3/10/2004
Posts: 7698
Location: Finland
LagDotCom wrote:
Absolutely, I recommend Python. Unlike a lot of other 'learning languages' cough cough Pascal cough it doesn't have massively annoying syntax to learn
Except for the enforced indentation. Marking code blocks by indentation makes a bit akin to Whitespace.
Joined: 7/2/2007
Posts: 3960
The whitespace is a bit annoying when you start out, but it doesn't take too long to get used to it. Edit: fixed spelling. I r smrt.
Pyrel - an open-source rewrite of the Angband roguelike game in Python.
Banned User
Joined: 3/10/2004
Posts: 7698
Location: Finland
Derakon wrote:
The whitespace is a bit annoynig when you start out, but it doesn't take too long to get used to it.
I think it also makes auto-indentation features of editors more difficult. How can the editor know if the next line you write is part of the current block or of the outer block? Can be especially vexing if, for whatever reason, indentation has been lost (eg. on a copy-paste from a newsgroup or whatever).
Joined: 7/2/2007
Posts: 3960
Well, vim at least is smart enough to know that 'return', 'elif', 'break' and the like mean to go out an indentation level, but when I'm ending a block with one of those, it's not too hard to hit delete to go back an indentation level.
Pyrel - an open-source rewrite of the Angband roguelike game in Python.
Joined: 3/7/2006
Posts: 720
Location: UK
The whitespace is my favourite part. No more messy random punctuation cluttering up your program, just easily trackable whitespace.
Voted NO for NO reason
Banned User
Joined: 3/10/2004
Posts: 7698
Location: Finland
Except that whitespace is usually invisible, so it can actually be harder to track than clear block delimiter characters.
Joined: 7/2/2007
Posts: 3960
Dunno what to tell you except that I've not had any problems tracking whitespace.
Pyrel - an open-source rewrite of the Angband roguelike game in Python.
Joined: 10/20/2006
Posts: 1248
I prefer brackets too, the whitespace method gives me a feeling of insecurity. Also, it forces me to indent my code or use more subroutines/methods (which is what I'm supposed to do in other languages too, but I just often prefer not to).
Joined: 8/27/2006
Posts: 883
I like c# that handle the indentation of code automaticly. No more fiddling around trying to parse your code correctly. You just type, and the IDE handle the rest.
Banned User
Joined: 3/10/2004
Posts: 7698
Location: Finland
I think that you are confusing C# (a programming language) with a text editor (in this case I assume it's MS Visual Studio's embedded editor).
Joined: 8/27/2006
Posts: 883
Yeah you are right. I know that some people are crazy enought to do C# programming without VS2008. But only it's a full IDE (like Eclipse) it's a real lack of productivity.
Active player (312)
Joined: 2/28/2006
Posts: 2275
Location: Milky Way -> Earth -> Brazil
Hmm, I took a look at pygame. Honestly, C# was easier to understand.
"Genuine self-esteem, however, consists not of causeless feelings, but of certain knowledge about yourself. It rests on the conviction that you — by your choices, effort and actions — have made yourself into the kind of person able to deal with reality. It is the conviction — based on the evidence of your own volitional functioning — that you are fundamentally able to succeed in life and, therefore, are deserving of that success." - Onkar Ghate
Bisqwit wrote:
Drama, too long, didn't read, lol.