New games - Snake, Tetris - General Discussion and Assistance - CHDK Forum

New games - Snake, Tetris

  • 21 Replies
  • 14251 Views
New games - Snake, Tetris
« on: 09 / January / 2009, 10:44:20 »
Advertisements
Hi, I made 2 games for CHDK.

This are only game engines not fully working games, so there is no hall of frame and beutiful user interface ;P

If you have any ideas about games write in this topic.


Uploaded game demo for PC (under CHDK GUI emulator) and source codes which can be replaced in CHDK (overriding reversi and sokoban) to play on camera

*

Offline whim

  • ******
  • 2046
  • A495/590/620/630 ixus70/115/220/230/300/870 S95
Re: New games - Snake, Tetris
« Reply #1 on: 09 / January / 2009, 12:04:45 »
Quote
game demo for PC (under CHDK GUI emulator)

where can i find this emulator ?

wim
« Last Edit: 09 / January / 2009, 12:15:56 by whim »

Re: New games - Snake, Tetris
« Reply #2 on: 09 / January / 2009, 12:59:58 »
I wrote this emulator :D I just made emulation of put pixel attached gui_xxx from chdk and made task which runs gui_xxx_init , gui_xxx_draw, gui_xxx_kpd_, so now I can test code on PC without writing to camera

*

Offline whim

  • ******
  • 2046
  • A495/590/620/630 ixus70/115/220/230/300/870 S95
Re: New games - Snake, Tetris
« Reply #3 on: 09 / January / 2009, 13:31:16 »
Aah...I already wondered how I could have missed that !

If and when you're ready to release it, please do so in separate thread;
I'm sure not only game developers will be interested ...


BTW I'm sure you know this, but keypad2 (the one with 3 grouped keys) reacts a bit
        strangely to up/down/left/right sometimes (after a 'group splitup')

wim

Re: New games - Snake, Tetris
« Reply #4 on: 11 / January / 2009, 08:41:30 »
good work!

you might also get inspired by this interpretation of tetris (my favourite):

http://www.ticalc.org/pub/89/asm/games/tetrics.zip
sources included... maybe you could steal some features like shadow.

don't know how portable the code is...


if i replace the gui_* files in my core dir and compile, i get this error log:

Code: [Select]
========== K:\TOOLS\!_CHDK_TOOLS\!_CHDK-SHELL\TRUNK\TRUNK676\BIN\LOGS\ERR-A720-100C.TXT ==========

gui_reversi.c: In function `platformRenderGame':
gui_reversi.c:126: warning: implicit declaration of function `draw_filled_rect'
gui_reversi.c:130: warning: implicit declaration of function `MAKE_COLOR'
gui_reversi.c:136: error: `COLOR_WHITE' undeclared (first use in this function)
gui_reversi.c:136: error: (Each undeclared identifier is reported only once
gui_reversi.c:136: error: for each function it appears in.)
gui_reversi.c:183: warning: implicit declaration of function `sprintf'
gui_reversi.c:184: warning: implicit declaration of function `draw_string'
gui_reversi.c:184: error: `COLOR_BLUE' undeclared (first use in this function)
gui_reversi.c: In function `platformGetSystemTime':
gui_reversi.c:188: warning: implicit declaration of function `get_tick_count'
gui_reversi.c: In function `setTetramino':
gui_reversi.c:232: error: `COLOR_GREEN' undeclared (first use in this function)
gui_reversi.c:238: error: `COLOR_RED' undeclared (first use in this function)
gui_reversi.c:244: error: `COLOR_BLUE' undeclared (first use in this function)
gui_reversi.c: In function `startGame':
gui_reversi.c:282: warning: implicit declaration of function `srand'
gui_reversi.c:288: warning: implicit declaration of function `rand'
gui_reversi.c: In function `createGame':
gui_reversi.c:299: warning: implicit declaration of function `malloc'
gui_reversi.c: In function `deleteGame':
gui_reversi.c:323: warning: implicit declaration of function `free'
gui_reversi.c: In function `gui_reversi_init':
gui_reversi.c:596: error: `screen_width' undeclared (first use in this function)
gui_reversi.c:596: error: `screen_height' undeclared (first use in this function)
gui_reversi.c:596: error: `COLOR_WHITE' undeclared (first use in this function)
gui_reversi.c:597: warning: implicit declaration of function `draw_rect'
gui_reversi.c:597: error: `COLOR_BLACK' undeclared (first use in this function)
gui_reversi.c: In function `gui_reversi_kbd_process':
gui_reversi.c:608: warning: implicit declaration of function `kbd_get_autoclicked_key'
gui_reversi.c:610: error: `KEY_UP' undeclared (first use in this function)
gui_reversi.c:613: error: `KEY_LEFT' undeclared (first use in this function)
gui_reversi.c:616: error: `KEY_RIGHT' undeclared (first use in this function)
gui_reversi.c:619: error: `KEY_DOWN' undeclared (first use in this function)
K:\Tools\!_CHDK_tools\!_CHDK-Shell\gcc\bin\gmake[1]: *** [gui_reversi.o] Error 1
gmake: *** [all-recursive] Error 1


whats to be done??
missing includes?
[by Hacki]i   take the include stuff from the original games and put it in the new ones, then it compiles[/Hacki][/b]
« Last Edit: 11 / January / 2009, 09:47:34 by hackrid »

*

Offline PhyrePhoX

  • *****
  • 2254
  • make RAW not WAR
    • PhyreWorX
Re: New games - Snake, Tetris
« Reply #5 on: 11 / January / 2009, 12:35:04 »
btw one of my ideas for snake was to use the orientatation sensor as a movement control :D

*

Offline reyalp

  • ******
  • 14139
Re: New games - Snake, Tetris
« Reply #6 on: 11 / January / 2009, 18:25:31 »
No more games enabled in the trunk until we have module loading of some kind, please :(
Don't forget what the H stands for.

Re: New games - Snake, Tetris
« Reply #7 on: 12 / January / 2009, 11:08:16 »
maybe replace the existing ones with these?
tetris and snake are much more "status symbols" than "4 in a row" and "reversi"!
my opinion!

*

Offline PhyrePhoX

  • *****
  • 2254
  • make RAW not WAR
    • PhyreWorX
Re: New games - Snake, Tetris
« Reply #8 on: 12 / January / 2009, 11:48:03 »
nono, if at all, these will be included only deffed out, meaning every user can undef it and compile with these games :)

*

Offline Kalli

  • **
  • 51
  • A620, SX10 IS
Re: New games - Snake, Tetris
« Reply #9 on: 12 / January / 2009, 12:10:47 »
Hi there,

I just have to mention it once: I love to hate the games on my cam  ;), I just ignore them hoping they don`t use too much of precious RAM.
Don`t you game-kiddies own a cell-phone??? They are far better made for gaming!

Btw: You should try to play baseball with your cam - one throughs the other hits it with the wood as strong as possible (you shoudn't try that if you use your cam also for taking photos sometimes'). :haha

 

Related Topics


SimplePortal © 2008-2014, SimplePortal