_shameless_ Posted January 12, 2015 Share Posted January 12, 2015 i'm working on a five nights at freddy's clone in bb, got the basic of switching rooms and the cam down. but im not entirely sure how i'd set up the movement of the monster up to simulate him moving room to room or attacking you. i figure i'd use variables and random numbers, but other than that not too sure. it's been awhile since i've used bb and this is my first attempt at a serious game, any help is welcome! Quote Link to comment Share on other sites More sharing options...
Byte Knight Posted January 12, 2015 Share Posted January 12, 2015 What I did for my adventure games was assign variables for room, x-position, and y-position for the player and the enemies. The room numbers change when the x-position equals the left or right side of the screen, and also when the y-position equals the top or bottom part of the screen. Then I check to see if the player room equals the enemy room, and if so the enemy appears and moves towards you. Quote Link to comment Share on other sites More sharing options...
_shameless_ Posted January 13, 2015 Author Share Posted January 13, 2015 (edited) yea, you're on to something! in this case there is no "player" you're watching the monster through security cams(as well as the atari can portray it anyways lol ) how would i assign numbers to rooms? i figure something like to make it seem like he's moving, but i'm not sure how i'd run a check to make him appear in the doorway like five nights at freddy's and him attack you. i feel like this is a bit over my head D: heres what i have so far, right looks at the door, left goes back to the main room. up opens the feed. while in the feed use up, left and right and down(each room is assigned to a direction) and fire exits the cam feed. default.bas.bin Edited January 13, 2015 by _shameless_ Quote Link to comment Share on other sites More sharing options...
Retro Lord Posted January 13, 2015 Share Posted January 13, 2015 (edited) Personaly I like to assign counters to my rooms if I make a game with multiple rooms. Like this: if g=1 then playfield: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXX..........................XXX XXX..........................XXX XXX..........................XXX XXX..........................XXX XXX..........................XXX XXX..........................XXX .............................XXX .............................XXX .............................XXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX end if g=2 then playfield: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXX..........................XXX XXX..........................XXX XXX..........................XXX XXX..........................XXX XXX..........................XXX XXX..........................XXX .............................XXX .............................XXX .............................XXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX end if g=3 then playfield: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXX..........................XXX XXX..........................XXX XXX..........................XXX XXX..........................XXX XXX..........................XXX XXX..........................XXX .............................XXX .............................XXX .............................XXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX end if g=4 then playfield: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXX..........................XXX XXX..........................XXX XXX..........................XXX XXX..........................XXX XXX..........................XXX XXX..........................XXX .............................XXX .............................XXX .............................XXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX end if joy0left then g=1 if joy0right then g=2 if joy=up then g=3 if joy0down then g=4 You can do it like this too if you need more control: if g=1 && joy0left then g=2 if g=2 && joy0left then g=10 g being whatever room you want it to be. Now you can have as many rooms as you want =) Give Freddy a random number for him to appear at the door. Like k=(rand3) makes it 1 chance in 4 he will be there. Set it up like this: if k=0 then player1y=200 if k=1 then player1y=200 if k=2 then player1y=200 if k=3 then player1x=50:player1y=50 0-2 renders Freddy outside the playfield. Only when it hits 3 will he show. Hope it helped. =) I can whip up a working Freddy demo for you if you like that you could study. Edited January 13, 2015 by Retro Lord Quote Link to comment Share on other sites More sharing options...
_shameless_ Posted January 13, 2015 Author Share Posted January 13, 2015 oh man that really streamlines things! thanks that'd be awesome if you did! Quote Link to comment Share on other sites More sharing options...
Retro Lord Posted January 13, 2015 Share Posted January 13, 2015 Here's the demo. It's very basic. You sit by the computer, press fire too look closer at the screen. Then press left, right or up too look at the different rooms. There is a chance Freddy might be in there so be careful. If he's not press fire to exit the room. It's commented so you should be able to understand everything. But if you have questions, just ask! =) Add padding and make a great game =) default.bas default.bas.bin Quote Link to comment Share on other sites More sharing options...
_shameless_ Posted January 13, 2015 Author Share Posted January 13, 2015 Thank you so much!! I'll take a look after my classes hope to learn a thing or two! Quote Link to comment Share on other sites More sharing options...
Retro Lord Posted January 13, 2015 Share Posted January 13, 2015 No problem. =) Quote Link to comment Share on other sites More sharing options...
_shameless_ Posted January 13, 2015 Author Share Posted January 13, 2015 (edited) your code is super helpful! i tried modifying the code which spawns the freddy specific to each room( just so he's not out of bounds) and he appears every time and stays on screen with out despawning though :/ . i figured a way to spawn him in the down room too, since that's the only time he'd appear in the door by setting up another variable that add 1 to it every time freddy spawns in a room. once the number reaches the specified amount(random too) he stops spawning in all rooms but the down room, and there, theres a 1 in 2 chance he'll appear in the door way, which you can close or you die. not sure why he isnt despawning though, here's what i have so far default.bas Edited January 13, 2015 by _shameless_ Quote Link to comment Share on other sites More sharing options...
Retro Lord Posted January 13, 2015 Share Posted January 13, 2015 Do you want me too do a setup so he despawns? Quote Link to comment Share on other sites More sharing options...
pacgreg Posted January 14, 2015 Share Posted January 14, 2015 I had an idea on how to make FNAF for 2600, and my idea consisted of holding all character behavior and locations in theoretical space, and try to have highly detailed screens for every situation like the actual game is just still images organized with logic. I would almost recommend this approach and possilby use dpc+ for extra detail. I can't admit that I can tell what much is going on in most of the current screens Quote Link to comment Share on other sites More sharing options...
pacgreg Posted January 14, 2015 Share Posted January 14, 2015 I made a little screen test to show you real quick how dpc+ could liven it up a bit. I might suggest using the method I did chica in instead of the one I did freddy in as it looks much better and is much easier, but I wanted to show that sprites can get crazy detailed in DPC+. This game could have a great look to it if you test the 2600's limits. fnaf.bas fnaf.bas.bin Quote Link to comment Share on other sites More sharing options...
_shameless_ Posted January 14, 2015 Author Share Posted January 14, 2015 Do you want me too do a setup so he despawns? sure! went back and tried a way which didn't do much haha I made a little screen test to show you real quick how dpc+ could liven it up a bit. I might suggest using the method I did chica in instead of the one I did freddy in as it looks much better and is much easier, but I wanted to show that sprites can get crazy detailed in DPC+. This game could have a great look to it if you test the 2600's limits. have not even looked at dpc+, i am all about pushing limits though, just ask my ex Quote Link to comment Share on other sites More sharing options...
pacgreg Posted January 14, 2015 Share Posted January 14, 2015 (edited) I'm having too much fun with this, but I really like the look of this screen test, the flicker even makes it seem like there's static on the "feed". DPC+ isn't much different than the standard kernel except for a few things like _NUSIZ1, right side up sprites+colors, and the required bank switch at the beginning. fnaf.bas.bin fnaf.bas Edited January 15, 2015 by pacgreg 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.