walaber Posted January 1, 2015 Share Posted January 1, 2015 Now that Wall Jump Ninja is basically finished, I've started working on an idea I've been thinking about for a couple weeks now... a motor-cross / excitebike / trials type game. the "port" of tubin' I started earlier isn't nearly as exciting to me as this, so I think this'll be my next project. So far I've just worked out how I think the main kernel should work, and got a proof-of-concept up and running in Stella. For this I want smooth horizontal scrolling, and also for the jumps and terrain to be as smooth as possible. I've accomplished it by using an asymmetric playfield for the rough details, and then the ball and both missiles (set to 8 clocks wide) translated every few scanlines to describe the actual details of the jumps. this means I have to share colors between most objects, so this will likely be another "silhouette character against a colorful background" just like ninja was. I'm also limiting the vertical space that the course can occupy in order to get this all to fit in RAM. I'm also cropping horizontally so I can completely ignore the 4 bits of PF0 on each edge of the screen. I'm pretty happy I got the kernel to work! the other good thing about this kernel is that it should be quite efficient to store level data, as the actual playfield and jumps can be computed from just a few pieces of information (basically a list of jumps from a pre-determined set, and how far they are apart from each other). I'm expecting to keep the game quite simple, since I want to spend the rest of the ROM space on rotation frames for the player so that you can do flips My goal is another 4K game this time. here's a WIP screenshot, and one with Stella's debug colors turned on, so you can see technically how it's done. 8 Quote Link to comment Share on other sites More sharing options...
TrekMD Posted January 1, 2015 Share Posted January 1, 2015 Very cool! Quote Link to comment Share on other sites More sharing options...
+Atarius Maximus Posted January 1, 2015 Share Posted January 1, 2015 Awesome! You've got some great ideas and are obviously very talented. Thanks for sharing. I'd love to see a port of Toobin too. 1 Quote Link to comment Share on other sites More sharing options...
KevinMos3 Posted January 2, 2015 Share Posted January 2, 2015 This looks very exciting. I can't wait to see what you do with it. Quote Link to comment Share on other sites More sharing options...
Jinroh Posted January 5, 2015 Share Posted January 5, 2015 Wow really cool man, something like Excitebike could be sweet on the VCS. 1 Quote Link to comment Share on other sites More sharing options...
AtariBrian Posted January 5, 2015 Share Posted January 5, 2015 Those images look great ! Quote Link to comment Share on other sites More sharing options...
K.Michael Posted January 8, 2015 Share Posted January 8, 2015 You are like a non-stop hype machine, I've been getting pumped for Ninja for a few weeks, and as soon as it is close to published you announce another game in the works that looks awesome! Quote Link to comment Share on other sites More sharing options...
Thomas Jentzsch Posted January 8, 2015 Share Posted January 8, 2015 (edited) Looks good, but I figure the biggest problem will be to get the physics right. Have you already thought about that? BTW: I suggest that the terrain will be semi-randomly generated. Edited January 8, 2015 by Thomas Jentzsch Quote Link to comment Share on other sites More sharing options...
walaber Posted January 9, 2015 Author Share Posted January 9, 2015 I've thought a little about the physics, yeah. I'm assuming I'll definitely have to be using a lot of 16-bit "fixed point" math to make everything smooth. I'm not sure how realistic I want to simulate the physics just yet... probably some fairly realistic aspects like gravity and acceleration, but simplified physics for flipping/landing/doing wheelies, etc. we'll see how it goes! Quote Link to comment Share on other sites More sharing options...
Thomas Jentzsch Posted January 9, 2015 Share Posted January 9, 2015 Gravity and acceleration are very easy to implement, but everything else requires a lot of physics if the game should feel right. For the rather simple tow bar physic in Thrust I had to do a lot of research and experimenting, your physics are much, much more complicated. I suggest that you do some research and maybe use a different platform and language for experiments. Quote Link to comment Share on other sites More sharing options...
Mikes360 Posted January 9, 2015 Share Posted January 9, 2015 I think this looks good, I think some good physics would really set this game appart if its done well. I am looking at implementing a horizontal scrolling playfield too, I may follow your idea of ignoring the PF0 as it saves space and time in the main kernel. Quote Link to comment Share on other sites More sharing options...
walaber Posted January 9, 2015 Author Share Posted January 9, 2015 Gravity and acceleration are very easy to implement, but everything else requires a lot of physics if the game should feel right. For the rather simple tow bar physic in Thrust I had to do a lot of research and experimenting, your physics are much, much more complicated. I suggest that you do some research and maybe use a different platform and language for experiments. I've a fair amount of experience writing physics, I created a game on PC / Mobile called "JellyCar" which had a custom soft-body physics engine that I wrote. I'm not worried about the math, I just need to balance what I can afford from a CPU cycle perspective, and also learn how to do basic signed fixed point math in 6502 asm ... and of course tune the model to what plays well. Quote Link to comment Share on other sites More sharing options...
BrianC Posted January 9, 2015 Share Posted January 9, 2015 oh cool. I had JellyCar on iPad. That game was a lot of fun. Quote Link to comment Share on other sites More sharing options...
DT Kofoed Posted January 12, 2015 Share Posted January 12, 2015 After Wall Jump Ninja, count me a fan to follow whatever you whip up. Quote Link to comment Share on other sites More sharing options...
walaber Posted January 14, 2015 Author Share Posted January 14, 2015 I've made a tiny bit of progress on this, so far just working on the rotation frames for the motorcycle. I'm going for 16 frames of rotation to make it pretty smooth. here's an animated GIF of the sprite rotation loop: 16x16 enlarged and with non-square pixels: 5 Quote Link to comment Share on other sites More sharing options...
Mef Posted January 14, 2015 Share Posted January 14, 2015 enlarged and with non-square pixels I'm impressed, there isn't many pixelists who care and can compensate for this in their design. Very fluid animation, and greatly defined frames. Not even one messy "transition angle", each sub-picture is perfectly translated into the medium of small rectangles. Very well done! Quote Link to comment Share on other sites More sharing options...
walaber Posted January 22, 2015 Author Share Posted January 22, 2015 progress has been slow, but still moving forward. today I wrote myself a little python program to batch convert individual PNG files in a folder into a "graphics.inc" file that properly formats the data into 8-pixel wide strips of data, suitable for using with player sprite graphics. This allows me to easily take my photoshop/pixel images I create, and convert them into data for the game. I know other tools are around to do this, but all the ones I could find seemed to be either web-based, or only for Windows (I'm on a Mac). Other people might find this useful, so here's the python code (it requires the PIL image library): import sys import os.path import math from PIL import Image # this will be the string data we want to write to graphics.inc, formatted for DASM final_output = '\tMAC GRAPHICS\n' for filename in os.listdir('./'): base = os.path.splitext(filename)[0] ext = os.path.splitext(filename)[1] # currently only support PNG files. if ext == '.png': print 'processing ' + filename + '...' img = Image.open( filename ) img_size = img.size # convert to 1-bit on/off. img = img.convert("L") sections = int(math.ceil(img_size[0]/8)) for s in range(sections): section_name = base + "_" + str(s) final_output += section_name + "\n" for y in range(img_size[1]+1): # don't forget to invert the image vertically... # and also give an extra line of pixels of zeros at the top (bottom). final_y = (img_size[1]-1) - y final_output += "\t.byte #%" section_comment = "\t\t;" for x in range(: final_x = (s * + x pix_val = 255 if (final_x < img_size[0]) and (final_y < img_size[1]) and (final_y >= 0): pix_val = img.getpixel((final_x,final_y)) if (pix_val <= 128): final_output += "1" section_comment += "X" else: final_output += "0" section_comment += " " final_output += section_comment + "\n" final_output += "\n" final_output += "\tENDM" text_file = open("graphics.inc", "w") text_file.write(final_output) text_file.close() you use it by running in the directory with the PNG files: python process_images.py this creates a file called "graphics.inc" with entries that look like this: MAC GRAPHICS bike_0000_0_0 .byte #%00000000 ;........ .byte #%01110000 ;.XXX.... .byte #%10001000 ;X...X... .byte #%10111111 ;X.XXXXXX .byte #%10001111 ;X...XXXX .byte #%01110110 ;.XXX.XX. .byte #%00001111 ;....XXXX .byte #%01111111 ;.XXXXXXX .byte #%00011100 ;...XXX.. .byte #%00000111 ;.....XXX .byte #%00000011 ;......XX .byte #%00000001 ;.......X .byte #%00000000 ;........ .byte #%00000000 ;........ .byte #%00000000 ;........ .byte #%00000000 ;........ .byte #%00000000 ;........ bike_0000_0_1 .byte #%00000000 ;........ .byte #%00001110 ;....XXX. .byte #%00010001 ;...X...X .byte #%11010101 ;XX.X.X.X .byte #%11010101 ;XX.X.X.X .byte #%11001110 ;XX..XXX. .byte #%01100100 ;.XX..X.. .byte #%01111100 ;.XXXXX.. .byte #%10001000 ;X...X... .byte #%00101000 ;..X.X... .byte #%11011000 ;XX.XX... .byte #%11000000 ;XX...... .byte #%01110000 ;.XXX.... .byte #%11010000 ;XX.X.... .byte #%11110000 ;XXXX.... .byte #%01100000 ;.XX..... .byte #%00000000 ;........ ENDM Note how it also puts comments in that make the graphic data a bit easier to see. it puts all the graphic data into a macro called "GRAPHICS", so then in your main game code you can "include graphics.inc", and then wherever you want your data statements you just put "GRAPHICS" on a line, and they get pasted in there. so I've now got my rotation frames into the program, and easily updatable, along with making it easy to add new graphics to the game. Up next I need to get a level format that properly creates playfield and ramp data, and then start working on the actual bike physics. 2 Quote Link to comment Share on other sites More sharing options...
Thomas Jentzsch Posted January 22, 2015 Share Posted January 22, 2015 Note how it also puts comments in that make the graphic data a bit easier to see.Alternatively you can use the attached file and then write: .byte zz________ .byte zz_XXX____ .byte zzX___X___ ... graphics.zip Quote Link to comment Share on other sites More sharing options...
+SpiceWare Posted January 22, 2015 Share Posted January 22, 2015 Alternatively you can use the attached file and then write: .byte zz________ .byte zz_XXX____ .byte zzX___X___ ... I don't use that anymore, my new mode file for jEdit that colorizes binary values works much better: See my jEdit blog series for more info. 1 Quote Link to comment Share on other sites More sharing options...
Thomas Jentzsch Posted January 22, 2015 Share Posted January 22, 2015 That's neat. Are all 1s in the source code colored that way now? Or only those within a binary number? Quote Link to comment Share on other sites More sharing options...
+SpiceWare Posted January 22, 2015 Share Posted January 22, 2015 That's neat. Are all 1s in the source code colored that way now? Or only those within a binary number? Only those preceded by %. In the right section you can see a bunch of 1s in the code: The other nice thing about using jEdit is after some initial setup you can compile with DASM and launch the resulting ROM in Stella. More info in the Using jEdit for 2600 development topic I posted last September. Quote Link to comment Share on other sites More sharing options...
walaber Posted January 22, 2015 Author Share Posted January 22, 2015 That's cool! I use Sublime Text as my editor, I'm going to look into something similar. It has a pretty robust build system as well, so I'm pretty sure I can set it up that I can hit Command-B and it will run my graphics script, compile dasm and then launch Stella. Something I think I'll look into as well. Quote Link to comment Share on other sites More sharing options...
gauauu Posted January 22, 2015 Share Posted January 22, 2015 Alternatively you can use the attached file and then write: .byte zz________ .byte zz_XXX____ .byte zzX___X___ ... That's clever and awesome! Thanks! Quote Link to comment Share on other sites More sharing options...
Thomas Jentzsch Posted January 23, 2015 Share Posted January 23, 2015 That's clever and awesome! Thanks! Not my idea. Quote Link to comment Share on other sites More sharing options...
walaber Posted January 25, 2015 Author Share Posted January 25, 2015 Today I got some basic syntax highlighting working in Sublime Text that recognizes all of the opcodes and VCS.H keywords, and also does the same kind of fancy highlighting that SpiceWare has. Enough procrastinating, I need to get back to working on the game If anyone wants the syntax definition file, let me know and I'll post it. 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.