Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
I'm starting the developpement of a flow free game on android.
I'm a bit confused about the architecture design.
Should I use grids/tablelayout available on android framework or just draw my own objects by specifying the position and which object to draw.
I created classes for each object as : POINT, EMPTY, SQUARE.
I want to create a prototype like on those links :
http://forums.gamesalad.com/discussion/48641/my-flow-free-inspired-game-development-thread
For the moment, I don't have to design the IA, I just need to focus on the game architecture and physics.
Should I use grids/tablelayout available on android framework or just draw my own objects by specifying the position and which object to draw.
You shouldn't use grids/tablelayout.
For 2D games where you need performance, use OpenGL or take a look at the andengine library.
Since this is going to be a simple 2D game, you should look at Canvas. Take a look at Android Sample Project > TicTacToeLib and Android Sample Project > TicTacToeMain (you need to use them both toghether). The GameView inside TicTacToeLib shows you how to use Canvas in a game.
What you will see when you compile TicTacToeMain with TicTacToeLib:
Related
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
I have 1000 images, each of them signifies a state at the time step. I would like to create an application that allows us to use a slider move through time steps, eventually being able also to see some information about what is going on in the image (like region size ect). I created the algorithm which creates generates and analyzes images in Python and I guess I will try to create UI in Java. Any recommendations on how to approach it? ( I am not very proficient in Java but I understand the basics). I attached the general view of what I want it to be below:
Try Tkinter, it is a very easy to use UI creator in python.
https://docs.python.org/3/library/tkinter.html
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
Contex: I'm trying to make a 2d physic engine, i'm starting to think about how to draw shapes that i could rotate. So i thought i could draw irregular shapes by drawing lines from several equations of straight. Now i have some doubts:
There is a easy way of draw a straight by giving an equation?
There is a library that can help me to handle equations?
The reason to use equations instead of using functions to draw lines from x1,y1 to x2,y2 is that i want the equations to calculate collisions between shapes.
Do you know a book or an article that could help me pull this off?
I'm gonna work in java, for now this is just an idea.
Not an expert in this field but quick search on java 2d engine collision engine returns dyn4j library on the first page. You can explore their examples and consequently the implementation code.
https://github.com/wnbittle/dyn4j
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I am new to the image processing discipline, currently I am working on an activity to find the path in a given floor plan image using java. I could understand & implement a plain Dijkstra or A star algorithm in java to find the shortest path between nodes that can work on hard coded values for nodes & edges. But I have no idea on how to do the same with image file as input.
I could not find any much detailed or comprehensive solution for this on web surfing. Any idea on how to achieve this. Kindly help.
If the walls on your plan are black, and the space is white, then use the white pixels as the space in which you can search using your algorithms.
be aware that:
The plan images could need some preprocessing, like adjusting brightness/contrast and/or converting into lower resolution picture.
If the plans are more complicated than that, ie. you need to take into account some special signs or structures on them then you need to do more complicated conversion/preprocessing and/or image recognition, using some special tools, maybe even some AI.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
Does anyone have any suggestions as to how I can go about creating an Effect for a JavaFX node that can simulate glass shattering and then (potentially) breaking? if the breaking is more difficult, I can skip that part. Basically I want to layer this pane over an image and then make it look like its a picture frame that then shatters. If it can then break into pieces (after some configurable delay).. that would be great as well!
I've looked everywhere but can't seem to find info on simulating the glass shatter effect in JavaFX.
Thanks!
For a simple solution I'd go with a Path that randomly extends and change the style of the path during time.
More sophisticated code could use a Canvas and paint the shattering on it. Daniel Shiffman with his Nature of Code book may be a base for you with the creation of the shatter effect.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
Has anyone idea how to make recently Google Search page in java swing?
Please take a look at http://www.google.com.
Nice effect :-)
If you wanted to do this in Swing, I would take the following approach:
Render the original screen to an offscreen BufferedImage
Render the new screen to an offcreen BufferedImage
Do an animated transition between the two by drawing the new screen then painting over it with the correct portions of the old screen, twisted and rotated to the right location (you can use the Java2D AffineTransformation for the rotating/twisting)
The tricky bit will be getting the position to change over time in a way that looks visually appealing and doesn't cause any nasty visual artefacts. This will take some maths and quite a bit of trial and error!