Search found 514 matches

by Miquel
Thu Dec 01, 2016 4:00 pm
Forum: Demos
Topic: Catgirl Pool Party [Work in progress]
Replies: 50
Views: 43319

Re: Catgirl Pool Party [Work in progress]

Sik wrote:
Miquel wrote:- What about getting state from physics status ?
Yeah that makes more sense.
Yeah, there is no much sense in this conversation.
I was asking if you can give me an example of "I never store the current action and just figure out what's going on from the current physics".
by Miquel
Wed Nov 23, 2016 3:14 pm
Forum: Demos
Topic: Catgirl Pool Party [Work in progress]
Replies: 50
Views: 43319

Re: Catgirl Pool Party [Work in progress]

Some awful quick pseudocodish mock-up since I don't have time now (and proper code would be quite complex due to being mixed in with a lot of the player logic) but should help give an idea. The closest it gets to a state machine is the animation stuff at the very end, and that only controls the ani...
by Miquel
Wed Nov 23, 2016 3:08 pm
Forum: SGDK
Topic: Planes bigger than 128 tiles
Replies: 2
Views: 2857

Re: Planes bigger than 128 tiles

by Miquel
Wed Nov 23, 2016 3:05 pm
Forum: Megadrive/Genesis
Topic: Collision Help Please...
Replies: 12
Views: 10295

Re: Collision Help Please...

Finally I left you with an example of what I said, using the "Nintendo way" (By that I mean a way of working with levels developed in 8 and 16 bits mainly in Nintendo devices). It was a competitive test for my level engine I did months ago. There are two strong points: - You can modify the level at ...
by Miquel
Mon Nov 21, 2016 11:56 pm
Forum: Demos
Topic: Catgirl Pool Party [Work in progress]
Replies: 50
Views: 43319

Re: Catgirl Pool Party [Work in progress]

Yes, an state can be any concatenation of values that you desire, including an enumeration of course, the only thing: they have to be unique.

Put a code example about how you would do it, and perhaps we will understand each other.
by Miquel
Mon Nov 21, 2016 7:35 pm
Forum: Demos
Topic: Catgirl Pool Party [Work in progress]
Replies: 50
Views: 43319

Re: Catgirl Pool Party [Work in progress]

Current animation should be set accordingly with current state, and has noting to do directly with buttons. Meaning: buttons can change state, and state determines animation. We're talking about the programming though. One thing is determining the current state on the fly each frame, another is lite...
by Miquel
Sat Nov 19, 2016 2:29 pm
Forum: Demos
Topic: Catgirl Pool Party [Work in progress]
Replies: 50
Views: 43319

Re: Catgirl Pool Party [Work in progress]

What's the difference between "the current action" and "figure out what's going on" at the creative level? I'm confuse: - Are we talking about 68000 or i5 games? Old 2D or 3D games? MD/Genesis or PC games? - first you say "flags to indicate special situations", then "as much as possible simply works...
by Miquel
Sat Nov 19, 2016 11:39 am
Forum: Demos
Topic: Catgirl Pool Party [Work in progress]
Replies: 50
Views: 43319

Re: Catgirl Pool Party [Work in progress]

Ok, after reviewing your code, things I want to say: - Use a state machine for the "stages" of your character. Using speedY to know if you are jumping is a very bad idea. This code is going to grow exponentially while you are adding more features and typically is not nice to read, so pay special att...
by Miquel
Fri Nov 18, 2016 6:43 pm
Forum: Demos
Topic: Catgirl Pool Party [Work in progress]
Replies: 50
Views: 43319

Re: Catgirl Pool Party [Work in progress]

I agree, it should be updated every frame (no matter what) and accessible everywhere.
by Miquel
Thu Nov 17, 2016 7:02 pm
Forum: Demos
Topic: Catgirl Pool Party [Work in progress]
Replies: 50
Views: 43319

Re: Catgirl Pool Party [Work in progress]

Holding the jump button makes the catgirl jump repeatedly like a pogo stick so I'm thinking of a way to add a cooldown to the jump. You just need to check if the button was pressed (ie changed state from unpressed to pressed since last frame) rather than checking if it's held. After the jump you co...
by Miquel
Thu Nov 17, 2016 6:37 pm
Forum: SGDK
Topic: How do you get assembler output from GCC in SGDK
Replies: 3
Views: 3476

Re: How do you get assembler output from GCC in SGDK

This is how I do it:

Code: Select all

$(CC) -c -g -Wa,-a,-ad $(FLAGS) $< > $@
It not only outputs asm code, but everything else.
by Miquel
Sat Nov 12, 2016 4:52 pm
Forum: Megadrive/Genesis
Topic: Fastest way to clear memory
Replies: 8
Views: 6155

Re: Fastest way to clear memory

You can't go faster than 2 bytes for 4 cpu cycles. To that you have to add the reading of the instructions themselves. With movem you can set up to 64 bytes for one instruction, is the fastest way, as said, but it needs to push/pop almost all registers. Perhaps you can use a counter to know until wh...
by Miquel
Fri Nov 11, 2016 6:25 am
Forum: Megadrive/Genesis
Topic: Collision Help Please...
Replies: 12
Views: 10295

Re: Collision Help Please...

Continuing, in 16bits I know 2 adequate ways to represent levels, let's call them the Sonic way and the Nintendo way. Both have the 2x2 tiles structure as their base. I don't know so much about the Sonic way, since I never used it, but it works by grouping every time more tiles in every time bigger ...
by Miquel
Thu Nov 10, 2016 12:51 pm
Forum: Megadrive/Genesis
Topic: Collision Help Please...
Replies: 12
Views: 10295

Re: Collision Help Please...

uh? I don't quite understand that piece of code snippet, I haven't had anything a bool being set to something other than false or true work right as of it. In the most basic scheme you only need to know if this tile is solid or not (bool). bool g_Level[ 128 ][ 128 ]; void MoveCharacterFunction( Spr...
by Miquel
Tue Nov 08, 2016 3:58 pm
Forum: Megadrive/Genesis
Topic: Collision Help Please...
Replies: 12
Views: 10295

Re: Collision Help Please...

uh? I don't quite understand that piece of code snippet, I haven't had anything a bool being set to something other than false or true work right as of it. and exactly how would one retrieve this tile index info after you collide/ overlap with it/ extra collision info? I was looking around the sgdk...