Join us on Discord!
You can help CodeWalrus stay online by donating here.

DoodleJump CE [C] [TI 84+ CE]

Started by Unicorn, September 01, 2016, 10:13:59 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Unicorn

So I am attempting to create a doodle jump clone for the CE. I've gotten as far as a menu screen with a whole bunch of sprites, and I need to get double buffers working so I can erase graphics, and I've worked for a while trying to make it run fast, but to no avail. So, I'm wondering if anyone would like to try themselves to make this buffering work at an acceptable speed. Here's how fast I've gotten it (a video):



So there's that, and here is the code if you want to take a shot at making it work at a reasonable speed.


//--------------------------------------
// Program Name:
// Author:
// License:
// Description:
//--------------------------------------

/* Keep these headers */
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <tice.h>

/* Standard headers - it's recommended to leave them included */
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <graphx.h>
#include <keypadc.h>
#include <fileioc.h>
#include <debug.h>
#include "gfx/sprites.h"
/* Other available headers */
// stdarg.h, setjmp.h, assert.h, ctype.h, float.h, iso646.h, limits.h, errno.h, debug.h

/* Put your function prototypes here */
void spriteDecompress();
void drawMenu();
/* Put all your globals here. */
gfx_image_t *splashScreen;
gfx_image_t *dLeft;
gfx_image_t *dLeftBG;
gfx_image_t *greenPlatform;
gfx_image_t *brokePlatform;
gfx_image_t *spring;
gfx_image_t *grid;
void main(void) {
uint8_t x = 130, key = 0, keypress = 0, guyY = 168;
bool guyUp = true;
gfx_Begin(gfx_8bpp);
gfx_FillScreen(gfx_white);
gfx_SetPalette( sprites_pal, sizeof(sprites_pal), 0);
spriteDecompress();
gfx_SetDrawBuffer();
drawMenu();
gfx_SetDrawScreen();
drawMenu();
gfx_TransparentSprite(greenPlatform, 130, 190);
while (kb_ScanGroup(kb_group_6) != kb_Clear) {
if (key & kb_Left) {
x -= 109;
guyY = 168;
gfx_TransparentSprite(greenPlatform, x, 190);
}
if (key & kb_Right) {
x += 109;
guyY = 168;
gfx_TransparentSprite(greenPlatform, x, 190);
}
gfx_SetDrawBuffer();
drawMenu();
gfx_TransparentSprite(greenPlatform, x, 190);
gfx_PrintStringXY("Start", 145, 197);
gfx_PrintStringXY("Settings", 30, 197);
gfx_PrintStringXY("Quit", 262, 197);
gfx_TransparentSprite_NoClip(dLeft, x+18, guyY);
gfx_SwapDraw();
gfx_SetDrawScreen();
if (guyUp == true)
guyY-=5;
if (guyUp == false)
guyY+=7;
if (guyY <= 80)
guyUp = false;
if (guyY >= 168)
guyUp = true;
key = kb_ScanGroup(kb_group_7);
keypress++;
}
gfx_End();
pgrm_CleanUp();
}
void drawMenu(void) {
uint8_t y = 0;
uint24_t x = 0;
gfx_FillScreen(214);
gfx_SetColor(213);
for (x = 0; x<320; x+=16) {
gfx_Line(x, 0, x, 240);
}
for (y = 0; y<240; y+=16) {
gfx_Line(0, y, 320, y);
}

gfx_ScaledTransparentSprite_NoClip(splashScreen, 60, 0, 2, 2);
gfx_SetTextFGColor(8);
gfx_PrintStringXY("Start", 145, 197);
gfx_PrintStringXY("Settings", 30, 197);
gfx_PrintStringXY("Quit", 262, 197);
}
void spriteDecompress(void) {
malloc(0);
splashScreen = gfx_AllocSprite(100, 47, malloc);
dLeft = gfx_AllocSprite(25, 25, malloc);
brokePlatform = gfx_AllocSprite(72, 19, malloc);
greenPlatform = gfx_AllocSprite(75, 22, malloc);
spring = gfx_AllocSprite(34, 17, malloc);
grid = gfx_AllocSprite(16, 16, malloc);
gfx_LZDecompressSprite(splashScreen_data_compressed, splashScreen);
gfx_LZDecompressSprite(brokePlatform_data_compressed, brokePlatform);
gfx_LZDecompressSprite(greenPlatform_data_compressed, greenPlatform);
gfx_LZDecompressSprite(spring_data_compressed, spring);
gfx_LZDecompressSprite(grid_data_compressed, grid);
gfx_LZDecompressSprite(dLeft_data_compressed, dLeft);
}
/* Put other functions here */


