apk problem

Started by Pfaber11, September 22, 2019, 09:28:09

Previous topic - Next topic

Pfaber11

 The lines are jerky but I think that adds to the aesthetics . I really like them . Basically what I do is draw a 2d maze with mtpaint 2048x2048 then create a height map 20480x2000x20480 . I intend to take a look at your maze Ron and see what I think. I can knock up a new maze in less than 20 minutes using this method . I know it's unconventional but it works and I actually enjoy playing the game . Sliding doors would be good though. I don't intend to be making any new maze games right now but I will take onboard what you guys are saying . you know I think I could put in sliding doors quite easily come to think of it by creating a door model and placing it in the appropriate place then sliding it to the side . Hmm food for thought . Would probably be a bit of trial and error placing it in the right spot or I could put it into the maze then manoeuvre it into position.
HP 15s i3 1.2 upto 3.4 ghz 128 gb ssd 16 gb ram 15.6 inch screen. Windows 11 home edition .  2Tb external hard drive dedicated to Linux Mint .
  PureBasic 6 and AppGameKit studio
ASUS Vivo book 15 16gb ram 256gb storage  cpu upto 4.1 ghz

iWasAdam

I'm not going to say any more, but I will post some images that should give you food for thought about presentation and also about how to do something 'right' by using a grid.
So going from early to newest we have:







Pfaber11

The second one down looks like 3d monster maze on the zx81 which was the first program I ever purchased . My first computer too. I worked in my summer holidays when I was at school and by chance I saw a picture of the zx81 in a magazine and went out found a computer shop and bought one followed a few weeks later by a 16k ram pack. loved that computer . I was the first person I knew to own a computer . When I got it home I thought I better be careful not to use up all the 1 k of memory . I didn't realize when you pulled the plug it reset and you got the 1 k back again. Green or what. soon caught on though . The BBC computers and vic 20 were also out at the same time but were out of my league financially . Happy coding
HP 15s i3 1.2 upto 3.4 ghz 128 gb ssd 16 gb ram 15.6 inch screen. Windows 11 home edition .  2Tb external hard drive dedicated to Linux Mint .
  PureBasic 6 and AppGameKit studio
ASUS Vivo book 15 16gb ram 256gb storage  cpu upto 4.1 ghz

TomToad

Exact same images saved in black and white.  Sizes are 6K and 3K.  Total storage savings are 4122 K.
------------------------------------------------
8 rabbits equals 1 rabbyte.

Pfaber11

#19
Tom will they still create a height map being black and white ? I will try one later . You know personally I think computers have such vast memory these days it hardly matters . in fact someone downloading my game will probably think it's even better being a bigger file . Gonna try the black and white thing now. Be back when I'm done .
Tom Toad your assistance is required . The black and white mazes work exactly the same . could you please tell me how you turned  my maze black and white.
HP 15s i3 1.2 upto 3.4 ghz 128 gb ssd 16 gb ram 15.6 inch screen. Windows 11 home edition .  2Tb external hard drive dedicated to Linux Mint .
  PureBasic 6 and AppGameKit studio
ASUS Vivo book 15 16gb ram 256gb storage  cpu upto 4.1 ghz

Steve Elliott

#20
Quote
I think computers have such vast memory these days it hardly matters .

It *does* matter, especially for mobile devices.  Personally I think this is a terrible attitude to have - especially for an ex ZX81 owner lol.  Guy's with 3D experience are trying to help you, so let them.
Win11 64Gb 12th Gen Intel i9 12900K 3.2Ghz Nvidia RTX 3070Ti 8Gb
Win11 16Gb 12th Gen Intel i5 12450H 2Ghz Nvidia RTX 2050 8Gb
Win11  Pro 8Gb Celeron Intel UHD Graphics 600
Win10/Linux Mint 16Gb 4th Gen Intel i5 4570 3.2GHz, Nvidia GeForce GTX 1050 2Gb
macOS 32Gb Apple M2Max
pi5 8Gb
Spectrum Next 2Mb

Derron

Quote from: Pfaber11 on September 25, 2019, 12:55:30
The black and white mazes work exactly the same . could you please tell me how you turned  my maze black and white.

Open in image editor of choice and save as 2bit image - or reduce image depth first.


