Scrolling Game Development Kit Forum
Welcome, Guest. Please login or register.
2010-07-31, 06:28:10 PM

Login with username, password and session length
Search:     Advanced search
8884 Posts in 1004 Topics by 168 Members
Latest Member: mogzdogz
* Home Help Search Login Register
+  Scrolling Game Development Kit Forum
|-+  SGDK Version 2
| |-+  Projects
| | |-+  Placeholder for 2wenty Dungeons (formerly Codename: Words)
« previous next »
Pages: 1 2 [3] Print
Author Topic: Placeholder for 2wenty Dungeons (formerly Codename: Words)  (Read 5839 times)
SmartBoy16
Contributor
Fanatic
**
Posts: 551


Current Project: RANAT: BtT

joelag_2009@hotmail.com
View Profile WWW Email
« Reply #30 on: 2009-09-30, 11:30:01 AM »

this helps a little. I looked at your clean game sample (it helps a lot Smiley ) and i noticed you were able to add the explosion sprite before the bomb deactivated. I tried doing the same thing, but i think a few more steps are need if i want to change the player sprite.

this is the code i'm trying to use

Code:
// If Press Spacebar
if (this.IsInputPressed(SpriteBase.InputBits.Button4, true)) {
   // add beki sprite
   this.AddSpriteHere(typeof(Sprites.Player_BEKI), RelativePosition.CenterMiddle, RelativePosition.CenterMiddle);
   // deactivate
   this.Deactivate();
}
Logged

SmartBoy16


The RANAT Foundation: Before the Truth http://www.box.net/RANAT-BtT
bluemonkmn
SGDK Author
Administrator
Fanatic
*****
Posts: 2132


2678251 BlueMonkMN@gmail.com
View Profile WWW Email
« Reply #31 on: 2009-10-01, 10:08:23 PM »

Like I said, I don't think the problem is with the way you added the sprite.  The error message says there's a problem with MapPlayerToInput.  So it's maybe trying to map the player to an inactive sprite or map an invalid player number's inputs to the sprite.  The message suggests the latter.
Logged

SmartBoy16
Contributor
Fanatic
**
Posts: 551


Current Project: RANAT: BtT

joelag_2009@hotmail.com
View Profile WWW Email
« Reply #32 on: 2009-11-08, 08:01:50 PM »

updated logo. this one matches the theme of the game more http://www.box.net/shared/q0hxaxt4pj

as for the game's progress, im still at a loss of time so i won't be doing too much yet, for now, ill just work on Battle strategies (yay for flowcharts!!!)

if all goes well, i want to finish this game by June 2012 (when i graduate).
Logged

SmartBoy16


The RANAT Foundation: Before the Truth http://www.box.net/RANAT-BtT
SmartBoy16
Contributor
Fanatic
**
Posts: 551


Current Project: RANAT: BtT

joelag_2009@hotmail.com
View Profile WWW Email
« Reply #33 on: 2010-01-06, 11:32:10 AM »

Here's a new version.

some major updates:

*added first maze map
*added "jumping between notebooks"


there is a glitch that you are thrown between certain walls when jumping between notebooks.

also, is there a way where you can create a C# project from the .sgdk2 file, edit it on Visual Studio, and then send it back?

expect a few more updates later on.

the link: http://www.box.net/shared/7g060f65vd
Logged

SmartBoy16


The RANAT Foundation: Before the Truth http://www.box.net/RANAT-BtT
TonyX
Fanatic
***
Posts: 348


Games Developed: 4 Developers: 8 || Fans: 28

tonyxna@live.com
View Profile WWW
« Reply #34 on: 2010-01-06, 06:25:51 PM »

I'll check it out.

also, is there a way where you can create a C# project from the .sgdk2 file, edit it on Visual Studio, and then send it back?

I tried, but I think the only thing you can edit are the files created after the program has ran.

edit: I checked it out. It's okay. But I don't get how to get to the end of the level.
Logged

SmartBoy16
Contributor
Fanatic
**
Posts: 551


Current Project: RANAT: BtT

joelag_2009@hotmail.com
View Profile WWW Email
« Reply #35 on: 2010-01-07, 07:25:38 AM »



edit: I checked it out. It's okay. But I don't get how to get to the end of the level.

its not done yet Sad

Logged

SmartBoy16


The RANAT Foundation: Before the Truth http://www.box.net/RANAT-BtT
bluemonkmn
SGDK Author
Administrator
Fanatic
*****
Posts: 2132


2678251 BlueMonkMN@gmail.com
View Profile WWW Email
« Reply #36 on: 2010-01-07, 08:42:49 AM »

also, is there a way where you can create a C# project from the .sgdk2 file, edit it on Visual Studio, and then send it back?

When you build the project, a C# project is created automatically.  You can edit it in Visual Studio.  To send it back, I simply copy and paste manually.  Of course you can't edit and send back changes to files that don't appear in the Source Code folder.
Logged

SmartBoy16
Contributor
Fanatic
**
Posts: 551


Current Project: RANAT: BtT

joelag_2009@hotmail.com
View Profile WWW Email
« Reply #37 on: 2010-01-09, 01:50:12 PM »

on my next release (soon, but not now), im disabling the "jumping feature" until i experiment with sprites a little more

Logged

SmartBoy16


