# NeoTeam Official Forum

Please login or register.
Login with username, password and session length

## News:

The Neo Project Forum is for NDS/GBA developer discussion only, please don't put any spam posts here!

- NeoTeam Official Forum »
- NEO Coding Competitions »
- NEO Compo 2013 »
- The Game Zone »
- [NDS] BAGASMI Roulette

« previous next »

- Print

Pages: [1] Go Down

### Author Topic: [NDS] BAGASMI Roulette (Read 380 times)

0 Members and 1 Guest are viewing this topic.

#### BassAceGold

- Jr. Member
- Posts: 67

##### [NDS] BAGASMI Roulette

« on: August 10, 2013, 12:51:16 AM »
Nickname: BassAceGold
Project Name: BAGASMI Roulette
From: Canada
Division: Game
Platform: NDS
Original Enter: Yes
Support Motion: No
Open Source: Kinda (interpreter source linked below, script pasted below)
In a past NEO Compo this project won in the top 10: No
BAGASMI Roulette is a simple text based roulette game scripted using BAGASMI http://www.neoflash.com/forum/index.php/topic,7644.0.html.
This game is played with a group of people, where you can pass your DS around.
Essentially, There is a revolver with 6 chambers and 1 chamber contains a bullet. You fire this revolver by pressing the A button. If you fire and the chamber is empty, you are safe. The game continues by passing the DS to the next person (who then fires the gun, and so on and so forth) until the chamber with the bullet is fired--in which case, whoever fired the bullet loses.
It's a simple time wasting game, or perhaps an entertaining drinking game!
Script code here:
Code: [Select]

    [Console 1]

    _start:
    	;clear console
    	CLRS

    	;since the game is just starting, we can skip right to the beginning
    	JUMP GameStart

    	;game over text
    	GameOver PRINT "*BANG!* You lost.\n"

    	;initialize our revolver, jump with jump back flag initialized
    	GameStart JUMP Reload, #0

    		;then print out the game instructions
    		PrintText NOP
    			PRINT "\n~BAGASMI Roulette!~\n"
    			PRINT "Press A to shoot.\nPress B to exit.\nSelect to clear console.\n\n"

    		;loop to keep game running
    		GameLoop NOP

    			;store current key presses in register 0
    			GETKEY $R0

    			;Check if B button (#2) is newly pressed to exit script
    			CHKKEYNEW $R0, #2, Exit

    			;Check if Selected (#4) is pressed to clear the console
    			CHKKEYNEW $R0, #4, ClearScreen, #0

    			;if A button (#1 value) is newly pressed, check to see if shot is legit
    			CHKKEYNEW $R0, #1, CheckChamber, #0

    			VSYNC

    		;otherwise, continue game loop
    		JUMP GameLoop

    ;exit the script
    Exit HALT

    ;clear screen
    ClearScreen CLRS
    	JUMP PrintText

    ;check if chamber was empty or not
    CheckChamber NOP
    	;if our shot is equal to the chamber that is loaded,
    	;then the game resets for another go :D
    	IFEQ shotCounter, chamber, GameOver

    	;otherwise, increase the shot counter, and try again
    	INCR shotCounter

    	;let the user know they are safe
    	PRINT "*CLICK* Safe!\n"

    	JMPBK

    ;loads a single shot into a random chamber
    Reload NOP
    	;pick a random chamber from 0 - 6 (6 chambers)
    	RANDM chamber, #6

    	;reset the shot counter
    	SET shotCounter, #0

    	JMPBK

    ;Set up our six shooter here
    chamber DATA #0
    shotCounter DATA #0

Binary Download Here: https://www.dropbox.com/s/0hcq2nl8hj3xg8c/BAGASMI-Roulette.zip
Logged

#### sverx

- Newbie
- Posts: 20
- a DS homebrewer (and GBA too!)

##### Re: [NDS] BAGASMI Roulette

« Reply #1 on: August 21, 2013, 09:35:50 PM »
I had no luck in running it on my DSlite + R4. Does it require HBmenu or something else not mentioned in your post?
Logged

#### sverx

- Newbie
- Posts: 20
- a DS homebrewer (and GBA too!)

##### Re: [NDS] BAGASMI Roulette

« Reply #2 on: August 23, 2013, 10:39:46 AM »
It works, with HBmenu. Unfortunately after some run the last line disappear from console screen, so you have to clear the console after each run to be sure to see everything...
Logged

#### BassAceGold

- Jr. Member
- Posts: 67

##### Re: [NDS] BAGASMI Roulette

« Reply #3 on: August 23, 2013, 04:22:47 PM »
Sorry for the late reply.
Yes it requires homebrew menu or an equivalent to run as I use fsnitro to pack in the script file.
As for the console bug, I must have initialized it with an extra line. I haven't been able to check it out since I'm on vacation
Logged

- Print

Pages: [1] Go Up
« previous next »

- NeoTeam Official Forum »
- NEO Coding Competitions »
- NEO Compo 2013 »
- The Game Zone »
- [NDS] BAGASMI Roulette

Jump to: