Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411283 Posts in 69325 Topics- by 58380 Members - Latest Member: bob1029

March 29, 2024, 02:45:25 AM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperPlaytestingFamiEngine v1.0
Pages: [1] 2
Print
Author Topic: FamiEngine v1.0  (Read 8557 times)
Cthulhu32
Level 6
*


Brawp


View Profile WWW
« on: June 19, 2010, 01:35:29 PM »


FamiEngine v1.0
C++ FamiCom-Like Engine



Introduction:

    With the FamiCase art competition coming up on TigForums, I decided I would try an experiment and create a library similar to how the NES actually works. Essentially, you have two VRAM locations (pixel dumping locations), one for the background and the other for the sprites. Then you have two name tables (tile maps) that you can display those backgrounds on, and 64 sprites you can render onto the screen just like the original NES. The engine also provides a sound library to load NSF files and WAV files along with an input system for handling the joystick using SDL_Joystick and regular keyboard mappings. The entire input system is mappable, and the library is designed to be as flexible as you need it to be.

 Usage:

    FamiEngine is extremely easy to get compiled into your C++ project. Simply copy the FamiEngine folder into your code location, and use #include "./famiengine/famiengine.h" to trigger everything FamiEngine related. Please see the Tetris FE example for a more programming related version of this. (I will put more information here later.)
 
Build:
FamiEngine v1.0

FamiEngine Beta v.070910

FamiEngine Beta v.061910

Examples:

Tetris FE beta v.9.20.10 - Build | Source
Tetris FE beta v.061910 -Build | Source
     Controls: [Arrow Keys] [Z,X] B,A [A,S] select, start
         Or Joystick Mapped to the first joystick ID
         Restart at grey block screen with start, go back to menu with Select


Screens:







Please feel free to leave comments/suggestions or things you would like to see in the FamiEngine in this thread. I'm hoping I can get a platformer demo done next week to show how you can make a scrolling side-scroller, and I'll be updating various parts inlucing a pros/cons (real/fake to the actual NES), and hopefully getting the Blargg shader in.
« Last Edit: September 21, 2010, 10:02:55 AM by Cthulhu32 » Logged

Skofo
Level 10
*****



View Profile
« Reply #1 on: June 20, 2010, 12:08:20 AM »

Quote
a library similar to how the NES actually works

Hah! This is certainly one of the more interesting game engine projects I've seen. I don't know C++ so I can't easily try this out, but best of luck with it!

Gentleman
Logged

If you wish to make a video game from scratch, you must first invent the universe.
codergames
BANNED
Level 0
*



View Profile WWW
« Reply #2 on: June 20, 2010, 03:00:59 AM »

Looks good to me, haven't tried it, but looks good, probably works as well.
Logged

Be smart, be brutal, they're invading!
Rob Lach
Level 10
*****



View Profile WWW
« Reply #3 on: June 21, 2010, 06:47:00 AM »

Nice.
Logged

PixelScum
Level 0
***


View Profile
« Reply #4 on: June 21, 2010, 06:47:28 AM »

Looks pretty boss, I'll try it out when I'm not working on something that will feed me.
Logged
Cthulhu32
Level 6
*


Brawp


View Profile WWW
« Reply #5 on: June 21, 2010, 07:56:16 AM »

Yeah I think this really needs a good set of tutorials to help explain why you would want to use the FamiEngine, but hopefully I can get Melly to link it on the main thread when the compo is posted :D Or I'll just put a reply.

Really the best thing about this is the ability to dynamically scroll tiles the same way the NES did it, and allowing the engine to take care of the entire rendering pipeline. Because all you have to do is set attributes, all the messy SDL and OpenGL calls are taken care for you.

Next up, Shaders!
Logged

codergames
BANNED
Level 0
*



View Profile WWW
« Reply #6 on: June 22, 2010, 12:46:39 AM »

I finally got it, you made an engine to help us with the compo. The idea is to pick a Famicom game and clone it using your engine that takes away the pain part, right? That's awfully nice from you mate!

What do you do for a living?

Keep up the good work!
Logged

Be smart, be brutal, they're invading!
Cthulhu32
Level 6
*


Brawp


View Profile WWW
« Reply #7 on: June 22, 2010, 01:08:04 PM »

I finally got it, you made an engine to help us with the compo. The idea is to pick a Famicom game and clone it using your engine that takes away the pain part, right? That's awfully nice from you mate!

What do you do for a living?

Keep up the good work!

Hah thanks! Yeah I'm trying to give us C++ guys a nice boost and a streamlined system to make Famicom/NES games in. I'm making some progress on the FBO shader, but I'll need to include directions on how to compile with GLEW because OpenGL 2 is a pain in the ass to get working right Tired

I'm a full-time C++ programmer (non-game related) working at a coupon company. I used to work in the game industry for about 2 years but my company let everyone go in January of 2009. Here's my portfolio if you want to see the games I worked on : http://cthulhu32.kraln.com/portfolio/
Logged

JamesGecko
Level 3
***



View Profile WWW
« Reply #8 on: June 24, 2010, 12:00:34 AM »

Very nice. Props for making it cross platform.  Smiley
Logged
codergames
BANNED
Level 0
*



View Profile WWW
« Reply #9 on: June 24, 2010, 03:41:00 AM »

I'm very impressed mate! You did quite a lot of stuff. I never worked in a company as a full-time only as a freelance developer. So because I have a lot of spare time often, decided to try myself as an indie game dev making casual games and hand-held console types of game on a PC computer.
Logged

Be smart, be brutal, they're invading!
belbeeno
Level 1
*


video games


