Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411523 Posts in 69377 Topics- by 58431 Members - Latest Member: Bohdan_Zoshchenko

April 28, 2024, 02:22:51 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsCommunityTownhallForum IssuesArchived subforums (read only)TutorialsI'm going on a long path to learn programming
Pages: 1 [2]
Print
Author Topic: I'm going on a long path to learn programming  (Read 16808 times)
rivon
Level 10
*****



View Profile
« Reply #20 on: May 23, 2011, 12:41:16 PM »

Python + Pygame is the way to go... At least for the beginner programmer. Then C++ and SFML Wink
Logged
tergem
Level 1
*

It's a pony!


View Profile
« Reply #21 on: June 02, 2011, 05:50:16 PM »

C# is the way to go, if not for the vast amount of tutorials online for it.

It also is the language of Unity, and XNA. And as said before, it and Java are very similar.
Logged

Games made so far (completed):Spike teh dodge, Unnamed puzzle game, Galaga clone, Generic Top-Down Shooter, overly simplistic business simulator In dev: Platformer!
Dacke
Level 10
*****



View Profile
« Reply #22 on: June 02, 2011, 11:38:48 PM »

C# is the way to go, if not for the vast amount of tutorials online for it.

It sounds unlikely that there are more C# tutorials than tutorials for C, C++, Java, JavaScript or Python.


C# [...] and Java are very similar.

This is a decent argument against C# as a first language. I think it may be better to learn concepts first and structure later.

Also, it is a language developed by Mircrosoft Outraged
Logged

programming • free software
animal liberation • veganism
anarcho-communism • intersectionality • feminism
Nix
Guest
« Reply #23 on: June 04, 2011, 12:17:54 PM »

1. I decided to learn C++ or C#. (i programmed in Delphi/Pascal before)
   Which is the "best"? Or doesn't matters? Can i use OpenGL/DX.. in both?

Yes you can. With C# you can use SlimDX or XNA, and I'm sure you could find a decent OpenGL wrapper out there.

2. Is there an ideal "learning curve" for game developing? For example : first game "Tetris",   
   second "PacMan", third "Mario"... ?

Definitely start small, but I hate when people recommend learning game development by cloning games. Don't do that. It isn't fun. Make your own games.
Logged
lasttea999
Level 2
**


View Profile
« Reply #24 on: June 23, 2011, 11:51:36 PM »

I would not recommend starting with neither Tetris, PacMan nor Mario. All those games depend on the screen being updated several times every second, which can be tricky to get right.

Yeah, I'm transitioning from Game Maker to Java now, and I'm finding the screen-updating to be an issue. I've read a few different tutorials, and I still can't seem to get my program running as smoothly as, say, a GM game. Could you refer me to any more resources to deal with this issue, Dacke?

Although, the tutorials I did check out, along with CS classes at school, has gotten me pretty close to a smooth game loop. My program lags visibly only on certain computers.
Logged

Dacke
Level 10
*****



View Profile
« Reply #25 on: June 24, 2011, 12:44:14 AM »

I have hacked a few Java game-loops over the last few years, which enables me to give you this advice:
Use a game library for it Smiley

There is absolutely nothing wrong with doing it yourself, but I always ended up with a mess (being a relative beginner at that stuff). Getting some experience with a working game-library will enable you to know how to build such things in the future, if you ever get the urge.

Before I moved to GWT (write Java, compile to JavaScript), I started to dabble with Slick2D for Java.

Slick2D has support for making game loops, drawing (with animations, spritesheets, etc.), sounds, fonts, input and tile maps. With all those things being optional: you use what you need.  There is also support for importing a physics library, but they currently seem to be moving from Phys2D to JBox2D and the move isn't done yet. It uses OpenGL (through LWJGL) for drawing, making it pretty fast.

Most importantly, the Slick2D forum is quite active and helpful.

I haven't used it for more than a few experiments, so I can't give any guarantees. But it seemed quite nice to me, from first impressions.

All that being said, I'm really not sure that Java is the best choice. If you are just starting to dabble with game programming or text-only programming in general, there are probably simpler paths. Like pygame with python or Flixel with ActionScript. At least that's what they tell me Shrug
Logged

