Search the Community
Showing results for tags 'sprites'.
-
Hello there, I'm trying to learn the 6502 assembly language by writing a very simple shoot game for the C64. Nothing complicated : a couple of moving sprites, a player, a weapon.😄 For now, I'm looking for a way to move a sprite back and forth horizontally on the screen. $d000 is the X coordinate of my sprite. So I want this register to move from 0 to $FF, then back from $FF to 0. But not in a simple loop, so I tried something like this inside my main game loop : "ennemyState" is a register. set it to 0 Main game loop: check if "ennemyState" is > 1 or not if > 1, increment $d000 if < 1, decrement $d000 if $d000 ==0 : check ennemyState ==0, set it to 2. Else, set it to 0 instead. (to swap the increment) ... do other things jump to main game loop. And, in assembly (I removed some additional code for clarity) : incrementEnnemi = $0003 ; dummy memory address jsr $e544 ; clear screen routine lda #$03 ; set color sta $d020 ; border color lda #$00 ; black color sta $d021 ; main central screen lda #$80 sta $07f8 ; adress pointer sprite 1 lda #$03 sta $d027 ; color sprite 1 lda #$80 ; 128 to start sta $d000 ; x position sprite 1 lda #$80 sta $d001 ; y position sprite 1 lda #%0000001 ; show sprite 1 sta $d015 lda #$010 sta incrementEnnemi mainLoop: ; main loop jsr loopNop ;wait a bit lda #$02 ; check if ennemy must go left to right or right to left cmp incrementEnnemi ; http://6502.org/tutorials/compare_instructions.html bcc move_ennemy_right ;comparison move_ennemy_left: ldx $d000 ;move sprite dex stx $d000 jmp checkEnnemyPosition move_ennemy_right: ldx $d000 ;move sprite inx stx $d000 jmp checkEnnemyPosition checkEnnemyPosition: ;check if position ==0 lda $d000 ; if zero set flag bne ennemyDone ; sortie car pas a zero Branch on EQual (zero Z flag set) ; Branch on Not Equal (zero Z flag clear) ;we are =0, so we must change the register value lda #$02 cmp incrementEnnemi bcc ennemy_switchNegative ennemy_switchPositive: lda #$010 sta incrementEnnemi jmp ennemyDone ennemy_switchNegative: lda #$01 sta incrementEnnemi jmp ennemyDone ennemyDone: jmp mainLoop And it works, but as a beginner I wanted to know if there could be a better way to achieve the same result ? I'm using a full byte to check is I must increment or decrement the sprite position, I'm not sure to know how to do the same thing with a single bit. (maybe an AND ?). Or if there is a very easiest way to do this ? And other difficulty, the sprite position can be not only from 0 to 255, but from 0 to 320. To put the sprite coordinate from 255 to 320, I need to set a bit from $d010 to add 256 to my sprite coordinate. Is there a simple way to achieve this, and not using tons of jump and compare operations ? Maybe I'm not familiar yet with the good instructions... Thanks in advance !
- 16 replies
-
- c64
- assembly language
-
(and 1 more)
Tagged with:
-
Here is a video showing how i import sprites to the coco3 and some 6809 code to move / display them.
- 6 replies
-
- 2
-
- sprites
- color computer
- (and 5 more)
-
It would be really nice to know if the detection between sprites in games (we could also discuss interaction with backdrops), are dependent on 1) Spriteblock coming into contact with other SpriteBlock (entire square 16x16, 32x32 etc), or 2) whether it is the drawn pixels within the sprites that makes for ‘crash-detection’/interaction-detection or 3) whether it is the programming behind that matters. - - - I’m primarily concerned with 2D games, not 3D games (driving/fligth). But any input is welcome. Thanks in advance for any info, input, experience.
-
- collision detection
- sprites
-
(and 3 more)
Tagged with:
-
Hi guys, I'm working on a 7800 platformer called Morf, but hitting a few issues maybe you can point me in the right direction. Having trouble with sprites inverting their colors In the above image: - The main character Morf is inverted, green/black - The second tile set should be using a blue color palette for the water at the bottom of the screen. - Recently for no obvious reason the sprites break up when moving vertically like the drip from the pipe below. Also you can see the left moving sprite has the correct palette. Any help or advise would be awesome ?
- 83 replies
-
- 12
-
From the album: Lynx Graphics
-
From the album: Lynx Graphics
-
From the album: Lynx Graphics
-
From the album: Lynx Graphics
-
From the album: Lynx Graphics
-
In the last few weeks, I've been working on sprite extraction and insertion scripts for use in animations. As a test case, I made a mosaic of Space Invaders aliens: The animations were compiled from the arcade, Atari 2600, Atari 5200, Atari 8-bit, MSX, NES, and ZX Spectrum versions. How many of these have you played and which is your favorite?
- 1 reply
-
- 4
-
- space invaders
- animation
-
(and 1 more)
Tagged with:
-
I'm programming a little card game in Pascal. Card games in Pascal are fun programming exercises but are generally not visually interesting. I'm looking at changing up the UI to show cards being dealt, presented, flipped. I looked into turtlegraphics, but I'm thinking I'll use sprites. If for no other reason than because I have access to far more documentation on sprites than turtlegraphics. Sprites will make it a non-portable Pascal program, but my goal in doing this wasn't to create a portable Pascal program. The current text UI version of the code is portable to any UCSD system, save for the random number generator. I found some pseudo-random-number generators that I believe could be easily implemented, so that's likely a problem easily solve-able. I'm just going for a little visual improvement. With all of that as a preamble, here's my question. It's been a long time since I coded sprites, so I'm creating some test cases to model out the things I'll need to do for this to work. My test moves a double-sized sprite (not magnified) from (y=95,x=128) at velocity (y=-8, x=0) for a countdown of 64, then a velocity of (y=-4,x=0) for a countdown of 64. Then it holds position. I'm just experimenting with showing a card come out fast, then slow down, then stop. (Inspired by the truly beautiful motion of the Q*Bert demo we saw at the Evanston meet-up a few weeks ago!) I'd expect the sprite to end up at 95 + ((-8/32*64) + (-4/32*64)), or y=71, x=128. It isn't. It's ending up at double the distance: y=47, x=128. The velocity/32 every 60th of a second math comes from page 145 of the Pascal Compiler manual. This suggests a sprite travels just about 2 pixels every 60th of a second. Or, assuming it's an octal and not a decimal clock, 1 / 32 * 64 == 2. The Editor/Assembler manual has a different description on sprite motion. Page 341 says, that a velocity of >01 causes a sprite to move one pixel every 16/60th. Assuming that the velocity is the same, it seems to me that the assembler manual says we get 4 pixel moves every (roughly) 60th of a second. Back to our octal clock, 16/64 == 4. If I'm reading this right, the sprite speed in the assembler manual would describe the 2x difference in velocity that I'm seeing with where my sprite is ending up. I haven't run all possible tests yet to figure out if I'm just thick-headed. I haven't coded sprites in assembly or XB routines to time comparisons, I haven't re-timed using a standard sized sprite, etc. But anyone who is familiar with sprite motion who knows the velocity I should expect, I would appreciate it. Best regards, R.
-
I'm aware of the excellent https://www.spriters-resource.com/ that has some sprite rips for a few Atari 2600 games, but I was wondering if anyone knew of any other resources or ways to rip sprites from Atari 2600 games? I think having these would be really cool for this new book project I'm working on, and, while it's obviously not programming related for my intended usage, I figured this sub-forum would be the best place to ask. Thanks in advance!
-
Any sprite rendering algorithms you know of?
DementedPurple posted a topic in Atari 2600 Programming
One of my big questions I have is how I would have an algorithm to figure out where it is on the scanline and then know how many scanlines it has written. I would have to do an increment after every single instruction, and that would waste many precious CPU cycles and ROM space. I guess I could have a register for the X-Position, one for the Y-Position, and one for where in the Scanline, and one for how many scanlines it's written. But wait, I will not only not have enough registers to use them for anything other then that, but I'll also be using more registers then there are inside the CPU.- 20 replies
-
- Sprites
- Programming
-
(and 1 more)
Tagged with:
-
Stumbled across a site that contains video game sprites. For example, here are the sprites for the arcade version of Mr. Do: http://www.spriters-resource.com/arcade/mrdo/sheet/60489/ http://www.spriters-resource.com/arcade/mrdo/sheet/59538/ http://www.spriters-resource.com/arcade/mrdo/sheet/60490/ http://www.spriters-resource.com/arcade/mrdo/sheet/60488/
-
http://atari.dan24.pl/
-
So I'm tinkering with batari for the first time, and have gotten past the ENORMOUS headache of compiling issues to actually be able to make some neat little things. one of my sprites i.e. the player is even animated and looks awesome. I've got a second sprite however, that is making me go crazy. I am 100% new to coding in general, but this is something that I really want to successfully accomplish. Anyway.. the whole thing I want the main player to be able to do is chase mice and "munch" on them to earn as many points as possible before a timer runs out(I'll figure that out later) So far I've gotten my cat to be able to move everywhere flawlessly. the mouse just shows up right now and is chilling out. my question: How can I make it so that when the cat comes in contact with the mouse the player gets their points/ How can I get the mouse to "run away" from the cat and re-spawn when "eaten"? Forgive me for being a complete noob, but I'm at the point where I'm completely stuck, and google has run out of answers. The attached file is what I've come up with so far. Thanks!!!default.bas
- 7 replies
-
- batari basic
- batari
-
(and 8 more)
Tagged with:
-
So while trying to do up semi-humanoid characters, I realized I suck at doing this. More than I anticipated that is. So, let's just BS an armless blob of a monster with stubby feet and call it the hero! It's going to be "fun" trying to figure out what this guy's powers are going to be. XD Going to be more fun trying to figure out what kind of game I'm even making. Oh well, to heck with planning, it's only ever aided my procrastination anyway! Yes I'm aware of the number of colors used in the image, given any game with this little blob will likely be in 160A. That's not an issue as the teeth and eyes will be drawn first with a specific sprite, then the main monster plotted over it - letting the eyes and teeth shine through some transparent gaps in the main sprites. Animations for walking left and right are done. Up and Down walking are tentatively done but I want to try to rework them a bit more.
-
Hello! This is the new demostration for Atari ST by BITS: BITS 0061 waving scroll, fractal tree+grass, parallax scroll, sprites. Download: http://thebitsclub.tripod.com/demo/BITS0061-ST-20140628.ZIP Goodbye, BITS Visit: http://thebitsclub.tripod.com/index.html BITS0061.TXT
-
I'm making a demake of The Legend of Zelda. I made a Link sprite for my demake and I'd like an opinion on it. Tell me whether my sprite is good or if it sucks. Constructive criticism appreciated! Thank you! Here it is!
-
So I've started creating my first Atari game and figured it wouldn't be too hard since I know some other programming languages...oh how wrong I was Anyway, my game isn't very much so far but I haven't been able to make much progress as a few issues (mostly graphical) have been tripping me up. The first issue is that I get errors whenever I try to add more than two sprites or when I try to add color to my existing sprites, and missiles only seem to fire occasionally when pressing the spacebar and when they actually do fire, I can't seem to make it look like they are coming out of player0's gun. I obviously don't expect anyone to troubleshoot my code, but does anyone have any ideas as to what the issues may be? Thanks for the help! prototype.bas prototype.bas.bin
- 8 replies
-
- batari Basic
- missile
-
(and 2 more)
Tagged with:
-
Here are some minimalistic sprite demos for the Intellivision using IntyBasic 0.6 or later.... The first one shows one sprite: The second one shows the Iconic Intellivision running man: (The running man animation is owned by Intellivision Productions, so don't use it for anything commercial without getting their permission first, okay?) Here are the basic and bin files: spritedemos.zip Have fun, Catsfolly
-
I'm not new to drawing sprites, but I am new to worrying about keeping things to 16 (15?) colors. I have a few questions, one regarding lynx specifications, and 1 regarding workflow in gimp which I am a little new to. 1) So I read that the lynx is limited to a 16 color palette per scene/level. I know you can get fancier with a few tricks, but I have no trouble working within those confines, as most commercial lynx games did. Along those lines, I thought I read something here in the lynx programming contest thread, that 1 of the 16 colors is set aside for transparency? In that case, when making sprites, is it true that I should then use only 15 of the 16 colors in the palette on the actual sprites, for the colors and parts of the sprite that I want displayed? 2) Gimp workflow: I have figured out how to create a palette by importing colors from a picture. How do I set a palette as the "only" colors for a picture - such that I could maybe drop in a sprite I have created without concern to the lynx palette, and have it forced into the limited palette I set? I know this isn't programming, but figured it belonged in this forum rather than the general lynx forum. Thanks for your help!
-
The sprites are sticking on the SuperCharger... anyone have an idea what's different? BreaksOnSC.bin The code runs fine on Stella and on the Harmony but when I run it on the SuperCharger the sprites get stuck. I'm guessing there may be an "environment variable" (register) I'm not setting that is pre-configured when Stella or the Harmony runs a SuperCharger game?
-
The other day I was reading a article about the TMS9918A and the writer commented that one could have more than 4 sprites per line by quickly changing the sprite priority which would cause some flicker. That's about all he said. Has anyone ever tried this? The logic sounds good but would the processor be able to keep up? I can't even fathom the logic to do that. ?
- 7 replies
-
- sprites
- programming
-
(and 1 more)
Tagged with: