Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
3 registered members (Ayumi, NewbieZorro, TipmyPip), 13,888 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
Old school 2D sprites #395658
02/26/12 07:50
02/26/12 07:50
Joined: Feb 2012
Posts: 9
E
Enix Offline OP
Newbie
Enix  Offline OP
Newbie
E

Joined: Feb 2012
Posts: 9
Guys,
I know now you could be annoyed because this is probably written somewhere.
But I am so eager to start, so I ask for help.

I would like to make old-fashioned 2D platformer with
sprites so I need something like this:

{
my_sprite, my_sprite.bmap, sprite.size, sprite.animate,
sprite.move ;
}

But I don `t know the real and proper command line.
So any example of code here, references to manual, AUM, and
forums are welcome.

Is sprite bitmaps for GameStudio should look like this?
You know, just different pictures in a row.
http://goo.gl/oIgnB

If so, how do I tell to GameStudio the size of the sprite (128x128, 256x256...) to get the desired result?
And what is largest size of sprite in GameStudio? Is it 512x512?

Thanks for your consideration laugh

Re: Old school 2D sprites [Re: Enix] #395669
02/26/12 12:21
02/26/12 12:21
Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
Espér Offline
Expert
Espér  Offline
Expert

Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
you can load any size of sprite into A8

to usemy_sprite as a header and bmap and others as subs, you need to create a STRUCT.

Code:
typedef struct { 
  BMAP* bitmap; 
  int x_size;
  int y_size;
  int animation_frames; 
  char* filename;
} SPRITES;

SPRITES* my_sprite;

my_sprite.bitmap = bmap_create...
..etc...



all you need to do is calculate the animation frames with bmap_width/height and animation_frame count.

To show the Sprites, you´ve different solutions:

1.) Using a new created sprite as 3D Entity, and use it as target map for the Oldschool bitmap

2.) in a 2D game, you better use PANELS and the window functions to animate it ^^

Last edited by Espér; 02/26/12 12:26.

Selling my Acknex Engine Editions (A7 Com & A8 Pro):
>> click here if you are interested <<
Re: Old school 2D sprites [Re: Espér] #395672
02/26/12 14:23
02/26/12 14:23
Joined: Feb 2012
Posts: 9
E
Enix Offline OP
Newbie
Enix  Offline OP
Newbie
E

Joined: Feb 2012
Posts: 9
Ok,

so there is no something like this for sprites:

c_move (me, vector(2 * time_step, 0, 0), nullvector, GLIDE);
ent_animate(me, "walk", walk_percentage, ANM_CYCLE);

but it can be if I try to simulate a sprite through 3d model by not using Z axis.

I suppose that`s what you mean by "Using a new created sprite as 3D Entity, and use it as target map for the Oldschool bitmap"?

Would be interesting to see how it works. I`ll try that.
Sound easy but could be some geometric problems, ha? We`ll see.

For the panels, I thought of that but I`m not sure if panels has collisions?
Or other properties needed for proper handling.

And for STRUCT, I think it will be like that at the end of the story.
Good old structure for good oldies.

Anyway, thanks for the clarification, mein freund laugh

At least I know from where I can begin.
It`s very overwhelming at the begining.

Re: Old school 2D sprites [Re: Enix] #395674
02/26/12 14:42
02/26/12 14:42
Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
Espér Offline
Expert
Espér  Offline
Expert

Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
It looks like that:
http://www.youtube.com/watch?v=6pUJIzaN-kQ
(yes, i´ve created that a Year ago for my A8 Rpg-maker)


Selling my Acknex Engine Editions (A7 Com & A8 Pro):
>> click here if you are interested <<
Re: Old school 2D sprites [Re: Espér] #395689
02/26/12 17:28
02/26/12 17:28
Joined: Feb 2012
Posts: 9
E
Enix Offline OP
Newbie
Enix  Offline OP
Newbie
E