View Profile WWW
« Reply #10 on: June 28, 2010, 03:17:08 AM »

Pretty cool!  I'm looking forward to seeing it with the simulated Composite NTSC artifacts and bleeding in.
Logged

@belbeeno - website
Buy my dang game, Factory Hiro!
Cthulhu32
Level 6
*


Brawp


View Profile WWW
« Reply #11 on: July 09, 2010, 05:00:06 PM »

Quick update, I realized for some very odd reason I decided that 8*8 = 0xFF... which is definitely not true. So the VRAM sizes have been increased to 16*16 (proper sizing), along with giving proper defines in the famisets.h so you can make your VRAM any power of 8 you want (64, 128, 256, 512, etc.), mipmap coding is up to you Smiley

Also fixed the very small window resize bug (2 line fix) that I had already done in my shader version, but didn't add to this.

I'm not sure if I'll have time/interest to finish the Shader before the compo is over, but the engine is solid as it is now.
Logged

codergames
BANNED
Level 0
*



View Profile WWW
« Reply #12 on: July 11, 2010, 08:00:49 AM »

And what's a compo again? I keep reading about compo, it just occurred to me that I don't know what that is.
Logged

Be smart, be brutal, they're invading!
Cthulhu32
Level 6
*


Brawp


View Profile WWW
« Reply #13 on: September 21, 2010, 10:02:34 AM »

Updated to version 1.0 now that I have OpenAL fully integrated. Before I was having issues with SDL sound threads crashing when OpenGL would conflict, so I sort of abandoned the idea of keeping that sound system going. But now, I'm using OpenAL instead and streaming per-update. I know some of the timings need to be fixed a little, but thanks to KittyCat on #OpenAL, Bobo, and everyone else who tested on the IRC it seems to be fully working without crashes.

Next I need to write some tutorials to give people a better idea of how to use FamiEngine. At the same time I should develop a Megaman style game to show the potential (and low CPU usage) of the engine. I'll also make sure to have a Linux and OSX build showing off how easy it is to port between the systems :D
Logged

Melly
Level 10
*****


This is how being from "da hood" is like, right?


View Profile
« Reply #14 on: September 21, 2010, 04:21:05 PM »

You're making me want to make a NES game.

Stop it. I have too many ideas already. Crazy
Logged

Feel free to disregard the above.
Games: Minus / Action Escape Kitty
Cthulhu32
Level 6
*


Brawp


View Profile WWW
« Reply #15 on: September 21, 2010, 06:12:17 PM »

After drinking some beer and playing with FamiEngine in Ubuntu, I got it compiled (in 64-bit I just noticed) with a few minor changes to CWaves (GCC is more picky than MingW). However, the NSF player speed is horrendous, so I'm going to play with OGG playback and see if that doesn't eat up 80% of my laptop's CPU. Expect a version later this week, I have some masters homework I'm procrastinating so that has to take priority.

You're making me want to make a NES game.

Stop it. I have too many ideas already. Crazy

Just wait till I get a SMB clone up and running Well, hello there! Ultimately I want to make the Window auto-resize to allow for debug viewing of the VRAM/Name-Tables so you can watch in real-time like FCEUX lets you do. Realistically I'm not expecting anyone to really use this engine besides messing around until I get some good tutorials explaining WHY it works. But I'm this turns on a few people to retro-style restraints in games.
Logged

zircon
Level 1
*


View Profile WWW
« Reply #16 on: September 21, 2010, 07:10:46 PM »

Wow. This is a really awesome project and one that I definitely intend to follow. Let me ask though - you say it has NSF support, does this mean you coded a set of oscillators emulating the 2a03 chip of the NES? Or are you using some 3rd-party code for that? I think it would be neat if you did make a really accurate chip emulation, one that, for example, cuts polyphony appropriately and has that low-resolution crunchiness we all know and love. That, or integrate an existing one. Smiley
Logged
Cthulhu32
Level 6
*


Brawp


View Profile WWW
« Reply #17 on: September 22, 2010, 01:38:08 PM »

Wow. This is a really awesome project and one that I definitely intend to follow. Let me ask though - you say it has NSF support, does this mean you coded a set of oscillators emulating the 2a03 chip of the NES? Or are you using some 3rd-party code for that? I think it would be neat if you did make a really accurate chip emulation, one that, for example, cuts polyphony appropriately and has that low-resolution crunchiness we all know and love. That, or integrate an existing one. Smiley

Yep its an actual 2a03 chip emulation via Festalon ( http://projects.raphnet.net/)  I lifted the original code from Ivan's engine he used to make Platypus Pimps in SDL, but soon realized the OpenGL bits of my engine caused major crashes. So the entire thing is now timed and running as accurately as it can in 4 OpenAL buffers (fills whoever finishes first), copying the buffers Festalon creates into my final mix buffer. Thats combined with the WAV sounds currently being played as well, so it does have the potential to suffer from laggy sound during a bad FPS update cycle.

However, because it plays WAV files and mixes them into the NSF, it actually technically violates the 2a03 schema where you have to stop certain channels to play your noises. But thats a non-NES limitation I can deal with for now :D
Logged

Pineapple
Level 10
*****

~♪


View Profile WWW
« Reply #18 on: September 23, 2010, 03:02:37 AM »

This looks really cool, I might have to try it out sometime.  Beer!
Logged
Player 3
Level 10
*****


View Profile
« Reply #19 on: September 23, 2010, 03:10:56 AM »

Whoa. This is yet another awesome thing. TIGS strikes yet again.
Gotta try this out one of these days.
Logged
Pages: [1] 2
Print
Jump to:  

Theme orange-lt created by panic