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

Jumping/Parkour [TI 84+ CE] [C]

Started by Unicorn, April 21, 2016, 05:12:43 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Unicorn

I've been experimenting with C again, and I think I'm going to attempt to create some sort of shooting game. Not sure how this going to work, but if it gets to complicated, I'm gonna make it into something of a level by level jumping/parkour/portal type thing (without portals)

So here's a screenshot...



Tell me what you think!
  • 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 always liked how the screen looked like in 8 bits mode in the TI-OS. :P

But more seriously, I'm glad that you plan to make some Zombie Gun clone or some run and jump game. Good luck @Unicorn and feel free to ask for C help on the forums if you need any. :)
  • 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

Dudeman313

That looks cool! :D

Maybe a bouncer weapon could be an actual thing in the completed game?
  • Calculators owned: TI-84 PCE
  • Consoles, mobile devices and vintage computers owned: Android O Phone
Does this qualify as a signature? 
The answer is "Sure."


Unicorn

Yeah, hopefully I can do this!

So I've decides to doaway with the zombie gun idea, I'm gonna create a jumping style game, with different blocks that do different things. Once I get deaths and things working, I hope to maybe build a level sditor of sorts... We'll see...
  • 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

Maybe it could be like Ztrumpet's Jump game for the 84+? It was quite simple to start with as a new language project. You could add power-ups later.

Also, everytime I see this topic, I think of "The Game", then I lose :P
  • 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 April 22, 2016, 05:53:44 AM
Maybe it could be like Ztrumpet's Jump game for the 84+? It was quite simple to start with as a new language project. You could add power-ups later.
Yeah, I've seen that, but the only thing is that I don't know how to do side scrolling... Otherwise, I would do that...
Quote
Also, everytime I see this topic, I think of "The Game", then I lose :P
Haha, I'll change that now :P
  • 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

That's good. Clear topic titles are your friend anyway :)

ALso feel free to make a side-scrolling help topic if you need help on that. Perhaps scrolling help might be better, but make sure to do your homework first (eg checking Google in case you find something relevant there first)
  • 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

Dudeman313

Oh, that's a much better title. :P

Quote from: Unicorn on April 22, 2016, 05:43:43 AM
Yeah, hopefully I can do this!

So I've decides to doaway with the zombie gun idea, I'm gonna create a jumping style game, with different blocks that do different things. Once I get deaths and things working, I hope to maybe build a level sditor of sorts... We'll see...
Alright. Level editors are always welcome. :)
  • Calculators owned: TI-84 PCE
  • Consoles, mobile devices and vintage computers owned: Android O Phone
Does this qualify as a signature? 
The answer is "Sure."


Unicorn

Progress! Colossion and lava (?) work, somewhat. I haven't figured out a way to check the entire rectangle for colors, so if you have suggestions, please post :)

Screenshot:




//--------------------------------------
// 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 <graphc.h>
#include <keypadc.h>
#include <debug.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 */

/* Put all your globals here. */
int x = 1, y = 149, a = 1, key, key1, keyPress, getPixel;
bool jump = false, shoot = false;
void main(void) {
gc_InitGraph();
gc_SetColorIndex(37);
gc_FillScrn(0);
gc_NoClipRectangle(0,162,350,350);
gc_SetColorIndex(245);
gc_NoClipRectangle(40,162,16,16);
gc_SetColorIndex(59);
gc_NoClipRectangle(x,y,6,12);
gc_SetColorIndex(37);
gc_NoClipRectangle(100,146,16,16);
while (kb_ScanGroup(kb_group_6) != kb_Clear) {
gc_SetColorIndex(59);
gc_NoClipRectangle(x,y,6,12);
      if (keyPress % 15 == 0) {
        if (key & kb_Left && y > 149 && gc_ClipGetPixel(x-1,y) != 37) {
        gc_SetColorIndex(0);
        gc_NoClipRectangle(x,y,6,12);
            x = x-4;
        }
        if (key & kb_Right && y > 149 && gc_ClipGetPixel(x+7,y) != 37) {
        gc_SetColorIndex(0);
            gc_NoClipRectangle(x,y,6,12);
            x= x+4;
            getPixel = gc_ClipGetPixel(x, y+14);
dbg_sprintf(dbgout, "Get_Pixel Color: ");
dbg_sprintf(dbgout, "%d\n", getPixel);
          }
        if (key & kb_Left && y < 150 && gc_ClipGetPixel(x-1,y) != 37) {
        gc_SetColorIndex(0);
        gc_NoClipRectangle(x,y,6,12);
            x = x-2;
            getPixel = gc_ClipGetPixel(x, y+14);
dbg_sprintf(dbgout, "Get_Pixel Color: ");
dbg_sprintf(dbgout, "%d\n", getPixel);
        }
        if (key & kb_Right && y < 150 && gc_ClipGetPixel(x+7,y) != 37) {
        gc_SetColorIndex(0);
            gc_NoClipRectangle(x,y,6,12);
            x= x+2;
            getPixel = gc_ClipGetPixel(x, y+14);
dbg_sprintf(dbgout, "Get_Pixel Color: ");
dbg_sprintf(dbgout, "%d\n", getPixel);
        }
        if (key & kb_Up && y > 147 && gc_ClipGetPixel(x,y-1) != 37) {
        jump = true;
        getPixel = gc_ClipGetPixel(x, y+14);
dbg_sprintf(dbgout, "Get_Pixel Color: ");
dbg_sprintf(dbgout, "%d\n", getPixel);
        }
        if (jump == true) {
        gc_SetColorIndex(0);
        gc_NoClipRectangle(x,y,6,12);
        y = y-2;
        }
        if (y <= 122) {
        gc_SetColorIndex(0);
        gc_NoClipRectangle(x,y,6,12);
        jump = false;
        }
        if (jump == false && gc_ClipGetPixel(x+3,y+13) != 37) {
        gc_SetColorIndex(0);
        gc_NoClipRectangle(x,y,6,12);
        y= y+3;
        }
}
if (gc_ClipGetPixel(x+3,y+14) == 245)
break;
keyPress++;
key = kb_ScanGroup(kb_group_7);
    key1 = kb_ScanGroup(kb_group_1);
}/* Fill in the body of the main function here */
    gc_CloseGraph();
pgrm_CleanUp();
}
/* Put other functions here */
  • 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

GLad you are making progress. :) Hopefully you can manage to fix some of the display bugs in future updates :) (for example when the guy falls slightly inside the ground)
  • 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

Yup. That has something to do with the coordinates system I'm using for physics, but the landing will be getpixel soon enoigh.

And as Mateo said on irc, I have some optimizing to do :P
  • 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 ??? ??? ??? ??? ???



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

aetios

I was thinking you could maybe make this a kind of 2d Mirror's edge :D
ceci n'est pas une signature

Unicorn

If its anything like the google images for those terms, probably not. (yet) For now, probably just a game with squares that do things. Then, sprites, then select thing like sliding and ziplining and things *.*
  • 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

Sqùares that can behave differently, such as making you dash horizontally, up, down, warp elsewhere on the screen, etc, would be a nice addition.
  • 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

c4ooo

What sort of engine do you use? I know that V3 of mateo's C libraries contains a tilemaper, and ime also working on one. (Albeit mine is definitely not going to be as fast as Mateo's :P )

Powered by EzPortal