- Viewing Profile: Reputation: slicksk8te
Community Stats
- Group Members
- Active Posts 41
- Profile Views 289
- Member Title Member
- Age Age Unknown
- Birthday Birthday Unknown
-
Gender
Not Telling
User Tools
Contacts
slicksk8te hasn't added any contacts yet.
Latest Visitors
#4989508 [JAVA] My program just freezes like 2 seconds in. No warnings, no errors, no...
Posted by slicksk8te
on 12 October 2012 - 10:32 AM
[source lang="java"] while(realYValue == desiredPos){ enemyY = HEIGHT / 2 - 80; }[/source]
This creates an infinite loop. I would expect you wanted this:
[source lang="java"] if(realYValue == desiredPos){ enemyY = HEIGHT / 2 - 80; }[/source]
#4987844 "Getters" and "Setters" - do you write them if you don't...
Posted by slicksk8te
on 07 October 2012 - 08:50 PM
For instance if you had a variable in your Ball class named "speed", you may want to increase this as the game goes on longer. This would require a setter because the game needs to externally increase it. Then lets say you would like to check to see if the ball is off screen. This would require a getter for the position to figure out where the ball is.
Of course you could make the data public in the class but this is considered bad style and should be avoided except when absolutley necessary.
If it is only used in the class and never changed outside the class it should not have a getter or setter.
Hope this helps.
#4986194 AABB Collision Detection
Posted by slicksk8te
on 02 October 2012 - 02:54 PM
What I am unsure of, is how this could be best made to working with moving solid objects (other than the player.)
This is a big issue in games and there are many ways to solve this based on how accurate you want it to be. I would suggest checking out this article first.
#4986162 Handling a 2D procedural world
Posted by slicksk8te
on 02 October 2012 - 01:28 PM
Chunks are always a good way to go.
You say your world size is 10240 * 512 which is about 5 million tiles. This does not need to be loaded or saved all at once and should be streamed.
All of these chunks can be in the same file(file seeking) or different files, whichever is better for your needs but does not seem to be the bottleneck here.
The issue may be because the objects are not correctly serialized. Check here under 'Making an Object Serializable'.
I am still trying to determine what data you are serializing because 305MB seems rather high for tile based, even for 5 million tiles. So, what exactly are you serializing?
#4986087 AABB Collision Detection
Posted by slicksk8te
on 02 October 2012 - 10:16 AM
I feel that the code is a little heavy handed in places - e.g. passing the tile manager as an argument.
The code that you presented is not that heavy handed except that you need to be careful passing by value rather than passing by reference. For instance, passing the tile manager here:
void cPlayer::moveObject(cTileManager* TM)
is ok because it is a pass by reference, but here:
float cPlayer::collisionCheckX(cGraphicalObject A, cGraphicalObject B)
it may hurt you because you are passing by value.
Another option is to let the manager deal with the collision code and report it to the object through a callback or message and the object can choose to act or not. This makes it so that the objects do not have to know about any managers and only have to implement a couple of callback functions like TileCollision or SpriteCollision.
Also, checking for just a set number of tiles, 2 in your case, can cause problems with objects moving through tiles. For instance if the speed of your object causes it to move more than 2 tiles, the object would pass right through the tile. The solution to this is to get all tiles that the object moves through and checking from closest to farthest if there are any collisions.
Hope this helps
#4984005 Hi, I'm new and need some advices
Posted by slicksk8te
on 26 September 2012 - 09:55 AM
There are a lot of resources available for software and tutorials...but the right software and tutorials for you will be based on your programming experience and what you want to achieve.
If you are completely new to programming I would suggest learning a language like python first to get an understanding of programming.
Then you can move on to game development.
What type of experience do you have?
#4983811 evil and good choices in singleplayer rpg
Posted by slicksk8te
on 25 September 2012 - 06:05 PM
If you have the characters act out actions it would be much more interesting. That is based on the players actions and having just 3 choices rather than good, bad and evil.
#4983801 evil and good choices in singleplayer rpg
Posted by slicksk8te
on 25 September 2012 - 05:27 PM
I do think you are right on the grey area of good and evil. I think that the play between the two can be explored more in video games but there is a conundrum that is associated with story and choice. If you give the player more choice you have less control over story. And if you want to tailor an experience it is hard to give the player meaningful choice.
What most video games lack in my opinion when it comes to good and evil is subtlety. There is always an obvious good and obvious bad.
@glhf
Ok, that makes sense now. It is a very good idea to have multiple developers on story because each has a very different perspective. This is true in any game.
#4983784 evil and good choices in singleplayer rpg
Posted by slicksk8te
on 25 September 2012 - 04:33 PM
#4983763 Tile based RPG with Pyglet
Posted by slicksk8te
on 25 September 2012 - 04:00 PM
An example of this is:
{
"-": grassImage,
...
}
and then loop through your map and draw based on the tile location:
[source lang="python"]tileMapping = { "-": grassTexture, #preloaded ...}TILE_SIZE = 16 # for examplexCoord = 0yCoord = 0Map = ["-----"] # Preloaded mapfor row in Map: xCoord = 0 for tile in row: tileTexture = tileMapping[tile] x = xCoord * TILE_SIZE y = yCoord * TILE_SIZE # Draw Tile Texture Here at x,y xCoord += 1 yCoord += 1[/source]
Hope this helps
- Home
- » Viewing Profile: Reputation: slicksk8te

Find content