@ jittery lines
Just use a grid with tinier grid cells. Still the idea is to "abstract" it. Think of it as if you draw the maze at 512x512 and scale it up to 2048x2048 - elements will be "blockier" but this is what happens in mazes: there are straight walls, not curvy ones (except "faked" ones with decorations etc).


@ 20 minutes
I click on "generate" and have a maze. If I like the maze I store the seed for the initial random number. Want to play the same maze again? Use the same starting random number seed.


I (and others here) are not telling you how to do stuff - we write how we did or would tackle such stuff. We do this to help you improve. And seeing how you did your maze game ... it is an non-conventional way of doing. Means you can think outside the box. This is good. But sometimes it is better to use "proven" mechanics. Especially if it is such hmm "basic" stuff.
Heck, even if you follow the basic approaches of others there is plenty of room for your own ideas, tries to improve stuff (I do too - and often am finding out that the old solutions are still superior - generations of developers evolved the approaches already).


bye
Ron

iWasAdam

#22
OK. Let's look at this from a different perspective: 3D

First:

The magenta lines are what I've drown on top to show how things are done.

It's a 4x5grid with each grid position referencing 6 3d objects (total size for each model is 6k). Total texture size (for everything) is 20k.
What is more interesting is the grid positions are not floor/wall, but also reference height.
At any grid position I can check the part to be rendered and the height. so no collision code, etc.

OK. now for a different view:

This is a debug/working view for checking and getting everything right before adding other stuff.

The first thing to note is there are 2 views:
1. a fps view showing the 3d model
2. the underlying 2d grid outlined in red

the green square is you and the yellow line is the direction you are facing
I have outlined the 3d object in magenta on the 2d map so you can see how it is referenced.

In this case the 3d model occupies a 10x10grid (shown)

In both cases the actual 'game' is actually 2d. the 3d is just the icing and only serves as display output. I could just as simply not show it, or use the 2d grid for the game. But you my possibly get the concepts and thoughts behind things?

As was said. There is no right or wrong way. But to ignore or dismiss simpler and easier ways of doing things is not going to help in the long run.

KISS - Keep it simple stupid (from my design days)!

In the above examples you would need some very funky (read complex and nasty) code to deal with collisions in 3d. The more you need to check the slower your game and the more work you need to do to maintain things.

a 2d underlying grid array is simple to check and very simple to write and code - you may have to think a bit to get into the headspace. BUT... The only difference from this, pac man, Doom, even space invaders to an extent is they are all 2d based with some form of grid (screen positions count as a grid). Heck even Mario is just a grid. the only thing different is how the user moves and sees the result.

Pfaber11

This is all very interesting and I will try some of this stuff out in my next project. By the way I've got my apk file down to 18.7 mb from over a hundred will be uploading it onto itch.io later today. Tom toad the black and white approach worked very well and now my mazes are typically 20kb . down from 12mb each it's a lot better . I don't know why they were 12 mb in the first place but there you have it. I think i'm gonna try and pick up a zx81 if I can find one cheap . just so I can say that's what I started on .
HP 15s i3 1.2 upto 3.4 ghz 128 gb ssd 16 gb ram 15.6 inch screen. Windows 11 home edition .  2Tb external hard drive dedicated to Linux Mint .
  PureBasic 6 and AppGameKit studio
ASUS Vivo book 15 16gb ram 256gb storage  cpu upto 4.1 ghz

Steve Elliott

#24
Quote
By the way I've got my apk file down to 18.7 mb from over a hundred will be uploading it onto itch.io later today. Tom toad the black and white approach worked very well and now my mazes are typically 20kb . down from 12mb each it's a lot better .

Great news!  Well done Tom Toad.   :D
Win11 64Gb 12th Gen Intel i9 12900K 3.2Ghz Nvidia RTX 3070Ti 8Gb
Win11 16Gb 12th Gen Intel i5 12450H 2Ghz Nvidia RTX 2050 8Gb
Win11  Pro 8Gb Celeron Intel UHD Graphics 600
Win10/Linux Mint 16Gb 4th Gen Intel i5 4570 3.2GHz, Nvidia GeForce GTX 1050 2Gb
macOS 32Gb Apple M2Max
pi5 8Gb
Spectrum Next 2Mb