programming • free software
animal liberation • veganism
anarcho-communism • intersectionality • feminism
lasttea999
Level 2
**


View Profile
« Reply #26 on: June 24, 2011, 09:11:56 PM »

Thank you for your prompt advice, Dacke! I hope I haven't gone too off-topic here, but I feel like this could be a good discussion for someone looking to program games, right??

I have hacked a few Java game-loops over the last few years, which enables me to give you this advice:
Use a game library for it Smiley

There is absolutely nothing wrong with doing it yourself, but I always ended up with a mess (being a relative beginner at that stuff). Getting some experience with a working game-library will enable you to know how to build such things in the future, if you ever get the urge.

Yes, that's what I'm starting to think... The greatest changes I wanted out of the switch away from GM, though, was greater control of my programs, and, I dunno, work with "low(er)-level" programming, I think it's called. So I would like to do stuff with just raw Java and the Java class libraries.

What I can't determine is whether I've isolated the problem to my timing mechanism for the loop, in which case I feel like I could find a relatively understandable solution; or if it also has to do with the rendering taking too much time, in which case I think I'll most likely have to rely on other libraries. As far as I can tell I'm currently using a fairly advanced timing system (separating logic updates from the rendering, using Thread.yield() and Thread.sleep(1), etc.), so I dunno...

BUT! If there's one thing I've learned from making games, it's not to shoot down others' advice! I am so sorry if I seem presumptuous, and I definitely appreciate your recommendations. Maybe I could look at the Slick2D engine to see how it does game loops?

Quote
Before I moved to GWT (write Java, compile to JavaScript), I started to dabble with Slick2D for Java.

Slick2D has support for making game loops, drawing (with animations, spritesheets, etc.), sounds, fonts, input and tile maps. With all those things being optional: you use what you need.  There is also support for importing a physics library, but they currently seem to be moving from Phys2D to JBox2D and the move isn't done yet. It uses OpenGL (through LWJGL) for drawing, making it pretty fast.

Most importantly, the Slick2D forum is quite active and helpful.

I haven't used it for more than a few experiments, so I can't give any guarantees. But it seemed quite nice to me, from first impressions.

Thank you, again, for the recommendations. Does this engine originate from the coke and code guy? I looked at some of his tutorials, and they were very helpful.

Quote
All that being said, I'm really not sure that Java is the best choice. If you are just starting to dabble with game programming or text-only programming in general, there are probably simpler paths. Like pygame with python or Flixel with ActionScript. At least that's what they tell me Shrug

Yeah, that's almost exactly what people have been telling me about Java for a while now... However, my college Java classes were one of my first instances of formal training in programming, and I feel like I've already invested a significant amount of effort into that language, so I don't want to let that go to waste. Sure, the abstract concepts alone will have helped me greatly, but maybe more training in Java will be quicker than learning a whole 'nother language... I dunno.

The "C++ with some libraries (Allegro? SFML? SDL? OpenGL?)" option is looking reeeaaal attractive, though. Mostly because of this little dude --->  Cave Story Not sure I wanna spend another few months learning C++, though, 'specially not from online tutorials (because it's so fundamental!) :O
Logged

Rainchild
Level 0
**