The RANAT Foundation: Before the Truth http://www.box.net/RANAT-BtT
SmartBoy16
Contributor
Fanatic
**
Posts: 551


Current Project: RANAT: BtT

joelag_2009@hotmail.com
View Profile WWW Email
« Reply #38 on: 2010-01-12, 07:23:16 AM »

im releasing 0.1.2 simply because of many problems i want to work out.

* first, mapped tiles don't seem to appear. and also are considered "empty" when i try to put them in a category; (they appear just fine in the editor)

* the snake enemies wont face in right direction

* messages won't pause the game (am i missing a line?)

* need basic collision detection (hit a snake, lose one health)

* a puzzle thing when you go north and to the right.
   what is supposed to happen: you step on where a square is and it turns on, you step off and it turns off

oh yeah, i added an area where you swim. (i can figure things out on my own Smiley )


so....yeah, the link http://www.box.net/shared/1zh0yx1qjc

thanks for your help
« Last Edit: 2010-01-12, 07:32:10 AM by SmartBoy16 » Logged

SmartBoy16


The RANAT Foundation: Before the Truth http://www.box.net/RANAT-BtT
SmartBoy16
Contributor
Fanatic
**
Posts: 551


Current Project: RANAT: BtT

joelag_2009@hotmail.com
View Profile WWW Email
« Reply #39 on: 2010-01-14, 08:15:56 AM »

well, with no thanks to anyone Angry, i figured out some of them.

* i got mapped tiles to appear, but they still won't show in messages

* snakes now face in the right direction

* messages still won't pause the game

* i got collisions figured out, although i am confused about the differences between collision masks and collision rectangles Huh?

* and i figured out the puzzle thing


things im going to add soon:

* using a boulder to solve puzzle
   and when pushing boulder it always moves 64 pix in one direction

* more enemies

* mini map

* and hopefully a boss
Logged

SmartBoy16


The RANAT Foundation: Before the Truth http://www.box.net/RANAT-BtT
durnurd
Lead Lemming
Expert
Fanatic
*****
Posts: 1148


Games completed so far: 0

durnurd@hotmail.com
View Profile WWW
« Reply #40 on: 2010-01-14, 08:41:35 AM »

Collision masks collide only when the masked part of the sprite is touching something (i.e. only the visible pixels).  A Collision rectangle collides when the bounding rectangle touches something.  Collision rectangles allow for much faster collision detection, but are less accurate.  They should work for 90% of all cases.  If you think you need a collision mask, it is very possible that you are doing something wrong and could be using rectangles instead.
Logged

Edward Dassmesser
Vincent
Clever
Fanatic
***
Posts: 340


Working on a Legacy of Kain fangame.


View Profile Email
« Reply #41 on: 2010-01-14, 08:42:37 AM »

Hey Smartboy, I'm willing to help a little.  I don't have much time to afford, but I can point you some things out.

pausing game:
------------
When you say: messages won't pause the game, I suppose you are using the usual message function of SGDK2, not something particular that you developed?  If that is the case, showing messages this way doesn't pause the game.  You have to manage the pause by yourself.  In my game, I do a pause when dialog appears.  For that, I added a counter called pause and in each sprite and plan I make a check before running the code:
Code:
if counter.pause.currentvalue = 0 then
  do the actual code of this object
end

When I show a message, I set the value of the counter to 1 and when the message disappears, I put it to 0.  Of course don't forget to allow the player to clear the message, otherwise, he will get stuck.  Had you another way in mind to pause the game?

collisions mask / rectangles:
---------------------------
The difference between collision masks and collision rectangle is this.  When you have a sprite, whatever the sprite looks like, it is contained in a "rectangular cell".  Do not confuse this "rectangular cell" with the one containing the image on the graphic sheet.  If you do not specify this "cell", it will be identical to the one in the graphic sheet but you can make it bigger or smaller by moving the sprite it in the frameset.
The frameset allows to set to top-left most part of this cell.  This corner is the origin in the frameset (the spot where to two lines cross).  Then, in the sprite definition, you can set the width and the height of the sprite, which determines the lower right corner of the "cell" containing the sprite.  With these two corners, you have a "cell" to check for collision rectangles. 

Do you follow me?  If not, I'll take some screenshots to give you better examples.

When you check a collision rectangle with a sprite, anything that touches the "cell" is considered colliding with the sprite. 

If you add a collision mask on a sprite, you can set which part of the sprite you want to consider when detecting a collision. 

When you check a collision mask with the sprite, the "cell" is not considered a part of the sprite, a collision occurs only when something touches the collision mask.

Since the collision mask is a more precise collision detection, it is slower than a collision rectangle.

I think I'm pretty mush quoting the help file.  Do you need more information on any of this?  If you asked some questions, it would be easier for me to help you out, since I don't really have to time to look at your project right now.

Good luck! Smiley
Logged
SmartBoy16
Contributor
Fanatic
**
Posts: 551


Current Project: RANAT: BtT

joelag_2009@hotmail.com
View Profile WWW Email
« Reply #42 on: 2010-01-14, 09:08:17 AM »

alright, i think i got the masks/rectangle thing figured out the first time.

but thanks for the pause thing. Wink

Logged

SmartBoy16


The RANAT Foundation: Before the Truth http://www.box.net/RANAT-BtT
Pages: 1 2 [3] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!