Help would be greatly appreciated :)
  • Calculators owned: I own all of them: PICKACHUP TI 84+ CSE TI 83+ SE TI something something ??? ??? ??? ??? ???
  • Consoles, mobile devices and vintage computers owned: PICKACHUP ??? ??? ??? ??? ???



??? ??? ??? ??? ???

Dream of Omnimaga

I thought I had replied to this topic, but I guess I didn't. I saw the screenshots before and the one you just posted on IRC and I like what I see so far. Maybe you could have multiple characters like in AssemblyBandit's CSE jumper game, including a :walrii: .

Also you should put the GIFs in the first post, because not everyone can or want to open MP4 files (in my case this particular file won't play).
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

Unicorn

Quote from: DJ Omnimaga on September 03, 2016, 04:01:53 AM
I thought I had replied to this topic, but I guess I didn't. I saw the screenshots before and the one you just posted on IRC and I like what I see so far. Maybe you could have multiple characters like in AssemblyBandit's CSE jumper game, including a :walrii: .

Also you should put the GIFs in the first post, because not everyone can or want to open MP4 files (in my case this particular file won't play).
Haha, yeah, I'm going to put a gif now, that was just for testing purposes.

Anyways, I have physics working, thanks to the Flappy Bird author including his source! anyways, an image:

  • Calculators owned: I own all of them: PICKACHUP TI 84+ CSE TI 83+ SE TI something something ??? ??? ??? ??? ???
  • Consoles, mobile devices and vintage computers owned: PICKACHUP ??? ??? ??? ??? ???



??? ??? ??? ??? ???

Dream of Omnimaga

What I like in particular is the hand drawn style overall. If the text was hand drawn too, then I would have suggested drawing it multiple times and animating each frame, like in Yoshi's Island for the Super Nintendo. That would have been kinda cool. :D
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

JWinslow23

Quote from: Unicorn on September 03, 2016, 04:09:22 AM
Quote from: DJ Omnimaga on September 03, 2016, 04:01:53 AM
I thought I had replied to this topic, but I guess I didn't. I saw the screenshots before and the one you just posted on IRC and I like what I see so far. Maybe you could have multiple characters like in AssemblyBandit's CSE jumper game, including a :walrii: .

Also you should put the GIFs in the first post, because not everyone can or want to open MP4 files (in my case this particular file won't play).
Haha, yeah, I'm going to put a gif now, that was just for testing purposes.

Anyways, I have physics working, thanks to the Flappy Bird author including his source! anyways, an image:


Having made a Flappy Bird clone before, yet knowing a +C clone of Flappy Bird exists, I'm wondering exactly which Flappy Bird :P .

That looks awesome, by the way! It'll probably be more awesome than Jumper when it's done!

c4ooo

Nice! For a second I thought the game was running at 1 frame per second but then I realized the gif was just loading slowly.

Dream of Omnimaga

Quote from: JWinslow23 on September 03, 2016, 03:03:26 PM
Quote from: Unicorn on September 03, 2016, 04:09:22 AM
Quote from: DJ Omnimaga on September 03, 2016, 04:01:53 AM
I thought I had replied to this topic, but I guess I didn't. I saw the screenshots before and the one you just posted on IRC and I like what I see so far. Maybe you could have multiple characters like in AssemblyBandit's CSE jumper game, including a :walrii: .

Also you should put the GIFs in the first post, because not everyone can or want to open MP4 files (in my case this particular file won't play).
Haha, yeah, I'm going to put a gif now, that was just for testing purposes.

Anyways, I have physics working, thanks to the Flappy Bird author including his source! anyways, an image:


Having made a Flappy Bird clone before, yet knowing a +C clone of Flappy Bird exists, I'm wondering exactly which Flappy Bird :P .

That looks awesome, by the way! It'll probably be more awesome than Jumper when it's done!
I think he's refering to the CE Flappy Bird on Cemetech.
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

Unicorn

Quote from: c4ooo on September 03, 2016, 03:06:25 PM
Nice! For a second I thought the game was running at 1 frame per second but then I realized the gif was just loading slowly.
Thanks! And yeah, the gif does run a bit slow when loading the page.

Quote from: DJ Omnimaga on September 03, 2016, 06:02:29 PM
Quote from: JWinslow23 on September 03, 2016, 03:03:26 PM
Quote from: Unicorn on September 03, 2016, 04:09:22 AM
Quote from: DJ Omnimaga on September 03, 2016, 04:01:53 AM
I thought I had replied to this topic, but I guess I didn't. I saw the screenshots before and the one you just posted on IRC and I like what I see so far. Maybe you could have multiple characters like in AssemblyBandit's CSE jumper game, including a :walrii: .

Also you should put the GIFs in the first post, because not everyone can or want to open MP4 files (in my case this particular file won't play).
Haha, yeah, I'm going to put a gif now, that was just for testing purposes.

Anyways, I have physics working, thanks to the Flappy Bird author including his source! anyways, an image:


Having made a Flappy Bird clone before, yet knowing a +C clone of Flappy Bird exists, I'm wondering exactly which Flappy Bird :P .

That looks awesome, by the way! It'll probably be more awesome than Jumper when it's done!
I think he's refering to the CE Flappy Bird on Cemetech.
Haha, that is correct! I haven't made any progress today. but I may yet...
  • Calculators owned: I own all of them: PICKACHUP TI 84+ CSE TI 83+ SE TI something something ??? ??? ??? ??? ???
  • Consoles, mobile devices and vintage computers owned: PICKACHUP ??? ??? ??? ??? ???



??? ??? ??? ??? ???

Unicorn

bump. I haven't really made any progress, BUT, I am working on creating some sort of custom levels using tilemaps. So when I'm done with implementing those, I'll have some screenshots.

Right now there seems to be some weird problems with the tilemaps, mateo is helping/doing it for me fix them.
  • Calculators owned: I own all of them: PICKACHUP TI 84+ CSE TI 83+ SE TI something something ??? ??? ??? ??? ???
  • Consoles, mobile devices and vintage computers owned: PICKACHUP ??? ??? ??? ??? ???



??? ??? ??? ??? ???

kotu

Quote from: Unicorn on September 22, 2016, 09:12:38 PM
Right now there seems to be some weird problems with the tilemaps, mateo is helping/doing it for me fix them.

what are the problems?
  • Calculators owned: TI 84+CE-T
  • Consoles, mobile devices and vintage computers owned: Sega Master System, Sony PlayStation 3
SUBSCRIBE TO THE FUTURERAVE.UK MAILING LIST
http://futurerave.uk

p2

The AutoIt-version of doodle jump I mentioned on IRC sadly got deleted and the website hoster went ofline... (the hoster itself) so I guess all the great tiles used in that version of the game are gone, sorry :/
(Will have to do it yourself afterall) ^^
  • Calculators owned: ti-83+, ti-84+, ti-84+, ti-84+se, ti-84+se(te), ti-nsphire, ti-nsphire CAS, ti-nsphire CX-CAS, ti-voyage, ti-voyage, Who reads this list anyways...?
Anyway war sucks. Just bring us your food instead of missiles  :P ~ DJ Omnimaga (11.10.2016 20:21:48)
if you cant get a jframe set up, draw stuff to it, and receive input, i can only imagine how horrible your game code is _._   ~ c4ooo (14.11.2016 22:44:07)
If they pull a Harambe on me tell my family I love them ~ u/Pwntear37d (AssangeWatch /r/)
make Walrii great again ~ DJ Omnimaga (28.11.2016 23:01:31)
God invented the pc, satan the smartphone I guess ~ p4nix (16.02.2017 22:51:49)

Dream of Omnimaga

I'm glad this is still alive. Good luck resolving the issues you have.
Quote from: p2 on September 23, 2016, 01:36:44 AM
The AutoIt-version of doodle jump I mentioned on IRC sadly got deleted and the website hoster went ofline... (the hoster itself) so I guess all the great tiles used in that version of the game are gone, sorry :/
(Will have to do it yourself afterall) ^^
Can't the owner be contacted?
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

Unicorn

Quote from: kotu on September 22, 2016, 09:16:14 PM
Quote from: Unicorn on September 22, 2016, 09:12:38 PM
Right now there seems to be some weird problems with the tilemaps, mateo is helping/doing it for me fix them.

what are the problems?
I fixed them up, but I've decided to let tilemaps be implemented another day :P (I don't need them, I was experimenting)

Quote from: p2 on September 23, 2016, 01:36:44 AM
The AutoIt-version of doodle jump I mentioned on IRC sadly got deleted and the website hoster went ofline... (the hoster itself) so I guess all the great tiles used in that version of the game are gone, sorry :/
(Will have to do it yourself afterall) ^^
Did you see my screenshot? Those tiles work, don't they?
  • Calculators owned: I own all of them: PICKACHUP TI 84+ CSE TI 83+ SE TI something something ??? ??? ??? ??? ???
  • Consoles, mobile devices and vintage computers owned: PICKACHUP ??? ??? ??? ??? ???



??? ??? ??? ??? ???

p2

yess, never said they wouldnt ^^ But the autoIt version also had all tiles for jungle, space, ice, ... themes which might  be useful to you :) (If you intend to add them, too) :)
Quote from: DJ Omnimaga on September 27, 2016, 06:29:41 AM
Quote from: p2 on September 23, 2016, 01:36:44 AM
The AutoIt-version of doodle jump I mentioned on IRC sadly got deleted and the website hoster went ofline... (the hoster itself) so I guess all the great tiles used in that version of the game are gone, sorry :/
(Will have to do it yourself afterall) ^^
Can't the owner be contacted?
I'm not sure since the project is already a few youars old and the links still weren't fixed... idk if the owner is still interested in this project...
This was the old forum post (on german): https://autoit.de/index.php/Thread/18368-Doodle-Jump-f%C3%BCr-Pc/
BUT I managed to find an old upload...  :w00t:
@Unicorn: You should take a look at it ;) https://mega.nz/#!PJcn2SBa!v33KRytsHswuXoKk9C6pufDKht4rZTGXPBDTwiVqrhw
It's got all the original tiles and sounds in it :)
  • Calculators owned: ti-83+, ti-84+, ti-84+, ti-84+se, ti-84+se(te), ti-nsphire, ti-nsphire CAS, ti-nsphire CX-CAS, ti-voyage, ti-voyage, Who reads this list anyways...?
Anyway war sucks. Just bring us your food instead of missiles  :P ~ DJ Omnimaga (11.10.2016 20:21:48)
if you cant get a jframe set up, draw stuff to it, and receive input, i can only imagine how horrible your game code is _._   ~ c4ooo (14.11.2016 22:44:07)
If they pull a Harambe on me tell my family I love them ~ u/Pwntear37d (AssangeWatch /r/)
make Walrii great again ~ DJ Omnimaga (28.11.2016 23:01:31)
God invented the pc, satan the smartphone I guess ~ p4nix (16.02.2017 22:51:49)

Dream of Omnimaga

Nice. By the way to save space you could always use color palette changes so you can re-use the graphics you have but with different colors for more themes.
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

Powered by EzPortal