Search found 68 matches

by Hik
Mon Sep 14, 2015 7:23 pm
Forum: SGDK
Topic: Dynamically build a background for BPLAN from tiles at runtime
Replies: 8
Views: 4048

Re: Dynamically build a background for BPLAN from tiles at runtime

Maybe you could use a 2d array for this along with a random number generator where each number is a certain tile.
The random numbers could be put into the 2d array and the array would then build up an image.
by Hik
Mon Sep 14, 2015 12:25 am
Forum: SGDK
Topic: Hik's SGDK Experiments
Replies: 17
Views: 10704

Re: Hik's SGDK Experiments

I've been working on figuring out the controls and had the idea to make an interactive joypad graphic using two sprites. The goal for this project was to have each button lit up on the graphic when given an input from the physical buttons. Two directional buttons that are adjacent to eachother can b...
by Hik
Thu Sep 10, 2015 8:31 pm
Forum: SGDK
Topic: Hik's SGDK Experiments
Replies: 17
Views: 10704

Re: Hik's SGDK Experiments

I just made the basis for an in-game text editor. If you'd like the player to be able to input a name or a password ,you could use this. (this is only the text function ,use the arrow keys while running it to see what it does) acting up on what is typed requires some additional coding (like saving a...
by Hik
Tue Sep 08, 2015 9:46 pm
Forum: SGDK
Topic: Hik's SGDK Experiments
Replies: 17
Views: 10704

Re: Hik's SGDK Experiments

Here's a new code I've been working on for a simple direction input and text movement. It works ,I'm thinking this is useful towards making simple games. main.c #include <genesis.h> // Defines variables int posx = 14; int posy = 9; void myJoyHandler( u16 joy, u16 changed, u16 state) //state = presse...
by Hik
Tue Sep 08, 2015 12:25 am
Forum: SGDK
Topic: Hik's SGDK Experiments
Replies: 17
Views: 10704

Re: Hik's SGDK Experiments

Thanks ,that's what I was missing. The code works now ; main.c #include <genesis.h> #include "gfx.h" //Sets default values for VDP register //Cleans video RAM //Loads 4 default palettes ; Grey, Red, Green and Blue //Loads a default font for text print need //Initializes input handling //Resets sound...
by Hik
Mon Sep 07, 2015 9:16 pm
Forum: SGDK
Topic: Hik's SGDK Experiments
Replies: 17
Views: 10704

Re: Hik's SGDK Experiments

I've changed the code to use a sprite instead of using the VDP_drawImageEx ,but I still haven't gotten the animation to work. The sprite displays correctly in the right place so it looks the same as before. I used a spritesheet made from the 16 frames. It only shows the first frame. Does the sprites...
by Hik
Mon Sep 07, 2015 12:12 pm
Forum: SGDK
Topic: Hik's SGDK Experiments
Replies: 17
Views: 10704

Re: Hik's SGDK Experiments

Does that work better? I thought sprites were mostly just used for objects moving on the screen ,like projectiles and stuff? I'm still not sure what's causing the tiles to get shifted out of place ,they all stay within the area the image should appear in but then there are these white letters in bet...
by Hik
Sun Sep 06, 2015 6:35 pm
Forum: SGDK
Topic: Hik's SGDK Experiments
Replies: 17
Views: 10704

Hik's SGDK Experiments

Here's my first working project; sega_logo-a1.png gfx.res IMAGE sega_logo_image "sega_logo-a1.png" -1 gfx.h #ifndef _GFX_H_ #define _GFX_H_ extern const Image sega_logo_image; #endif // _GFX_H_ main.c #include <genesis.h> #include "gfx.h" //Sets default values for VDP register //Cleans video RAM //L...