(define schedule (lambda (hour) 'programming))


View Profile
« Reply #27 on: June 24, 2011, 11:13:55 PM »

Quote
All that being said, I'm really not sure that Java is the best choice. If you are just starting to dabble with game programming or text-only programming in general, there are probably simpler paths. Like pygame with python or Flixel with ActionScript. At least that's what they tell me Shrug
... my college Java classes were one of my first instances of formal training in programming, and I feel like I've already invested a significant amount of effort into that language

...

The "C++ with some libraries (Allegro? SFML? SDL? OpenGL?)" option is looking reeeaaal attractive, though. Mostly because of this little dude --->  Cave Story Not sure I wanna spend another few months learning C++ ...
If you have invested a good amount of time into a specific language and want to use it, then use it! Java can be good for game programming and can certainly be a good road into the programming/game programming scene. That aside, if you really feel the need to learn C++, (obviously a more popular language for programming games) it shouldn't be too hard considering that you've already got some Java experience. The languages are fairly similar and C++ shouldn't be too difficult for you. If you don't have much free time, you could also get into plain C which is still used a lot in the game programming world and is significantly smaller syntactically than C++.

Languages aside, I strongly believe that early game developers should learn how to implement engine concepts and details in their own code in a clean and efficient fashion. Achieving this may mean reading a good amount of source code, asking lots of questions (irc, forums, etc), and experimentation. If you're an ambitious person, this should come somewhat naturally. Using a highly abstracted engine or library (not talking about graphics/media libraries here), that may be convenient in the short term, but not good in the long term when you have hard to trace bugs or your ideas are being constrained by the limitations of the library/engine that you are using. Implementing your own code, I must say, is also way more satisfying.

Whatever you choose to do, good luck and never stop learning new things! Smiley
Logged

~Rainchild
lasttea999
Level 2
**


View Profile
« Reply #28 on: June 24, 2011, 11:40:51 PM »

Thank you for the feedback, Rainchild, and for providing more recommendations!

If you have invested a good amount of time into a specific language and want to use it, then use it! Java can be good for game programming and can certainly be a good road into the programming/game programming scene.

I sure hope so!

Quote
Languages aside, I strongly believe that early game developers should learn how to implement engine concepts and details in their own code in a clean and efficient fashion. Achieving this may mean reading a good amount of source code, asking lots of questions (irc, forums, etc), and experimentation. If you're an ambitious person, this should come somewhat naturally. Using a highly abstracted engine or library (not talking about graphics/media libraries here), that may be convenient in the short term, but not good in the long term when you have hard to trace bugs or your ideas are being constrained by the limitations of the library/engine that you are using. Implementing your own code, I must say, is also way more satisfying.

That, sir, is what I'm thinking!

Still felt lazy in expressing hesitation to check out other engines, though; took a quick look at Slick2D's timing mechanisms. Still don't really know how it works, but found more articles and forum discussions on the subject of game loops and timing. Will look into these later if suitable. Found, however, that the current build of my program isn't running as well as I had thought...

Maybe I should start a new thread on this subject!
Logged

Dacke
Level 10
*****



View Profile
« Reply #29 on: June 25, 2011, 01:09:39 AM »

You are not being presumptuous at all! Sorry for making assumptions about what you were trying to do. I tend to do things the same way. Doing everything (naïvely) by myself is just so fun! I also don't think that I'm very far ahead of you, so don't rely too heavily on my advice. Smiley

I don't think you should feel the need to do absolutely everything by yourself to begin with, unless you are in the mood for it. There are plenty of situations for doing low-level stuff either way. So you may want to skip some of the lowest-levelest stuff in your first project, just to get the hang of it all. I actually think that I would have improved faster if I had used an existing system (or at least dissected one). If you try a few different proven-to-work design-patterns, you will eventually find a good fit for you. At which point you can implement it by yourself. One of the ideas with Slick2D is that you should be able to pick-and-choose which parts of it to use and never be forced into doing things "their way".

Java can work just fine for game-programming, no doubt about that. I definitely prefer it over C/C++, at least. But the Java standard library graphics (BufferedImage) can be a bit slow for some games (I think, I may be wrong). So if you are having problem with speed of drawing, you could have a look at something that gives you accelerated graphics. That way, you don't have to worry too much about drawing efficiency. I think a good choice could be LWJGL, which gives you low-level OpenGL, OpenAL and gamepad/joystick support. (Slick2D is built on LWJGL, so it gives you the same benefit)

If you want to figure out how Slick2D timings works, you could have a look at the source code:
https://bob.newdawnsoftware.com/repos/slick/trunk/Slick/src/org/newdawn/slick/

But in principle, game loops are quite simple. If you post a topic in the Technical subforum, I'm sure you can get lots of practical help with it. You can link to that topic from this thread too, to help others here who have the same problem.
« Last Edit: June 25, 2011, 01:24:33 AM by Dacke » Logged

programming • free software
animal liberation • veganism
anarcho-communism • intersectionality • feminism
lasttea999
Level 2
**


View Profile
« Reply #30 on: June 25, 2011, 01:19:47 AM »

Thanks again for the input!

I did look at the source code, and I don't quite understand the timing part... yet. Corny Laugh

I'll definitely try to remember to link any new topic I make about this subject. I might have a lot to write, though...  Who, Me?
Logged

lasttea999
Level 2
**


View Profile
« Reply #31 on: July 02, 2011, 05:06:19 PM »

Alright, although I haven't started my own topic (and although this is all still kinda off-topic...), allow me to do a quick follow-up for those who are interested.

Apparently, stuttering is a somewhat-known problem with Java 2D? In any case, as far as I can tell, the timing mechanism I'm currently using doesn't seem to be all that bad.

It SEEMS, at least at this point, that the next step will have to be to look into other rendering mechanisms--- things like Java OpenGL (JOGL), the Lightweight Java Games Library (LWJGL), and Slick2D. (I think all of these examples end up using OpenGL, by the way.)

As yet, I have no idea how to use any of these. For example, I don't even know how to get LWJGL set up on my comp! I think what I'll do is either

1) stick with my current Java, which *almost* works but still visibly stutters on some comps (including the ones I most often use to develop my programs with), or

2) go back to Game Maker, which I'm learning to appreciate more...

