AuthorTopic: making video games, where do you start?, how do you stay focus?  (Read 29061 times)

Offline dragonboy

  • 0001
  • *
  • Posts: 28
  • Karma: +0/-0
    • View Profile

Re: making video games, where do you start?, how do you stay focus?

Reply #40 on: August 15, 2008, 09:41:32 pm
Cents follow:

First you can't make the game without the game engine but how would you know how the game engine should work if you don't know what sized sprites your going to use and how many of them without drawing the graphics first?  How do you stay attentive drawing the graphics?
You can usually have two kind of game engines: those that are limited to what the hardware allows, and those that try to hide hardware limitations to the programmer. The number of frames, etc. should not be a limitation, though. At worst, you'll have (on gaming hardware) restrictions such as "16x16, 32x16, 16x32, 32x32, 64x32, 32x64 or 64x64 only", and have may end up with a 24x24 sprite on a 32x32 frame with 70% of the pixels being fully transparent.


Quote
(I'm thinking of making this game for either a Sega Genesis or a Super Nintendo)
I'd say forget it, esp. for the SNES, because it has really ugly programming (assembler only) and unless you're a veteran programmer, you'll completely get overwhelmed by technical details even with something "as simple" as the game engine of (say) Cave Story ... The Nintendo DS (and the PSP to some extent), on the other hand, show similar hardware than those beloved 16-bit consoles, but with 32-bit CPUs that can be dealt with like a PC, with "higher" level language (C, C++). Not that it will make your work as easy as in a flash game, but well, playing a game on a gaming system is definitely more fun than with a keyboard ;)

Quote
How do you come up with a system of designing the game that allows you to do EVERYTHING?!
You don't. Not that way, at least. You can come up with an engine that handles 90% of your ideas, and you write custom code for the remaining 10%. Then you ensure you can "register" custom code to the game engine and make it trigger your custom code e.g. when the player enters a given area.

Quote
I have a lot of crazy game ideas that don't involve just having enemy sprites walking on a non-moving background layer.  For example, having a wall in the background crack and then the ceiling collapse on you, you can't achive with just the "sprites on one playfield background" kind of engine.  It wouldn't work because it will require the top of the background to be turned into two backgrounds and the second will be also as much as part of the game as the first background.
In a game engine, i'd be handling a situation like that by first editing the map (e.g. so that a previously solid area now is no longer solid) and generating sprites/polygons for the cracking wall.

Quote
What about compressing graphics?: If you do all the decompressing before you start the level you might run into RAM limitations; if you do real-time compression you might have som miserable slowdowns (unfortuanately, a lot of Snes games relied on this method, I heard from someone); and if you don't use compression you might run into ROM problems.
Guys handled that with extra hardware ... cartridge shipping RAM plus ROM and a decompressing "DMA" chip that moves and unpacks at once while the (slow) CPU of the console does the rest. Honnestly, if you instead opt for the DS, you'll have 4MB of RAM, +640KB of video ram and plenty of CPU time to unpack the next sequence... Alternative is to have some kind of "intermission" sequence where CPU needs are limited (e.g. a 'boost up' in a shoot'm'up where there are no ennemies to avoid) so that you can focus on unpacking the rest of the level. That's something you'll work on *wayy* after, anyway. This is typically a "technical detail" that you can handle later, just having two playable zones during your demo times.

** edit after a couple of PM exchanged with Beoran **
C/C++ is afaik "state of the art" (maybe the "Golden Way" too) to squeeze the best of your modern handheld gaming console (GBA, DS, PSP), but that golden way is made of spiky tiles that may throw you deep into the pitfall of segmentation fault that only meditation of the guru can avoid. Put otherwise, it's certainly not the easiest thing to start with if you have no previous experience on game programming.


I read some interviews with real programmers who worked on old 16-bit games.  Believe it or not, most Super Nintendo were NOT written in assembly, instead they were written in a scripting language.

When using raw assembly, the 65816 running at 3.58 mhz is actually almost as fast as a 68000 running at 7.67 mhz, but because of the scripting languages used, this is not the case.  Motorola 68000 has very orthogonal and more powerful instruction set, but is held back from having every instruction using a very large number of cycles.  The 65816's instruction set is generally weaker, but every instruction takes by far less cycles to perform than the 68000 does.  Thanks to the fast instructions, the 65816 is near twice as fast as a 68000 running the same speed, WHEN they are both fully optimized; but when they are not fully optimized, the 65816 falls back in speed more than the 68000 does.  This is because of the 65816's weaker instruction set. 

With the 68000, you often get the code right (fully or near fully optimized) the first time.  When you do 65816 assembly, chances are, the code will be far from perfect on the first try, and it would need a very large amount of hand optimizing to reach it's full potential.  When the 65816 code is fully optimized there is a huge huge difference in speed compared to unoptimized 65816 code.  Much, much larger than the difference between unoptimized and optimized 68000 code.

This gets way, way exaggerated once you use higher-level/scripting language and have the computer do all the translating into assembly for you.  Big complicated things like games were programmed with script-engines to speed-up development.  Add to that, Nintendo went all cheapskate, and limited the amount of 3.58 Mhz game ROMs and made far too many games in 2.68 Mhz, just to make a little extra profit on game carts.

Add all of this up, and the Super Nintendo's CPU only ran about a hundredth of what it was actually capable of doing.  The only exceptions to this was, Space Megaforce, Smash TV, Wild Gun, and maybe very few others.

Offline Zurnathus

  • 0001
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile

Re: making video games, where do you start?, how do you stay focus?

Reply #41 on: August 19, 2008, 01:09:50 am
this place might answer some of your questions
http://jharbour.com/

the Game Dev tutorials are about programming for the GBA, which is in C & assembly. so maybe it will be a little more familiar territory for you
you can always go to gamedev.net of course & read up one what game designing is & the process invovled...it really hasn't changed much since the old days, just that you have many more people involved in the process for a 3D game

as for a language to choose, it may seem like a chore (& it is) but learning a higher level language is best if you're making games. they've recommended some really good ones here, like Python & Ruby...Flash is another avenue you could try, it's basically an "any idiot can do it" language. & if you don't believe me do a search in the search engine of your choice for flash games & you will see that many idiots are doing it!! (& that's not an insult)

Offline PypeBros

  • 0100
  • ***
  • Posts: 1220
  • Karma: +2/-0
  • Pixel Padawan
    • PypeBros
    • View Profile
    • Bilou Homebrew's Blog.

Re: making video games, where do you start?, how do you stay focus?

Reply #42 on: August 19, 2008, 07:40:11 am
I read some interviews with real programmers who worked on old 16-bit games.  Believe it or not, most Super Nintendo were NOT written in assembly, instead they were written in a scripting language.
( ...)
  Big complicated things like games were programmed with script-engines to speed-up development.  Add to that, Nintendo went all cheapskate, and limited the amount of 3.58 Mhz game ROMs and made far too many games in 2.68 Mhz, just to make a little extra profit on game carts.

Hm. Interesting thing. Well, not that it surprises me lots, as that's somehow the approach i'm following on the DS in my own hobby game, and it's been the approach followed by Eric Chahi for Another World as well as by Lucas Arts for Maniac Mansion and further similar games. Yet, the core of the game -- that is the game engine itself -- that performs repetitive and things alike such as detecting collisions, manage the sprite list, etc. will likely be written for efficiency. Same goes for special effects that are triggered by the horizontal retrace -- that will be the job of the system programmer.

All the game logic, e.g. what to do when some collision occur, which action to trigger when a button is pressed in this or that circumstances, how to lit candles and open the door when you walk on that secret step and throw snakes at you if you walk on the wrong one ... All this can safely be done with a scripting language as it's "on event" only. And yes, it will represent the largest part of the code being written for the game.

If you tried to write *that* in an optimized form too, your game development would turn into a complete nightmare. The slightest change in any dialog or puzzle or whatever could completely trash your optimization -- or force you to rewrite large chunk of code just because you need one extra register somewhere :P

Offline Beoran

  • 0010
  • *
  • Posts: 112
  • Karma: +1/-0
    • View Profile

Re: making video games, where do you start?, how do you stay focus?

Reply #43 on: August 20, 2008, 09:28:30 pm
Yes, that's basically the way to do it. The point is that with things like Pygame or Rubygame you get the low level stuff basically pre-programed for you "for free", and then you can concentrate on the high level logic in the "scripting" language (Python or Ruby, respecively), as most of the hard work has already been done for you.

Dragonboy, if you're still up to it, I can continue my tutorial :)
Kind Regards, Beoran.

Offline Atnas

  • Moderator
  • 0100
  • *
  • Posts: 1074
  • Karma: +2/-0
  • very daijōbs
    • paintbread
    • paintbread
    • View Profile

Re: making video games, where do you start?, how do you stay focus?

Reply #44 on: August 27, 2008, 01:43:01 pm
If not for him, then please for me, if you have the time. I'm really interested and have learned a lot from your previous posts in this thread.

Offline Helm

  • Moderator
  • 0110
  • *
  • Posts: 5159
  • Karma: +0/-0
    • View Profile
    • Asides-Bsides

Re: making video games, where do you start?, how do you stay focus?

Reply #45 on: August 27, 2008, 02:09:18 pm
Same. It's very discouraging that dragonboy hasn't so much as said thank you for all your efforts, but I will. Thanks. So far it's been a good primer.

Offline Beoran

  • 0010
  • *
  • Posts: 112
  • Karma: +1/-0
    • View Profile

Re: making video games, where do you start?, how do you stay focus?

Reply #46 on: August 27, 2008, 05:55:16 pm
Ok, I'm more than willing to carry on my tutorial, however, from what point should I continue? If you guys are interested, were you able to install Ruby and get started with using it? Should I start again, explaining Ruby from the very start, or just continue from where I got with Dragonboy, at the module level?
Kind Regards, Beoran.

Offline Atnas

  • Moderator
  • 0100
  • *
  • Posts: 1074
  • Karma: +2/-0
  • very daijōbs
    • paintbread
    • paintbread
    • View Profile

Re: making video games, where do you start?, how do you stay focus?

Reply #47 on: August 27, 2008, 09:26:38 pm
I was able to install ruby and also follow your previous posts to the letter. (already had scite because I do a little php, html, and css, but about a year ago I tried to write a ruby program based on my rudimentary knowlege of rpg maker scripting, but I didn't have ruby installed so it didn't work, haha.)

The only part that wouldn't work for me was installing the gem file. I got an error every time I tried to do so.

ERROR: While executing gem ... <Gem::GemNotFoundException>
Could not find rubygame-2.0.1-mswin32.gem <> 0> in any repository

And I did tell it where to look. Stumped!

Offline Helm

  • Moderator
  • 0110
  • *
  • Posts: 5159
  • Karma: +0/-0
    • View Profile
    • Asides-Bsides

Re: making video games, where do you start?, how do you stay focus?

Reply #48 on: August 27, 2008, 09:39:54 pm
Beoran, I'm interested in seeing how you go from the level you're at right now to coding a simple platformer or whatnot. I have some experience with script languages like in Game Maker or AGS, I am just interested to see how somebody makes a clean base for that sort of thing, and also how the data is structured when you're receiving very complicated input from the player like in a platform game and is interpreted meaningfully and bug-free by the program. I am not actively programming as I read these, I just want to understand the logic behind the process.

Offline gamingjustin

  • 0001
  • *
  • Posts: 27
  • Karma: +0/-0
    • View Profile

Re: making video games, where do you start?, how do you stay focus?

Reply #49 on: August 27, 2008, 10:37:14 pm
To dragonboy (and in general): [NOTE: These are my thoughts on a solo project.] You sound quite enthused about developing a game, which is great! But, try not to drown before you get in the water, you know? :blind: I think it is most important to design something you would enjoy playing. Design a game like you're the only one who matters. Design what you think others will like and it can become very difficult to focus; the more personally attached to your game the better. Design a game disregarding technical limitations of any kind. Is it really worth sacrificing a great idea just to squeeze it onto your favorite system (like Megadrive/SNES)? Even abstract ideas that are potentially great (but don't exist to play) far outweigh a technical example or demo of physics (or something of the like).

The most famous example is Cave Story; made by one person over the course of five years, mostly during late hours as a hobby (he already had a job and family, after all). Having read a few interviews he described no direction and no planning involved. When asked how he composed the music he responded something like "I'd put down a few notes. If they sounded good I kept them, if I disliked them I got rid of them. I repeated this process." I appreciate that kind of work-flow and philosophy, despite not always having the luxury of working at a "relaxed" pace. I get the sense that Cave Story was created at a snails pace; logically, thoughtfully, lots of retreads and reworkings. When (not if) you get a chance to play it you will soon realize (if you haven't already) this game is almost perfect. Really. Nothing feels tacked on, it doesn't feel pushy, it doesn't hold your hand or guide you along. It's polished and wholesomely enjoyable. http://www.miraigamer.net/cavestory/ And YES it is for Mac as well, and YES it has been translated into English. So for all who enjoy good games, good design, and good inspiration-- download this sucker now.