Joined: Feb 2012
Posts: 9
Originally Posted By: Espér
It looks like that:
http://www.youtube.com/watch?v=6pUJIzaN-kQ
(yes, i´ve created that a Year ago for my A8 Rpg-maker)


Cool. It`s 3:2 for you now laugh

Is Debug_Var your routine or it`s a standard GS function?

Re: Old school 2D sprites [Re: Enix] #395732
02/26/12 22:44
02/26/12 22:44
Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
Espér Offline
Expert
Espér  Offline
Expert

Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
it´s my own variable


Selling my Acknex Engine Editions (A7 Com & A8 Pro):
>> click here if you are interested <<
Re: Old school 2D sprites [Re: Espér] #395742
02/27/12 00:02
02/27/12 00:02
Joined: Jun 2004
Posts: 2,234
Wisconsin USA
FoxHound Offline
Expert
FoxHound  Offline
Expert

Joined: Jun 2004
Posts: 2,234
Wisconsin USA
If you want to make a 2d game your best bet is panels. Sprites don't animate and using a model with shiviting u. v. Points will be annoying and getting the collision detection to work the way a 2d game would work is also a lot of head aches. I went thru a lot of these problems recently in my 2d game and went from flat 3d to Panels only. Happy I did.


---------------------
There is no signature here.


QUIT LOOKING FOR ONE!
Re: Old school 2D sprites [Re: FoxHound] #395745
02/27/12 06:13
02/27/12 06:13
Joined: Feb 2012
Posts: 9
E
Enix Offline OP
Newbie
Enix  Offline OP
Newbie
E

Joined: Feb 2012
Posts: 9
Originally Posted By: FoxHound
If you want to make a 2d game your best bet is panels. Sprites don't animate and using a model with shiviting u. v. Points will be annoying and getting the collision detection to work the way a 2d game would work is also a lot of head aches. I went thru a lot of these problems recently in my 2d game and went from flat 3d to Panels only. Happy I did.


Ok, but I`m not sure how to do the collision detection with panels? Can you give me some idea please?

Re: Old school 2D sprites [Re: Enix] #395814
02/27/12 21:27
02/27/12 21:27
Joined: Jun 2004
Posts: 2,234
Wisconsin USA
FoxHound Offline
Expert
FoxHound  Offline
Expert

Joined: Jun 2004
Posts: 2,234
Wisconsin USA
Creat a strict with a panel as a member. Include stuff in the strict to tell things such as passable objects like clouds and background objects and how it can collide. Such as hitting a wall to the die but come from the top you can fall through it. Now set uP an array and have every object on the screen in that array. Now when you move your panel with your collisN detection functioniN check that panel with every Panel in the level to see if any of it's x or y positiOn plusThe size of the panel. This may seem Complicated and it is. But start small and build up. Also the 2.5d option is much easier.

Ps. Typing with an iPhone is annoying.


---------------------
There is no signature here.


QUIT LOOKING FOR ONE!
Re: Old school 2D sprites [Re: FoxHound] #395821
02/27/12 22:56
02/27/12 22:56
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Alternatively, don't use panels at all and only work with a 2dimensional array (f.i. 0 is no tile, a positive value is a solid block, a negative value is a walkable) and then use draw_quad to draw appropriate bitmaps. Example:

BMAP* bmap_tile[7];
#define SIZE_X 13
#define SIZE_Y 20
var field[SIZE_X][SIZE_Y];
var tile_size = 32;
...
for(i = 0; i < SIZE_X; i++)
{
for(j = 0; j < SIZE_Y; j++)
{
if(field[i][j] > 0) draw_quad(bmap_tile[field[i][j]-1],vector(i*tile_size,j*tile_size,0),NULL,NULL,NULL,NULL,100,0);
}
}

The bitmap array "bmap_tile" contains your tile images. You can easily perform collision detection by checking the "field" array, when your player at position i,j, check field[i+1][j] to see if you can go right etc.


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Page 1 of 2 1 2

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1