• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
symbiote

3d on an 8-bit cpu

5 posts in this topic

hi guys,

i want to create some 3D on an 8-bit cpu (but with ~4kb memory). basicly i want to be able to specify some shapes, with polygons that have orientation and position (probably with matrices).

i thought about implementing 8-bit minifloats (bits: 1 sign, 4 exponent, 3 fraction/mantissa) for my computations, this would allow me to make small changes to smaller values. but not smaller changes to greater values. which would not be a problem with what is being viewed but it would be a problem in logic, such as calculating the distances between shapes. if i would try to store the positions of polygons relative to eachother within the same shape, then the values of the minifloats might not be so high. but the world would still have to have distances between shapes. also shapes that have linear speed would be hard to track the position of because miniflaots don't increment linearly. also designing a world with where shapes have these kinds of coordinates could be a problem.

- should i try to implement a 16-bit integer format to solve the incrementation of speed?
- should i drop the minifloat idea and do everything with 16-bit integers?
- what do you normally do when you're world doesn't fit into floating points? (are there any special techniques?)
- should i accept the 8-bit integers of the cpu and use that? (i doubt 127 values in each direction is big enough for all coordinates but it might be for what is on screen)

any advice would be appreciated,
symbiote
0

Share this post


Link to post
Share on other sites
You're probably going to want to do fixed-point math in 16 or even 24 bits, depending on the accuracy you require.

In general this sort of work requires you to know where the significant bits of your calculation is currently at, and to exploit that to maintain accuracy at all stages. The fewer bits you're working with, the more attention you will have to pay to these issues.

I worked on a small ray-caster (like Wolfenstien 3D) using 16bit math, and lost interest before taking it very far, but the limitations of fixed point in 16bit was apparent even in relatively straight-forward math.

[url="http://www.gamedev.net/user/49771-benryves/"]Benryves [/url]was workiing on a raycaster for the TI-83+ awhile back, using 16bit fixed-point, IIRC.

Here are a few links to his stuff:
[url="http://www.gamedev.net/blog/161/entry-1531387-8-bit-raycasting-quake-skies-and-animated-textures/"]Journal: 8-bit Raycasting Quake Skies and Animated Textures[/url]
[url="http://www.gamedev.net/blog/161/entry-2213829-a-primitive-3d-engine-for-the-ti-83/"]Journal: A primitive 3D engine for the TI-83+[/url]
Web: [url="http://benryves.com/journal"]http://benryves.com/journal[/url]
0

Share this post


Link to post
Share on other sites
8-bit processor with 4KB of memory... that's going to be... interesting. First of all, is it 4KB for everything, or just for work RAM? (i.e. the code and model data is in separate ROM) Because in the case of the latter you could get a lot of speed up by using look-up tables. If everything has to fit in 4KB, tough luck getting many tables there.

Also: 8-bit integers may be enough to specify the shape of a given mesh. You won't be able to make very detailed meshes anyways if you pretend to have any sort of speed, not to mention memory usage =P If you can get away with 8-bit integers you're going to make your life a lot easier when it comes to performance.

Another thing is what kind of transformations you plan to do. Translation is easy. Scaling needs multiplications... Rotation is going to be madness the usual way. If you plan to do rotation you may want to use polar coordinates, because then to rotate you just need to add a value to the angle, and then you can convert it to X/Y/Z coordinates using a look-up table or something, reducing or even avoiding the multiplcations needed.

Clipping is going to be madness. I hope you have a plan for this one, especially for the near-Z plane (for the X/Y planes you could attempt to clip while rendering the triangles, for the far-Z plane just remove polygons after a certain distance, like pop-up for early 3D games used to work).

Also: cheat as much as you can. Seriously, if there's something that could be rendered with something that isn't standard polygons but rather a more restricted shape that could be done with a more specific algorithm, by all means try to do that. You can use this to reduce model complexity a lot and gain extra speed.

I'm pretty sure there's a lot more to be said, but that's what comes to my mind right now. It'd be useful to know how much memory do you actually have (if the code has to go in those 4KB or it's separate).
1

Share this post


Link to post
Share on other sites
Ugh, dammit. Phones are terrible for accidentally clicking things you don't mean to. Sorry for the -1 Sik, maybe someone will come along and fix it.
0

Share this post


Link to post
Share on other sites
This might give you some inspiration:

[url="http://z88dk.cvs.sourceforge.net/viewvc/z88dk/z88dk/libsrc/lib3d/"]http://z88dk.cvs.sourceforge.net/viewvc/z88dk/z88dk/libsrc/lib3d/[/url]
0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0