...until I learn something like LWJGL.

It's strange because apparently Java now incorporates OpenGL somehow, or is somehow related to it, but I don't exactly know how this all works... Maybe I should take more college programming courses.  Embarrassed

Thanks for all your input, guys!
Logged

KasHKoW
Level 0
*


View Profile
« Reply #32 on: July 11, 2011, 06:07:27 PM »

I started off with C++... don't do that! haha it took forever to get where I'm at and I still blow... But right now... I'm really refining my c languages(c/++) and learning assembly.
With these langauges, I hope to learn a great deal about the computer actually and not so much games. But it will help me a lot in the long run. I'm looking forward to the mind numbing experience. As I've felt it quite a bit already :D.
Wizard <--- Soon enough, Soon enough.


I'm probably going to learn python/lua... and try to make some things in those languages.
Python is extremely fast. Get into that if you can.

Logged
Dacke
Level 10
*****



View Profile
« Reply #33 on: July 14, 2011, 03:26:02 PM »

Doing anything in Java without an IDE (like Eclipse or Netbeans) can be a big pain. But getting Slick2D up and running in Eclipse was fairly straight forward for me. As far as I can remember, I just had to import the libraries and the example classes.

But I would recommend following a guide for getting started. Good guides or tutorials are a godsend when you are trying to learn a new framework/library/language. If you want to use Slick, have a look at their wiki:
http://slick.cokeandcode.com/wiki/doku.php?id=getting_started_and_setup

Which recommends this start up guide for Eclipse+Slick:
http://n3wt0n.com/blog/slick-phys2d-lwjgl-and-eclipse/

And also mentions this set-up and getting started guide for LWJGL/Slick
http://ninjacave.com/tutorials

Also.. remember that there are other options than GM or Java. With languages like Python or JavaScript being more GM-like options. While I personally prefer Java, it may be easier to get started with one of those.
Logged

programming • free software
animal liberation • veganism
anarcho-communism • intersectionality • feminism
joeparrilla
Level 0
***


View Profile
« Reply #34 on: July 15, 2011, 09:26:12 AM »

Honestly, dont use java2d. I used it for quite a while and honestly its just annoying. Get Slick/LWJGL and youll be happy you did. Honestly Slick really doesnt hide much of Java2d, you will still learn everything you would by just using java2d, it just gets rid of all the obnoxious component painting and Graphics calls. I switched to Slick and never looked back.
Logged
lasttea999
Level 2
**


View Profile
« Reply #35 on: July 15, 2011, 02:12:11 PM »

Hello again, folks! Thanks again for all your input.

I recently got LWJGL running on Eclipse (started using Eclipse just because of LWJGL :O ), and... I still see some of the stuttering I was trying to solve by switching to another graphics system. It might just be my computer; on my laptop, I did detect slight stuttering even with a GM game. However, on our desktop, it seems that GM does technically display stuttering, but only some barely visible stuttering, and significantly less stuttering than my Java2D build. So... I dunno. Maybe it's not the graphics. Tongue

Thanks again for helping me decide to try out something new, though!
Logged

Pages: 1 [2]
Print
Jump to:  

Theme orange-lt created by panic