Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / How should I generate a map with random shape.

Author
Message
halley
13
Years of Service
User Offline
Joined: 27th Apr 2011
Location: China
Posted: 9th Aug 2013 07:06 Edited at: 9th Aug 2013 07:10
I want to make a physics game, I've no idea about two things.
one is random shape. Please look at the screenshot. If we use tiny rectangle and triangle to make the map, I think it is too complex.
another thing is the light. Is there light in box2d engine?

Do any meet the two things and can give me a hand? I'm wondering if I should use another game engine.



The Miracrea Games

Attachments

Login to view attachments
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 9th Aug 2013 09:21 Edited at: 9th Aug 2013 09:21
you can use the polygonshape or add a shape to a physics (also dummy) sprite.
i believe other blend modes (add) comes in next agk version ...
until you can use sprites with alpha as bg light.
Van B
Moderator
21
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 9th Aug 2013 10:13
I think you'd get on better with a more free-form level makeup. Like, keep the grid system, keep the square and triangle pieces, but add a lot of bigger level pieces as well. Consider how Angry Birds levels are made, lots of small parts stacked together - with your grid placement I think you'd end up with more interesting levels, and easier to make levels as well.

As Markus says, we'll have more control over sprite effects soon, but really I think AppGameKit is fine for this project, most of the things you need are fairly straightforward with AppGameKit so I'd stick with that.

I got a fever, and the only prescription, is more memes.
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 9th Aug 2013 14:54
There are no "lights" in 2D currently, certainly no shadows BUT you can fake it.

Kingdom uses fake 2D lighting and is a platformer, I also have a really cool demo (on my machine at home) of a top down lighting system that I started but haven't finished yet. It has soft shadows but is rather limited but looks awesome.

I also have another top down game I was possibly planning on creating a shadow system for.

Really it's a case of working out the cheapest method of faking at the moment, when more shaders and further commands become available who knows but my advice is EXPERIMENT, it's surprising what you can achieve in 2D.

If GetDayOfWeek()=5 then initParty()
3d point in space
14
Years of Service
User Offline
Joined: 30th Jun 2009
Location: Idaho
Posted: 9th Aug 2013 20:57
I think some people use transparancy as well as particles to make it look like there is lighting.

Developer of Space Chips, pianobasic, zipzapzoom, and vet pinball apps. Developed the tiled map engine seen on the showcase. Veteran for the military.
halley
13
Years of Service
User Offline
Joined: 27th Apr 2011
Location: China
Posted: 11th Aug 2013 10:28
I mean the light with physics, not shape effect. The lights can refracte on the mirror. If the mirror turn over, the light can change its way.

The Miracrea Games
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 11th Aug 2013 15:11
i believe the box2d physics don't have this.

a reflection is easy, it used 2 vectors (with length 1)
surface normal + direction
the result is the new direction

example:


http://en.wikipedia.org/wiki/Specular_reflection
halley
13
Years of Service
User Offline
Joined: 27th Apr 2011
Location: China
Posted: 12th Aug 2013 04:18
Markus, Thank you. You did a good job.

The Miracrea Games

Login to post a reply

Server time is: 2024-04-27 12:54:54
Your offset time is: 2024-04-27 12:54:54