TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

What could have been a good career in game development

12 点作者 fzkl大约 17 年前
Back in 1996 when I was learning C, disconnected from the rest of the world without an internet and no one to help me with and no books that decribed concepts of C in detail, I tried my hand in trying to make my own version of games like digger and dangerous dave. In the process of coding this game, I came across problems to which I couldn't find solutions and eventually gave up on game programming. Since then I have been into other things and I now want to start off from where I left things previously. Following are the issues that I faced when making the game:<p>1) The program code was linear and used a shitty switch/case construct to take keyboard inputs and call functions that would move my character on the screen. However, since moving the character meant redrawing bitmaps on the screen, a lot of CPU cycle was spent on this (on a 486) and I wasn't able to get fluid motion from other objects in the game screen. For eg: I would have a moving paddle that I need to jump on top off. However to do this, the paddle should move independant of my character. But if I pressed and held an arrow key to move the character, all CPU cycles would go into moving the character and then the CPU would have to wait for no inputs from the keyboard to move the other objects in the game. I was never able to get things work independant ofone another.<p>I now know that the solution to my problem is threading but I am not really sure how to create threads that have functions in them and call them. It would be nice if someone can point me to a beginners tutorial on threads that addresses the kind of problem I am facing.<p>2) I was always amazed at how games like dave and such had more colors than the 16 colors Turbo C would allow. I have now come to know that int13 is used to gain access to a larger color pallete. However the usage seems very confusing. Any links that can give me a good insight into this?<p>3) Considerable amount of CPU cycle was spent drawing bricks and blocks on the screen. I figured the way games did it was use tiles and replicate them. How do I get any bitmap I create to come up on the parts of the screen where I want it to? Are we doing a direct frame buffer write, if yes, how do I gain access to the frame buffer and what are its controls?<p>I am not a CS major and nor do I obviously code for a living but I would like to get back into it seriously. Any help is appreciated. Thanks.

9 条评论

docmach大约 17 年前
Do you still want to program for the 486 or are you looking to program using a more modern environment? If you are going to program for a modern platform, which one would you like to target? No matter which platform you choose you will probably want to use OpenGL. For that I recommend <a href="http://nehe.gamedev.net" rel="nofollow">http://nehe.gamedev.net</a>. If you want to develop for Mac OS X then I recommend <a href="http://www.idevgames.com" rel="nofollow">http://www.idevgames.com</a> and in particular <a href="http://www.idevgames.com/forum/showthread.php?t=11896" rel="nofollow">http://www.idevgames.com/forum/showthread.php?t=11896</a>.
rtf大约 17 年前
First of, I second the others. By the time I got around to seriously learning programming and specifically game programming I was using Python/Pygame on a 1 gigahertz machine and it gave me about as much power as a 486 would running optimized C code. (more in some instances, less in others) If you're after concepts and not retro-technical details this is a good route to go.<p>But as for the questions:<p>1. Threading is not the answer; it was a missing concept on DOS machines. Interrupt polling is what you want to look at. 2. I recall reading about this but never did it myself. These days you're lucky if both the monitor and graphics card support mode 13h. 3. The term you want is "fast rectangle blit". This is still relevant if you use software rendering.
评论 #123785 未加载
dhouston大约 17 年前
wow, time warp. (i think it was int 10h though, for the video bios, and you had to poke around different ports to change the vga palette :))<p>things have, um, changed significantly -- nowadays libraries like directx abstract away the details of direct hardware access and handle graphics, sound, input, timers, etc.<p>if you're just looking to play around with games, pygame is perfect for you -- <a href="http://www.pygame.org" rel="nofollow">http://www.pygame.org</a> .<p>if you're really looking to learn the details, you should probably grab a couple books on amazon (hard to recommend one in particular without knowing what you wanna do.)
评论 #123743 未加载
VinzO大约 17 年前
That sounds exactly like my story... in 1995-1996 I started to develop a clone of Football Manager That I had on C64. I used Turbo Pascal and the game was running under DOS. Like you I had no internet connection at a time and I found only a small book about a few graphic functions. I was never able to do a fluid animation of my games. It was too laggy only to draw the ball on the screen ! Then I dropped and unfortunately continue my studies as Electronic Engineer. I wish I could turn back... Now, like you I would like to continue the work I started, but I couldnt find backups of my source code :(<p>I wonder if I should start a new degree in CS, but I am 30, I have a child, and I am not sure if it's better to learn by myself or if it's worth doing a degree. Can online studies be a good idea? Or do you guys think it's just a waste of time?
评论 #123825 未加载
wlievens大约 17 年前
Threading is not what you need right where. What you need is called a "game logic loop" (for want of a better term). Keyboard events should change only the "action state" of your game objects and entities, e.g. when you press a key to move left, the player should be in the "moving left" state, but the actual movement should not be handled there.<p>Parallel to the input (okay you will need a separate thread of keyboard listening and for game logic) you will loop over your entities and update their state, processing things such as movement.
barrettcolin大约 17 年前
Have a look at this article for some useful links on VGA tricks:<p><a href="http://en.wikipedia.org/wiki/Mode_X" rel="nofollow">http://en.wikipedia.org/wiki/Mode_X</a><p>If you really want to pick up where you left off, I'd suggest downloading djgpp (gcc for dos - <a href="http://www.delorie.com/djgpp/zip-picker.html" rel="nofollow">http://www.delorie.com/djgpp/zip-picker.html</a>) along with the Allegro library, which wraps up a lot of the nastiness of direct hardware access.
wehriam大约 17 年前
If you're interested in simple game design, you should consider experimenting with Flash. Websites like <a href="http://www.kongregate.com/" rel="nofollow">http://www.kongregate.com/</a> and services like <a href="http://mochiads.com/" rel="nofollow">http://mochiads.com/</a> could help with distribution and revenue on what might otherwise be just a hobby.
评论 #123862 未加载
xirium大约 17 年前
Firstly, skip all of the low-level, platform-specific details and learn JavaScript. This will give you all of the colours and performance that you require for sprite based games. I've seen a very good version of OutRun done in JavaScript. A 2D platformer can definitely be implemented. Also, if you implement in JavaScript then you'll also get a wide audience for your work without requiring anyone to install anything.<p>Secondly, a real-time game is a turn-based game where the turns occur in real-time. Unlike a strategy game, the computer continues even if you don't make a move. Imagine AD&#38;D melee combat at 30 rounds per second. This doesn't require threading.
评论 #123853 未加载
评论 #123745 未加载
goofygrin大约 17 年前
You just gave me tired head.<p>Unless you really want to deal with all this blitting stuff, I recommend that you look at making flash games. You get to deal with the more interesting problem (to me) of making a fun, playable game vs. dealing with the nuts and bolts of graphics programming.<p>Also ask those guys at popcap how their financials look. I bet they aren't doing too poorly :)<p>For about 3 years, I've said that the minigame will rule the world and it it beginning to turn that way. Look at 90% of the Wii games and they are all minigames. Games like Peggle and the downloadable content for XB360 are all minigames that make bank.