Derron

Once we prised out of him how he creates the maze It was just up to TomToad to suggest the bw-part. Good find.


@ 12 MB
What imageformat are you using? An APK should automatically compress bitmaps (or files in general). So if it was BMP it compresses well but original file size ("extracted") will be big.
Maybe you store stuff in a 32bit color depth and have a bit noise in your image?
Or you have "layers" and draw over it (tiff?).


Glad you cut it down now - means our blaming and posting here somehow lead to an improved version - and we were able to give you some new thoughts to tinker with.


bye
Ron

Steve Elliott

Quote
Once we prised out of him how he creates the maze It was just up to TomToad to suggest the bw-part. Good find.

lol true.  If you don't have an efficient solution, then ask the guys here.
Win11 64Gb 12th Gen Intel i9 12900K 3.2Ghz Nvidia RTX 3070Ti 8Gb
Win11 16Gb 12th Gen Intel i5 12450H 2Ghz Nvidia RTX 2050 8Gb
Win11  Pro 8Gb Celeron Intel UHD Graphics 600
Win10/Linux Mint 16Gb 4th Gen Intel i5 4570 3.2GHz, Nvidia GeForce GTX 1050 2Gb
macOS 32Gb Apple M2Max
pi5 8Gb
Spectrum Next 2Mb

Pfaber11

Well I've finished the improvements the pc version is down to about 16mb and when zipped up is 7 mb  . The apk file for android
is about 18 although when installed uses about 35mb . A huge improvement. uploaded both to itch.io then downloaded and tested them to make sure they work ok . They are free tonight on itch.io  so if anybody is curious as to what I have made feel free tohttps://itch.io/search?q=pfaber11
 
take a look .
HP 15s i3 1.2 upto 3.4 ghz 128 gb ssd 16 gb ram 15.6 inch screen. Windows 11 home edition .  2Tb external hard drive dedicated to Linux Mint .
  PureBasic 6 and AppGameKit studio
ASUS Vivo book 15 16gb ram 256gb storage  cpu upto 4.1 ghz

Pfaber11

Well I'm having another flash sale until midnight tonight just to get the ball rolling 100% off . It maybe I look at things a bit differently to you guys . Gonna do some study over the next couple of weeks and see if I can see exactly what you mean . All I know really is about height maps and models . Still obviously plenty to learn . It seems the further down the rabbit hole I get the more there is to Know . Anyway thanks once more for all your input gonna take a look on you tube to see what information I can find. The link to the 100% off sale is in my previous post . Happy coding .
HP 15s i3 1.2 upto 3.4 ghz 128 gb ssd 16 gb ram 15.6 inch screen. Windows 11 home edition .  2Tb external hard drive dedicated to Linux Mint .
  PureBasic 6 and AppGameKit studio
ASUS Vivo book 15 16gb ram 256gb storage  cpu upto 4.1 ghz

iWasAdam

#29
mmmm. I've kept quiet on the 100% 'Golf Sale' mentality, but I do have something to say that might give you some thoughts.

'Golf Sales' are generally a terrible concept, in the respect that most sales are just the 'real value' dropped from an inflated one - it's not really good business or practice. But... There is something a bit more fundamental:

Something discounted is always great for getting headlines and eyeballs. But once downloaded and checked out the quality of the product (your game in this case) is what will be left. Ask yourself "Is this a good product and would someone who downloaded it think it was good or bad?" You have to be brutal with that one...

Is your aim to get downloads - at what cost to your reputation?
If 1 person likes your game they will tell 1 other person.
If 1 person doesn't like your game (for whatever reason) they will shout a bit and tell 10 people.

You real aim should be to learn and grow and potentially profit (at some stage) for doing something that people like. In the early stages you will have lots of projects that are not brilliant (we all have them stored away ;) ). You should make sure that people tell other peole what they liked and not what the didn't like.

In the previous posts showing a number of different maze related fps games - how does your games measure against those (be brutal on this)? With google you now have the ability to see what is a good game, how it looks and how it is presented - try to aim for the same style/thing they do. if you have hugely multicolored stuff - ask yourself why?, could it be better presented? etc, etc

Keep up the good work, but look, absorb, learn and think :)