Jump to content

  • Log In with Google      Sign In   
  • Create Account

bigbadbear9885

Member Since 23 Nov 2010
Offline Last Active Apr 27 2014 05:58 PM

Posts I've Made

In Topic: SDL how to move an object by holding a button rather then pressing the button...

07 December 2012 - 12:44 AM

(sigh) Now I'm hitting some more problems, things may be a little mixxed up. Now it won't move at all! It shows but doesn't respond in movement. Heres the code I wrote if you or anyone can see what I'm doing wrong

Attached File  ship.bmp   2.05KB   52 downloads
#include "SDL.h"
int main(int argc, char *argv[])
{
bool bRun = true;
SDL_Surface *screen , *ship;
SDL_Rect shipRect;
shipRect.x = 100 ;
shipRect.y = 100 ;
	
SDL_WM_SetCaption("Fryday", NULL);
screen = SDL_SetVideoMode( 256 , 224 , 32 , SDL_DOUBLEBUF|SDL_HWSURFACE|SDL_ANYFORMAT);

SDL_FillRect(screen , NULL , 0x221122);
ship = SDL_LoadBMP("./ship.bmp");
SDL_SetColorKey( ship, SDL_SRCCOLORKEY, SDL_MapRGB(ship->format, 255, 0, 255) );
SDL_BlitSurface( ship , NULL , screen , &shipRect );
SDL_Flip(screen);
	 SDL_Event event;
  while(bRun) {
  bool keysHeld[323] = {false}; // everything will be initialized to false

if (SDL_PollEvent(&event))
	  {
		 if (event.type == SDL_QUIT)
		 {
		    bRun = false;
		 }
		 if (event.type == SDL_KEYDOWN)
		 {
		    keysHeld[event.key.keysym.sym] = true;
		 }
		 if (event.type == SDL_KEYUP)
		 {
		    keysHeld[event.key.keysym.sym] = false;
		 }

	  if ( keysHeld[SDLK_ESCAPE] )
	  {
		 bRun = false;
	  }
	  if ( keysHeld[SDLK_LEFT] )
	  {
		 shipRect.x -= 1;
	  }
	  if ( keysHeld[SDLK_RIGHT] )
	  {
		 shipRect.x += 1;
	  }
	  if ( keysHeld[SDLK_UP] )
	  {
		 shipRect.y -= 1;
	  }
	  if (keysHeld[SDLK_DOWN])
	  {
		 shipRect.y += 1;
	  }
}
    }; // while(bRun) { END
return 0;
}

In Topic: How were Commodore 64 games developed?

04 November 2012 - 05:55 PM

I mean just like how you can just start the C64 without anything, and just write basic code and compile it without any compiling software, could you do the same exact thing with assembly, just go write some assembly code without anything and assemble same, same exact thing or did you have to Have some assembling software?

In Topic: How were Commodore 64 games developed?

04 November 2012 - 05:22 PM

Can the C64 assemble by itself?

And so those Paint programs you listed could be used for the game graphics and sprites on the C64?

In Topic: How do you actually make an arcade pcb?

21 September 2011 - 08:42 PM

There's nothing special about a PCB used in an arcade machine. They're the same as any other electronics: resistors, capacitors, transistors, maybe some relays or latches, the odd IC. Nothing magic. If you're interested in how electronics work, I recommend an electronics hobby community; GDNet isn't really specialized in hardware.

I'm not sure where you get the impression that arcade machines are "full of chips" whereas consoles are not. Have you disassembled either of these things?

I also don't know what you mean by "arcades" being "so much more powerful" than consoles. Usually, it's the other way around, by many orders of magnitude!

Lastly, arcade machines are manufactured the same as any other electronics. There's typically a prototyping phase, then once the circuit design etc. is all nailed down, they do a couple revisions in "actual" hardware and then scale up to mass production. Secret: many arcade machines are actually built like general-purpose computers, with just really restricted functionality presented to the "user." Think of a typical arcade machine as a console in a fancy cabinet.


In general I think it's hard to give good answers to your questions because they are very vague; could you elaborate a bit on your interest in this area and what specifically you want to know more about?


Well, what I said was pretty much based on my experiance.

When I played the Mortal Kombat arcades, they have better graphics and everythings bigger and the sound is a little more realistic.
So that made me assume that their hardware was superior.

About the PCB thing, I've seen both motherboard of consoles and arcade boards. Console's I see some rom chips and other componets, and from all the arcade boards I've seen, so many rom chips are everywhere (The rom chips was what I was talking about)

I'm really sorry about my unclearness, It just seemed odd to me compared to consoles from all that I've experienced, and I just wanted to make sure how it worked. I have Autism btw.

In Topic: How does Programming a game work?

24 June 2011 - 02:43 PM

It all helps alot, thank you, guys : )

PARTNERS